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

/modules/mod_admin_predicate/templates/admin_predicate.tpl

https://code.google.com/p/zotonic/
Smarty Template | 56 lines | 47 code | 9 blank | 0 comment | 2 complexity | cc7408afc53250a3449317cf1e331638 MD5 | raw file
 1{% extends "admin_base.tpl" %}
 2
 3{% block title %} Predicates {% endblock %}
 4
 5{% block content %}
 6{% with m.acl.is_admin as editable %}
 7	<div id="content" class="zp-85">
 8		<div class="block clearfix">
 9
10			<h2>Predicates</h2>
11
12			{% if editable %}
13			<div class="clearfix">
14				{% button text="make a new predicate" action={dialog_predicate_new title=""} %}
15			</div>
16
17			<hr />
18			{% endif %}
19
20			<p>A predicate denotes traits or aspects of a page and expresses a relationship between two pages.
21			 The relation is always directed, from the subject to the object.<br/>Predicates are defined in ontologies like <a href="http://sioc-project.org/">SIOC</a>.  On this page you can define the predicates known to Zotonic.</p>
22			
23			<h3 class="above-list">Predicate overview</h3>
24			<ul class="short-list">
25				<li class="headers clearfix">
26					<span class="zp-20">Title</span>
27					<span class="zp-20">Name</span>
28					<span class="zp-40">Uri</span>
29					<span class="zp-10">Reversed?</span>
30					<span class="zp-10">Actions</span>
31				</li>
32
33			{% for name,p in m.predicate %}
34				<li id="{{ #li.name }}">
35					<a href="{% url admin_edit_rsc id=p.id %}" class="clearfix">
36						<span class="zp-20">{{ p.title|default:"&nbsp;" }}</span>
37						<span class="zp-20">{{ p.name|default:"&nbsp;" }}</span>
38						<span class="zp-40">{{ p.uri|default:"&nbsp;" }}</span>
39						<span class="zp-10">{{ p.reversed|yesno:"reversed,&nbsp;" }}</span>
40						<span class="zp-10">
41							{% button disabled=p.is_protected text="delete" action={dialog_predicate_delete id=p.id on_success={slide_fade_out target=#li.name}} %}
42							{% button text="edit" action={redirect dispatch="admin_edit_rsc" id=p.id} %}
43						</span>
44					</a>
45				</li>
46			{% empty %}
47				<li>
48					No predicates found.
49				</li>
50			{% endfor %}
51			</ul>
52
53		</div>
54	</div>
55{% endwith %}
56{% endblock %}