Parent: [462c18] (diff)

Child: [3b4ee4] (diff)

Download this file

index.html    82 lines (76 with data), 2.8 kB

 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
{% extends g.theme.master %}
{% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / Forums{% endblock %}
{% block header %}{{c.app.config.options.mount_label}}{% endblock %}
{% if h.has_artifact_access('configure', app=c.app)() and (not hide_forum) %}
{% block edit_box %}
<div id="add_forum_form"{% if hide_forum %} style="display:none"{% endif %} class="editbox">
<form method="POST" enctype="multipart/form-data" id="new_forum_form"
action="{{c.project.url()}}admin/{{c.app.config.options.mount_point}}/update_forums">
<div class="grid-9">
<label class="cr">Name:</label>
<input type="text" name="new_forum.name" class="wide"/>
</div>
<div class="grid-9">
<label class="cr">Summary:</label>
<input type="text" name="new_forum.description" class="wide"/>
</div>
<div style="clear:both">&nbsp;</div>
<div class="grid-19">
<input type="submit" id="new_forum.create" name="new_forum.create" value="Save"/>
<input type="button" id="add_forum_cancel" value="Cancel"/>
</div>
</form>
</div>
{% endblock %}
{% endif %}
{% block content %}
{% if announcements %}
<h3>Announcements</h3>
{{c.announcements_table.display(value=announcements)}}
{% endif %}
{% set visible=0 %}
{% for forum in forums %}
{% if not forum.deleted or h.has_artifact_access('configure', app=c.app)() %}
<div class="discussion_forum grid-9">
<strong class="forum_name">{{forum.name}}:</strong> {{forum.description}}<br/>
{% if forum.deleted %}
<div class="notice">This forum has been deleted and is not visible to non-admin users</div>
{% endif %}
{% for thread in threads[forum._id] %}
{% if loop.index0 == 5 %}
<a href="{{forum.url()}}">More</a>
{% else %}
<p>{{thread.num_replies}} posts to <a href="{{thread.url()}}">{{h.text.truncate(h.really_unicode(thread.subject or '(no subject)'),75)}}</a></p>
{% endif %}
{% endfor %}
</div>
{% set visible = visible + 1 %}
{% if visible%2==0 %}
<div class="clear">&nbsp;</div>
{% endif %}
{% endif %}
{% endfor %}
{% endblock %}
{% block extra_js %}
{% if h.has_artifact_access('configure', app=c.app)() %}
<script type="text/javascript">
$(function() {
$("#add_forum").click(function(){
$("div.editbox").show();
return false;
});
$("#add_forum_cancel").click(function(){
$("div.editbox").hide();
return false;
});
});
</script>
{% endif %}
{% endblock %}
{% block extra_css %}
<style type="text/css">
.forum_name{
font-size: 1.2em;
}
</style>
{% endblock %}