PageRenderTime 19ms CodeModel.GetById 7ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

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