blob: 283f9c683ac630cd2a023267de76975996d03111 (
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
282
283
284
|
{% extends "objectapp/base.html" %}
{% load i18n comments objectapp_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_gbobject as previous_gbobject %}{% if previous_gbobject %}
<link rel="prev" title="{{ previous_gbobject.title }}" href="{{ previous_gbobject.get_absolute_url }}" />
{% endif %}{% endwith %}
{% with object.next_gbobject as next_gbobject %}{% if next_gbobject %}
<link rel="next" title="{{ next_gbobject.title }}" href="{{ next_gbobject.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 objectapp_gbobject_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 objectapp_gbobject_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 objectapp_gbobject_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 objectapp_gbobject_trackback_feed year month day object.slug %}" />
{% endwith %}
{% endblock %}
{% block content %}
{% block gbobject-content %}
{% with object.html_content|safe as object_content %}
{% include "objectapp/_gbobject_detail.html" %}
<script type="text/javascript" >
var s = 0
var i
{% if object.get_rendered_nbh.plural %}
//var i = parseInt({{ object.get_rendered_nbh.count_plural }})
s = parseInt(s + 1)
{% endif %}
{% if object.get_rendered_nbh.title %}
//var i = parseInt({{ object.get_rendered_nbh.count_plural }})
s = parseInt(s + 1)
{% endif %}
{% if object.get_rendered_nbh.altnames %}
//var i = parseInt({{ object.get_rendered_nbh.count_plural }})
s = parseInt(s + 1)
{% endif %}
{% if object.get_rendered_nbh.member_of %}
//var i = parseInt({{ object.get_rendered_nbh.count_plural }})
s = parseInt(s + 1)
{% endif %}
{% if object.get_rendered_nbh.relations %}
//var i = parseInt({{ object.get_rendered_nbh.count_plural }})
s = parseInt(s + 1)
{% endif %}
{% if object.get_rendered_nbh.attributes %}
//var i = parseInt({{ object.get_rendered_nbh.count_plural }})
s = parseInt(s + 1)
{% endif %}
if ( s > 0)
{
s = parseInt(s)
//alert(s)
}
</script>
{% endwith %}
{% endblock %}
{% block gbobject-widgets %}
<div class="gbobject-widgets span-16 last">
{% with object.next_gbobject as next_gbobject %}
{% if next_gbobject %}
<div class="gbobject-next">
<h3>{% trans "Next object" %}</h3>
<ul>
<li>
<a href="{{ next_gbobject.get_absolute_url }}" title="{{ next_gbobject.title }}" rel="next">
{{ next_gbobject.title }}
</a>
</li>
</ul>
</div>
{% endif %}
{% endwith %}
{% with object.previous_gbobject as previous_gbobject %}
{% if previous_gbobject %}
<div class="gbobject-previous">
<h3>{% trans "Previous object" %}</h3>
<ul>
<li>
<a href="{{ previous_gbobject.get_absolute_url }}" title="{{ previous_gbobject.title }}" rel="prev">
{{ previous_gbobject.title }}
</a>
</li>
</ul>
</div>
{% endif %}
{% endwith %}
{% if object.related_published %}
<div class="gbobject-related">
<h3>{% trans "Related objects" %}</h3>
<ul>
{% for gbobject in object.related_published %}
<li>
<a href="{{ gbobject.get_absolute_url }}" title="{{ gbobject.title }}" rel="bookmark">{{ gbobject.title }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<div class="gbobject-similar">
<h3>{% trans "Similar objects" %}</h3>
{% get_similar_gbobjects 5 %}
</div>
</div>
{% endblock %}
<p><br/>
<b>Add Attributes: </b>
<input type="hidden" id="id_object" value="{{ object.title }}"/>
{% for i in object.getattributetypes %}
<a href="{{ get_absolute_url }}/objects/dynamicAttribute/save/{{ i }}/{{ object.title }}/">{{ i }}</a><nbsp>;
{% endfor %}
</p>
<p>
<b>Add Relations: </b>
{% for i in object.getrelationtypes %}
<a href=" {{ get_absolute_url }}/objects/dynamicRelation/displaymem/{{ i }}/{{ object.title }}/">{{ i }}</a><nbsp>;
{% endfor %}
</p>
{% block gbobject-comments %}
<div id="comments" class="span-16 last">
<h3>{% trans "Comments" %}</h3>
{% 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 gbobject-pingbacks %}
<div id="pingbacks" class="span-16 last">
<h3>{% trans "Pingbacks" %}</h3>
{% 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 gbobject-trackbacks %}
{% with object.trackbacks as trackback_list %}
{% if trackback_list.count or object.pingback_enabled %}
<div id="trackbacks" class="span-16 last">
<h3>{% trans "Trackbacks" %}</h3>
{% 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 objectapp_gbobject_trackback object.pk %}" rel="trackback">
{% trans "Trackback URL" %}</a>
</p>
{% endif %}
</div>
{% endif %}
{% endwith %}
{% endblock %}
{% block gbobject-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.objectapp.change_gbobject %}
<li>
<a href="{% url admin:objectapp_gbobject_change object.pk %}" title="{% trans "Edit the object" %}">
{% trans "Edit the object" %}
</a>
</li>
{% endif %}
{% endblock %}
|