/modules/mod_acl_simple_roles/templates/_admin_edit_content.acl_role.tpl

https://code.google.com/p/zotonic/ · Smarty Template · 142 lines · 126 code · 16 blank · 0 comment · 16 complexity · 3fa5056918271a01040c323322c6950b MD5 · raw file

  1. {% with m.rsc[id].acl as acl %}
  2. <div class="item-wrapper">
  3. <h3 class="above-item clearfix do_blockminifier">
  4. <span class="title">{_ Permissions _}</span>
  5. <span class="arrow">{_ make smaller _}</span>
  6. </h3>
  7. <div class="item">
  8. <fieldset class="admin-form">
  9. <div class="notification notice">
  10. {_ Check below what people that are member of this role are allowed to do. _}<a href="javascript:void(0)" class="do_dialog" data-dialog="title: '{_ Help about ACL roles. _}', text: '{_ Users can be member of multiple roles. Depending on the roles an user is allowed to create and edit certain categories or is able to manage certain modules. _}', width: '450px'">{_ Need more help? _}</a>
  11. </div>
  12. <div class="form-item clearfix">
  13. <input id="field-view-all" type="checkbox" class="do_fieldreplace" name="acl_view_all" {% if acl.view_all %}checked="checked"{% endif %} value="1" />
  14. <label for="field-view-all">{_ All members are allowed to view all content. (Check this for supervisors.) _}</label>
  15. </div>
  16. <div class="form-item clearfix">
  17. <input id="field-update-own" type="checkbox" class="do_fieldreplace" name="acl_only_update_own" {% if acl.only_update_own %}checked="checked"{% endif %} value="1" />
  18. <label for="field-update-own">{_ Only allow to update content created by the user himself. (Check for user generated content sites.) _}</label>
  19. </div>
  20. <div class="form-item clearfix">
  21. <label>{_ Maximum visibility (user canâ&#x20AC;&#x2122;t change visibility to higher level than this) _}</label>
  22. <select id="acl_visible_for" name="acl_visible_for">
  23. <option value="0"
  24. {% ifequal 0 acl.visible_for %}selected="selected"
  25. {% endifequal %}>{_ The whole world _}</option>
  26. <option value="1"
  27. {% ifequal 1 acl.visible_for %}selected="selected"
  28. {% endifequal %}>{_ Community members _}</option>
  29. <option value="2" {% ifequal 2 acl.visible_for %}selected="selected"{% endifequal %}>{_ Group members _}</option>
  30. </select>
  31. </div>
  32. <hr/>
  33. <div class="zp-40">
  34. <h4>{_ Allow editing of category _}</h4>
  35. <p>
  36. {% for cat_id, level, indent, title in m.category.all_flat_meta %}
  37. <label for="{{ #category.cat_id }}">
  38. {{ indent }}<input type="checkbox" id="{{ #category.cat_id }}" name="acl_cat" {% if title|as_atom|member:acl.categories %}checked="checked" {% endif %} value="{{ title }}" />{{ title }}<br/>
  39. </label>
  40. {% endfor %}
  41. </p>
  42. </div>
  43. <div class="zp-10">
  44. &nbsp;
  45. </div>
  46. <div class="zp-50">
  47. <h4>{_ Manage modules _}</h4>
  48. <p>
  49. {% with m.modules.all as modules %}
  50. {% for mod in m.modules.enabled %}
  51. <label for="{{ #module.mod }}">
  52. <input type="checkbox" id="{{ #module.mod }}" name="acl_mod" {% if mod|member:acl.modules %}checked="checked" {% endif %} value="{{ mod|escape }}" />{{ modules[mod]|escape }}<br/>
  53. </label>
  54. {% endfor %}
  55. {% endwith %}
  56. </p>
  57. </div>
  58. <hr style="clear:left" />
  59. <h4>{_ File uploads _}</h4>
  60. <div class="form-item clearfix">
  61. <label for="field-file-upload-size">{_ Maximum allowed file size for uploads (in KB) _}</label>
  62. <input id="field-file-upload-size" style="width: 100px" type="text" name="acl_file_upload_size" value="{{ acl.file_upload_size|default:4096|escape }}" />
  63. {% validate id="field-file-upload-size" name="acl_file_upload_size" type={numericality} %}
  64. </div>
  65. <h4>{_ File types allowed to be uploaded _}</h4>
  66. <p>{_ <strong>Security notice</strong>: When you allow */* files then all members of this role will be able to obtain full access to your whole site and all underlying data. _}</p>
  67. {% for mimes in [
  68. "image/jpeg",
  69. "image/png",
  70. "image/gif",
  71. "image/tiff",
  72. "image/bmp",
  73. "image/vnd.adobe.photoshop",
  74. "application/pdf",
  75. "application/postscript",
  76. "image/*",
  77. "-",
  78. "audio/mpeg",
  79. "audio/x-wav",
  80. "audio/x-aiff",
  81. "audio/*",
  82. "-",
  83. "video/mp4",
  84. "video/mpeg",
  85. "video/msvideo",
  86. "video/x-ms-asf",
  87. "video/*",
  88. "application/x-shockwave-flash",
  89. "-",
  90. "application/msword",
  91. "application/vnd.ms-excel",
  92. "application/vnd.ms-powerpoint",
  93. "application/vnd.ms-project",
  94. "-",
  95. "application/zip",
  96. "application/x-gzip",
  97. "application/x-tar",
  98. "application/x-gzip+tar",
  99. "-",
  100. "text/plain",
  101. "text/json",
  102. "text/css",
  103. "-",
  104. "*/*"
  105. ]|vsplit_in:2 %}
  106. <div class="zp-50">
  107. <ul>
  108. {% for mime in mimes %}
  109. {% if mime == "-" %}
  110. <li><br/></li>
  111. {% else %}
  112. <li><label for="{{ #acl.mime }}">
  113. <input type="checkbox" id="{{ #acl.mime }}" name="acl_mime"
  114. {% if mime|member:acl.file_mime %}checked="checked"{% endif %}
  115. value="{{ mime }}" /> {{ mime }}</label></li>
  116. {% endif %}
  117. {% endfor %}
  118. </ul>
  119. </div>
  120. {% endfor %}
  121. <hr style="clear:left" />
  122. {% include "_admin_save_buttons.tpl" %}
  123. </fieldset>
  124. </div>
  125. </div>
  126. {% endwith %}