Source

django-swingcms / swingcms / custodian / templates / custodian / edit_user_specific_perms.html

{% load i18n %}



<div id='custodian' class='lists'>

    <h2>Permissions granted to user {{ user_.username }} on {{ obj_model_name }} {{ obj_id }}</h2>
    <br />
    <br />

    <form enctype='multipart/form-data' method='post' action='' onsubmit="return js_single_submit();">

        {% csrf_token %}

        <table>
            <tr>
	            <td>

		            <div class='switch0'>
                        <a href="javascript:switch_element('block0','block');switch_icons('switch0');">
                            <img src="{{ STATIC_URL }}cms/icons/minus.gif" title="minus" alt="minus">
                        </a> <h5>Calculated specific permissions</h5><br />
                        <br />
                    </div>

                    <div class='block0 perms' style='display:block;'>
		                {% for verb,__ in calculated_specific_perms %}
			                can {{ verb }}<br />
                        {% empty %}
                            NONE<br />
		                {% endfor %}
                    </div>
	            </td>

	            <td>
                    <div class='switch1'>
                        <a href="javascript:switch_element('block1','block');switch_icons('switch1');">
                            <img src="{{ STATIC_URL }}cms/icons/minus.gif" title="minus" alt="minus">
                        </a> <h5>Specific permissions</h5><br />
                        <br />
                    </div>

                    <div class='block1 perms checkable' style='display:block;'><!-- inserire class='perms checkable' -->
                        &nbsp;S&nbsp;&nbsp;R<br />
		                {% for p in all_perms %}
			                <input type='checkbox' name='selected' value='CAN/{{ p|first }}'
			                {% if p in specific_perms|first %}
				                checked
			                {% endif %}
			                /><input type='checkbox' name='recursive' value='CAN/{{ p|first }}'/>
                            can {{ p|first }}<br />
		                {% endfor %}
                    </div>

                    <div class='switch2'>
                        <a href="javascript:switch_element('block2','block');switch_icons('switch2');">
                            <img src="{{ STATIC_URL }}cms/icons/minus.gif" title="minus" alt="minus">
                        </a> <h5>Specific prohibitions</h5><br />
                        <br />
                    </div>

                    <div class='block2 perms checkable' style='display:block;'><!-- inserire class='perms checkable' -->
                        &nbsp;S&nbsp;&nbsp;R<br />
		                {% for p in all_perms %}
			                <input type='checkbox' name='selected' value='CANNOT/{{ p|first }}'
			                {% if p in specific_perms|last %}
				                checked
			                {% endif %}
			                /><input type='checkbox' name='recursive' value='CANNOT/{{ p|first }}'/>
                            cannot {{ p|first }}<br />
		                {% endfor %}
                    </div>

	            </td>

                <td>
                    <div class='switch3'>
                        <a href="javascript:switch_element('block3','block');switch_icons('switch3');">
                            <img src="{{ STATIC_URL }}cms/icons/minus.gif" title="minus" alt="minus">
                        </a> <h5>Calculated model permissions</h5><br />
                        <br />
                    </div>

                    <div class='block3 perms' style='display:block;'>
		                {% for verb, __ in calculated_model_perms %}
			                can {{ verb }}<br />
                        {% empty %}
                            NONE<br />
		                {% endfor %}
                    </div>

	            </td>


                <td>
                    <div class='switch4'>
                        <a href="javascript:switch_element('block4','block');switch_icons('switch4');">
                            <img src="{{ STATIC_URL }}cms/icons/minus.gif" title="minus" alt="minus">
                        </a> <h5>Calculated global permissions</h5><br />
                        <br />
                    </div>

                    <div class='block4 perms' style='display:block;'>
		                {% for p in calculated_global_perms %}
			                can {{ p|first }} {{ p|last|default:'' }}<br />
                        {% empty %}
                            NONE<br />
		                {% endfor %}
                    </div>

	            </td>
            </tr>
        </table>

        <input type='submit' name='submit' value='Save'>

    </form>

</div>