PageRenderTime 11ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/mod_admin/templates/_admin_edit_content_publish.tpl

https://code.google.com/p/zotonic/
Smarty Template | 58 lines | 46 code | 12 blank | 0 comment | 9 complexity | 8d3b251e03813e56388c1c40169d6247 MD5 | raw file
 1{% extends "admin_edit_widget_std.tpl" %}
 2
 3{# Widget with main rsc controls: publish, delete, duplicate, etc  #}
 4
 5{% block widget_title %}{_ Publish this page _}{% endblock %}
 6{% block widget_show_minimized %}false{% endblock %}
 7{% block widget_id %}sort-publish{% endblock %}
 8
 9
10{% block widget_content %}
11<div class="admin-form ">
12    <div class="form-item clearfix">
13	{% button type="submit" id="save_stay" class="save-resource do_tooltip" text=_"save" title=_"Save this page." disabled=not is_editable %}
14	{% if is_editable %}
15	    {% button type="submit" id="save_view" class="save-resource do_tooltip" text=_"save &amp; view" title=_"Save and view the page." %}
16	{% else %}
17	    {% button id="save_view" class="save-resource do_tooltip" text=_"view" title=_"View this page." action={redirect id=id} %}
18	{% endif %}
19
20	{% button class="discard-resource right do_tooltip" text=_"Cancel" action={redirect back} title=_"Go back." %}
21    </div>
22
23    <div class="form-item clearfix">
24	<input type="checkbox" class="do_fieldreplace" id="is_published" name="is_published" value="1" {% if r.is_published %}checked="checked"{% endif %}/>
25	<label for="is_published" class="left">{_ Published _}</label>
26
27	<input type="checkbox" class="do_fieldreplace" id="is_featured" name="is_featured" value="1" {% if r.is_featured %}checked="checked"{% endif %}/>
28	<label for="is_featured" class="left">{_ Featured _}</label>
29
30	<input type="checkbox" class="do_fieldreplace" id="is_protected" name="is_protected" value="1" {% if r.is_protected %}checked="checked"{% endif %} {% ifequal id 1 %}disabled="disabled"{% endifequal %} />
31	<label for="is_protected" class="left">{_ Protect from deletion _}</label>
32    </div>
33
34    <div class="form-item clearfix">
35	{% ifnotequal id 1 %}
36	    {% button class="discard-resource do_tooltip" disabled=(r.is_protected or not m.rsc[id].is_deletable) id="delete-button" text=_"Delete" action={dialog_delete_rsc id=r.id on_success={redirect back}} title=_"Delete this page." %}
37	{% endifnotequal %}
38	
39	{% if is_editable %}
40	    {% button type="submit" id="save_duplicate" class="save-resource do_tooltip" text=_"Duplicate" title=_"Duplicate this page." %}
41	{% else %}
42	    {% button	class="save-resource do_tooltip" 
43			text=_"Duplicate" 
44			action={dialog_duplicate_rsc id=id} 
45			title=_"Duplicate this page."
46			disabled=(not m.acl.insert[r.category.name]) %}
47	{% endif %}
48
49	{% for id in m.search[{next id=id cat=m.rsc[id].category.name pagelen=1}] %}
50		{% button class="goto-resource right do_tooltip" text="&raquo;" action={redirect dispatch="admin_edit_rsc" id=id} title=_"Next in category: "|append:m.rsc[id].title %}
51	{% endfor %}
52
53	{% for id in m.search[{previous id=id cat=m.rsc[id].category.name pagelen=1}] %}
54		{% button class="goto-resource right do_tooltip" text="&laquo;" action={redirect dispatch="admin_edit_rsc" id=id} title=_"Previous in category: "|append:m.rsc[id].title %}
55	{% endfor %}
56	</div>
57</div>
58{% endblock %}