Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[c83adb]: ForgeDiscussion / forgediscussion / templates / discussionforums / admin_forums.html Maximize Restore History

Download this file

admin_forums.html    98 lines (94 with data), 3.6 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{% extends g.theme.master %}
{% block title %}{{c.project.name}} / {{app.config.options.mount_label}} / Admin Forums{% endblock %}
{% block header %}{{app.config.options.mount_label}} Admin Forums{% endblock %}
{% block content %}
<div class="grid-20">
<form method="POST" action="update_forums" enctype="multipart/form-data">
<table id="forums">
<thead>
<tr>
<th></th>
<th>Forum</th><th>Topics</th><th>Posts</th><th>Last Post</th>
<th></th>
</tr>
</thead>
<tbody>
{% for forum in app.forums %}
<tr class="{{loop.index0%2 and ' even' or ''}}">
<td>
<div class="editable viewing">
<span class="viewer">
{% if forum.icon %}
<img src="{{forum.url()}}/icon" alt="Forum icon"/>
{% else %}
<img src="{{g.forge_static('images/project_default.png')}}" alt="Forum icon"/>
{% endif %}
</span>
<span class="editor">{{lib.file_field('forum-%s.icon' % loop.index0, '')}}</span>
</div>
</td>
<td>
<div class="editable viewing">
<span class="viewer"><a href="{{forum.url()}}">{{h.really_unicode(forum.name)}}</a></span>
<span class="editor">
{{lib.text_field('forum-%s.name' % loop.index0, 'Forum Title', h.really_unicode(forum.name))}}
</span>
</div>
<div class="editable viewing">
<span class="viewer">{{h.really_unicode(forum.shortname)}}</span>
<span class="editor">
{{lib.text_field('forum-%s.shortname' % loop.index0, 'Forum Short Name', h.really_unicode(forum.shortname))}}
</span>
</div>
<div class="editable viewing">
<div class="viewer">{{g.markdown.convert(forum.description)|safe}}</div>
<span class="editor multiline">
{{lib.text_area('forum-%s.description' % loop.index0, 'Description', h.really_unicode(forum.description))}}
</span>
</div>
{% if forum.subforums %}
<b>Subforums:</b>
{% for sf in forum.subforums %}
<span>
{% if loop.index1 != 0 %}, {% endif %}
<a href="{{sf.url()}}">{{sf.name}}</a>
</span>
{% endfor %}
{% endif %}
</td>
<td>{{forum.num_topics}}</td>
<td>{{forum.num_posts}}</td>
<td>{{lib.post_summary(forum.last_post)}}</td>
<td>
<input name="{{'forum-%s.id' % loop.index0}}" type="hidden" value="{{forum._id}}"/>
{% if forum.deleted %}
<input type="submit" name="{{'forum-%s.undelete' % loop.index0}}" value="Undelete"/><br/>
{% else %}
<input type="submit" name="{{'forum-%s.delete' % loop.index0}}" value="Delete"/><br/>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="grid-19"><input type="button" id="add_forum" value="Add another forum"></div>
</form>
{{c.add_forum.display(method='POST',action='add_forum',app=app, value=add_forum)}}
</div>
{% endblock %}
{% block extra_js %}
<script type="text/javascript">
$(function() {
$("#add_forum").click(function(){
$("#add_forum_form").show();
$(this).hide();
return false;
});
$("#add_forum_cancel").click(function(){
$("#add_forum_form").hide();
$("#add_forum").show();
return false;
});
});
</script>
{% endblock %}