summaryrefslogtreecommitdiff
path: root/gstudio/templates/gstudio/attributetype_detail.html
blob: a09f561e9ffbe92ec01ab1399fb241ef16788fba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
{% extends "gstudio/base.html" %}
{% load i18n comments gstudio_tags %}

{% block title %}{{ object.title }}{% endblock %}

{% block meta-description %}{% if object.excerpt %}{{ object.excerpt|striptags }}{% else %}{{ object.content|striptags|truncatewords:100 }}{% endif %}{% endblock %}

{% block meta-keywords %}{% if object.tags %}{{ object.tags }}{% else %}{{ block.super }}{% endif %}{% endblock %}


{% block link %}
  {{ block.super }}
  {% with object.previous_attributetype as previous_attributetype %}{% if previous_attributetype %}
  <link rel="prev" title="{{ previous_attributetype.title }}" href="{{ previous_attributetype.get_absolute_url }}" />
  {% endif %}{% endwith %}
  {% with object.next_attributetype as next_attributetype %}{% if next_attributetype %}
  <link rel="next" title="{{ next_attributetype.title }}" href="{{ next_attributetype.get_absolute_url }}" />
  {% endif %}{% endwith %}
  <link rel="shortlink" href="{{ object.short_url }}" />
  <link rel="canonical" href="{{ object.get_absolute_url }}" />
  {% with year=object.creation_date|date:"Y" month=object.creation_date|date:"m" day=object.creation_date|date:"d" %}
  <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of discussions on" %} '{{ object.title }}'"
        href="{% url gstudio_attributetype_discussion_feed year month day object.slug %}" />
  <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of comments on" %} '{{ object.title }}'"
        href="{% url gstudio_attributetype_comment_feed year month day object.slug %}" />
  <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of pingbacks on" %} '{{ object.title }}'"
        href="{% url gstudio_attributetype_pingback_feed year month day object.slug %}" />
  <link rel="alternate" type="application/rss+xml" title="{% trans "RSS Feed of trackbacks on" %} '{{ object.title }}'"
        href="{% url gstudio_attributetype_trackback_feed year month day object.slug %}" />
  {% endwith %}
{% endblock %}


{% block content %}


{% block attributetype-content %}
  {% with object.html_content|safe as object_content %}


             <b>Test successful : </b> {{ object.title }} <br/>

	    {% for key,value in object.get_rendered_nbh.items %}
                    
                  {% if value %}
                           {% if key == "altnames" %}
                               <b> Alternate names :<nbsp></b>
                                         {{value}} <br/>
		           {% endif %}
			   {% if key == "plural" %}
                                <b> Plural Name :<nbsp></b>
                                         {{value}} <br/>
                           {% endif %}
	                   {% if key == "type_of" %}
                                <b> Type of :<nbsp></b>
                                          {{value}} <br/>
                           {% endif %}
                           {% if key == "contains_subtypes" %}
                                <b> SubTypes :<nbsp></b>
                                          {{value}} <br/>
                           {% endif %}
                           {% if key == "siblings" %}
                                {% if value %}
				   <b>Siblings: <nbsp> </b>
                                {% endif %}
				    {% for sibkey,sibvalue in value.items %}
                                        <a href="{{sibvalue}}">{{sibkey}}</a>;	      
				    {% endfor %}       <br/>
	                   {% endif %}
                           {% if key == "member_of_metatypes" %}
                                <b> Member of Metatypes :<nbsp></b>
                                    {% for mkey,mvalue in value.items %}
                                        <a href="{{mvalue}}">{{mkey}}</a>;
                                    {% endfor %}<br/>
                           {% endif %}
                           {% if key == "contains_members" %}
                                <b>Contains Member objects :<nbsp></b>
                                    {% for mkey,mvalue in value.items %}
                                        <a href="{{mvalue}}">{{mkey}}</a>;
                                    {% endfor %}<br/>
                           {% endif %}
			   {% if key == "leftroles" %}
                                <b>Left role of Relation types :<nbsp></b>
                                    {% for lftkey, lftvalue in value.items %}
                                        <a href="{{lftvalue}}">{{lftkey}}</a>;
                                    {% endfor %}<br/>
                           {% endif %}
                           {% if key == "rightroles" %}
                                <b>Right role of Relation types :<nbsp></b>
                                    {% for rghtkey, rghtvalue in value.items %}
                                        <a href="{{rghtvalue}}">{{rghtkey}}</a>;
                                    {% endfor %}<br/>
                           {% endif %}
                           {% if key == "posteriornodes" %}
                                <b>Posterior nodes :<nbsp></b>
                                    {% for mkey,mvalue in value.items %}
                                        <a href="{{mvalue}}">{{mkey}}</a>;
                                    {% endfor %}<br/>
                           {% endif %}
                           {% if key == "priornodes" %}
                                <b>Priornodes :<nbsp></b>
                                    {% for mkey,mvalue in value.items %}
                                        <a href="{{mvalue}}">{{mkey}}</a>;
                                    {% endfor %}<br/>
                           {% endif %}
                           
                           
                           
                    {% endif %}
                {% endfor %}



 {% endwith %}
 {% endblock %}



