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

{% load i18n %}



<div id='collage'>

	<h2>{% trans 'edit' %} {{ obj.model_name }} {{ obj.id }}: {{ obj.name }}</h2>
	
	<form enctype='multipart/form-data' method='post' action='/edit/collage/{{ obj.id }}'>

        {% csrf_token %}
        
        <a href='/add/row/collage/{{ obj.id }}/0'>
            <img src='{{ STATIC_URL }}cms/icons/add_large.png' alt='{% trans 'delete row' %}' title='{% trans 'delete row' %}'>
        </a>

        {% for y in obj.grid %}

            <table>

		        <tr class='row'>

	                <td>
	                    <a href='/delete/row/collage/{{ obj.id }}/{{ forloop.counter0 }}'>
                            <img src='{{ STATIC_URL }}cms/icons/remove_large.png' alt='{% trans 'delete row' %}' title='{% trans 'delete row' %}'>
                        </a>
	                </td>

		            <td>
	                    <a href='/add/slot/collage/{{ obj.id }}/{{ forloop.counter0 }}/0'>
                            <img src='{{ STATIC_URL }}cms/icons/add_small.png' alt='{% trans 'add slot' %}' title='{% trans 'add slot' %}'>
                        </a>
		            </td>

	                {% for x in y %}
	                    <td class='slot'>

                            <table>
                                <tr>
                                    <td>
                                        type:
                                    </td>
                                    <td>
                                        <select name='type.{{ forloop.parentloop.counter0 }}.{{ forloop.counter0 }}'>
                                            <option value='obj' selected='selected'>obj</option>
                                            <option value='plugin'>plugin</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>

                                    <td>
                                        obj or plugin:
                                    </td>

                                    <td>
                                        <select name='obj_model_name_or_plugin_name.{{ forloop.parentloop.counter0 }}.{{ forloop.counter0 }}'>

                                            {% for omn in obj_model_names %}
                                                {% if omn == x.obj_model_name %}
                                                    <option value='{{ omn }}' selected='selected'>{{ omn }}</option>
                                                {% else %}
                                                    <option value='{{ omn }}'>{{ omn }}</option>
                                                {% endif %}
                                            {% endfor %}

                                            {% for pn in plugin_names %}

                                                {% if pn == x.plugin_name %}
                                                    <option value='{{ pn }}' selected='selected'>{{ pn }}</option>
                                                {% else %}
                                                    <option value='{{ pn }}'>{{ pn }}</option>
                                                {% endif %}
                                            {% endfor %}

                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        obj id:
                                    </td>

                                    <td>
                                        <input name='obj_id.{{ forloop.parentloop.counter0 }}.{{ forloop.counter0 }}'  type='text' value='{{ x.obj_id|default_if_none:'' }}'>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        css:
                                    </td>

                                    <td>
                                        <input name='css_name.{{ forloop.parentloop.counter0 }}.{{ forloop.counter0 }}'  type='text' value='{{ x.css_name|default_if_none:'' }}'>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        template:
                                    </td>

                                    <td>
                                        <select name='template_path.{{ forloop.parentloop.counter0 }}.{{ forloop.counter0 }}'>
                                              <option value='' selected='selected'></option>
                                                  {% for path, description in templates %}

                                                      {% if path == x.template_path %}
                                                          <option value='{{ path }}' selected='selected'>{{ description }}</option>
                                                      {% else %}
                                                          <option value='{{ path }}'>{{ description }}</option>
                                                      {% endif %}
                                                  {% endfor %}
                                              </select>
                                    </td>
                                </tr>
                            </table>
	
	                        <a href='/delete/slot/collage/{{ obj.id }}/{{ forloop.parentloop.counter0 }}/{{ forloop.counter0 }}'>
                                <img src='{{ STATIC_URL }}cms/icons/remove_small.png' alt='{% trans 'delete slot' %}' title='{% trans 'delete slot' %}'>
                            </a>

	                    </td>

	                    <td>
	                        <a href='/add/slot/collage/{{ obj.id }}/{{ forloop.parentloop.counter0 }}/{{ forloop.counter }}'>
                                <img src='{{ STATIC_URL }}cms/icons/add_small.png' alt='{% trans 'add slot' %}' title='{% trans 'add slot' %}'>
                            </a>
			            </td>

	                {% endfor %}
	            </tr>

    	    </table>		

            <a href='/add/row/collage/{{ obj.id }}/{{ forloop.counter }}'>
                <img src='{{ STATIC_URL }}cms/icons/add_large.png' alt='{% trans 'add row' %}' title='{% trans 'add row' %}'>
            </a>

      	{% endfor %}<br />
        <br />

	    <input type="hidden" name='request_token' value='{{ request_token }}'>
	    <input type='submit' name='action' value='Submit' onclick='js_single_submit()'>

    </form>
	
</div>
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.