Source

django-swingcms / swingcms / cms / templates / cms / browser.html

{% load i18n %}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>

      <!-- favicon -->

      <link rel="shortcut icon" href="{{ STATIC_URL }}cms/icons/favicon.ico" />

      <!-- style.css file -->

      <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}cms/css/base.css"/>

    </head>

    <body>


        <script>

            function pass_url(url) {
                window.opener.CKEDITOR.tools.callFunction({{ CKEditorFuncNum }}, url);
                window.close();
            };

        </script>


        <div id='file_browser'>

            <br />
            <h4>{% trans 'Select by clicking on:' %}</h4><br />

            {% for c in contents %}

                {% if c.model_name == 'image' %}

                    <div class='thumb'>

	                    <a href="javascript:pass_url('{{ c.image.url }}')">
                            <img src="{{ c.image_thumb.url }}" alt="{{ c.image.url }}">
                        </a>

                    </div>

                {% else %}

                    {% if c.model_name == 'clip' %}

	                    <a href="javascript:pass_url('{{ c.clip.url }}')">{{ c.name }}</a>

                    {% else %}

	                    <a href="javascript:pass_url('{{ c.file.url }}')">{{ c.name }}</a><br />
                        <br />
                    {% endif %}

                {% endif %}

            {% endfor %}

        </div>


    </body>

</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.