{% block attributetype-widgets %}
<div class="attributetype-widgets span-16 last">  {% with object.next_attributetype as next_attributetype %}
  {% if object.posteriornodes.all %}
  <div class="attributetype-next">
    <h5>{% trans "Posterior node" %}</h5>
	          {% for items in object.posteriornodes.all %}
	     <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; 
	     {% endfor %} 	     
  </div>
  {% endif %}
  {% endwith %}
  <!-- {% with object.previous_attributetype as previous_attributetype %} -->
  {% if object.priornodes.all %}
  <div class="attributetype-next">
    <h5>{% trans "Prior node" %}</h5>
	          {% for items in object.priornodes.all %}
	     <a href="{{ items.get_absolute_url }}"> {{ items.title }}</a>; 
	     {% endfor %} 	     
  </div>
  {% endif %}
  {% endwith %}
  {% if object.related_published %}
  <div class="attributetype-related">
    <h5>{% trans "Related node types" %}</h5>
    <ul>
      {% for attributetype in object.related_published %}
      <li>
	<a href="{{ attributetype.get_absolute_url }}" title="{{ attributetype.title }}" rel="bookmark">{{ attributetype.title }}</a>
      </li>
      {% endfor %}
    </ul>
  </div>
  {% endif %}
</div>
{% endblock %}

{% block attributetype-comments %}
<div id="comments" class="span-16 last">
  <h5>{% trans "Comments" %}</h5>
  {% with object.comments as comment_list %}
  {% if comment_list.count %}
  <ol id="comment-list" class="span-15 last">
    {% for comment in comment_list %}
    <li id="comment_{{ comment.pk }}" class="comment vcard {% cycle box1,box2 %}{% if comment.user in object.authors.all %} post-author{% endif %} span-15 last">
      <div class="span-2">
	<img src="{% get_gravatar comment.email 60 "G" %}" class="gravatar photo" alt="{{ comment.user_name }}"/>
      </div>
      <div class="comment-body span-13 last">
	<div class="comment-author span-13 last">
	  {% if comment.url %}
	  <a href="{{ comment.url }}" class="fn url">{{ comment.user_name }}</a>
	  {% else %}
	  {{ comment.user_name }}
	  {% endif %}
	  {% trans "on" %} {{ comment.submit_date|date:"SHORT_DATETIME_FORMAT" }}
	</div>
	<div class="span-13 last">
	  {{ comment.comment|linebreaks }}
	</div>
      </div>
    </li>
    {% endfor %}
  </ol>
    {% if not object.comments_are_open %}
  <p>{% trans "Comments are closed." %}</p>
    {% endif %}
  {% else %}
    {% if object.comments_are_open %}
  <p>{% trans "No comments yet." %}</p>
    {% else %}
  <p>{% trans "Comments are closed." %}</p>
    {% endif %}
  {% endif %}
  {% endwith %}
</div>
{% endblock %}

{% block attributetype-pingbacks %}
<div id="pingbacks" class="span-16 last">
  <h5>{% trans "Pingbacks" %}</h5>
  {% with object.pingbacks as pingback_list %}
  {% if pingback_list.count %}
  <ol id="pingback-list" class="span-15 last">
    {% for pingback in pingback_list %}
    <li id="pingback_{{ pingback.pk }}" class="pingback {% cycle box1,box2 %} span-15 last">
      <div class="pingback-body span-15 last">
	<div class="pingback-author span-15 last">
	  <a href="{{ pingback.url }}">{{ pingback.user_name }}</a>
	  {% trans "on" %} {{ pingback.submit_date|date:"SHORT_DATETIME_FORMAT" }}
	</div>
	<div class="span-15 last">
	  <cite>
	    {{ pingback.comment }}
	  </cite>
	</div>
      </div>
    </li>
    {% endfor %}
  </ol>
  {% endif %}
    {% if object.pingback_enabled %}
  <p>{% trans "Pingbacks are open." %}</p>
    {% else %}
  <p>{% trans "Pingbacks are closed." %}</p>
    {% endif %}
  {% endwith %}
</div>
{% endblock %}

{% block attributetype-trackbacks %}
{% with object.trackbacks as trackback_list %}
{% if trackback_list.count or object.pingback_enabled %}
<div id="trackbacks" class="span-16 last">
  <h5>{% trans "Trackbacks" %}</h5>
  {% if trackback_list.count %}
  <ol id="trackback-list" class="span-15 last">
    {% for trackback in trackback_list %}
    <li id="trackback_{{ trackback.pk }}" class="trackback {% cycle box1,box2 %} span-15 last">
      <div class="trackback-body span-15 last">
	<div class="trackback-author span-15 last">
	  <a href="{{ trackback.url }}">{{ trackback.user_name }}</a>
	  {% trans "on" %} {{ trackback.submit_date|date:"SHORT_DATETIME_FORMAT" }}
	</div>
	<div class="span-15 last">
	  <cite>
	    {{ trackback.comment }}
	  </cite>
	</div>
      </div>
    </li>
    {% endfor %}
  </ol>
  {% endif %}
    {% if object.pingback_enabled %}
  <p>
    <a href="{% url gstudio_attributetype_trackback object.pk %}" rel="trackback">
      {% trans "Trackback URL" %}</a>
  </p>
    {% endif %}
</div>
{% endif %}
{% endwith %}
{% endblock %}

{% block attributetype-comments-form %}
{% if object.comments_are_open %}
<div class="commentForm span-16 last">
  {% render_comment_form for object %}
</div>
{% endif %}
{% endblock %}

{% endblock %}

{% block admin_tools %}
{% if perms.gstudio.change_attributetype %}
<li>
  <a href="{% url admin:gstudio_objecttype_change object.pk %}" title="{% trans "Edit the attributetype" %}">
    {% trans "Edit the node type" %}
  </a>
</li>
{% endif %}
{% endblock %}