[d34684]: / ForgeDiscussion / forgediscussion / templates / discussionforums / index.html  Maximize  Restore  History

Download this file

108 lines (97 with data), 3.5 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
 99
100
101
102
103
104
105
106
107
{#-
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-#}
{% extends g.theme.master %}
{% from 'allura:templates/jinja_master/lib.html' import canonical_tag %}
{% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}}{% endblock %}
{%- block head -%}
{% if noindex %}
<meta name="robots" content="noindex, follow">
{% endif %}
{{ canonical_tag() }}
{%- endblock -%}
{% block header %}{{c.app.config.options.mount_label}}{% endblock %}
{% block actions %}
{{ g.icons['feed'].render(href='feed.rss', extra_css='follow', title='Follow', rel='nofollow') }}
{% endblock %}
{% if h.has_access(c.app, 'configure') and (not hide_forum) %}
{% block edit_box %}
<div id="add_forum_form"{% if hide_forum %} style="display:none"{% endif %} class="editbox">
{{c.add_forum.display(method='POST', action=c.project.url() + c.app.config.options.mount_point + '/add_forum_short', app=c.app)}}
</div>
{% endblock %}
{% endif %}
{% block content %}
{% if announcements %}
<h3>Announcements</h3>
{{c.announcements_table.display(value=announcements)}}
{% endif %}
{% set visible=0 %}
<table id="discussion-forums">
<thead>
<tr>
<th>FORUM</th>
<th>LATEST POST</th>
<th># TOPICS</th>
</tr>
</thead>
<tbody>
{% for forum in forums %}
<tr>
<td>
<strong><a href="{{forum.url()}}">{{forum.name}}</a></strong><br>
{{g.markdown.cached_convert(forum, 'description')}}
{% if forum.deleted %}
<div class="notice">This forum has been deleted and is not visible to non-admin users</div>
{% endif %}
</td>
<td>
{% if forum.last_post %}
<a href="{{forum.last_post.url_paginated()}}">{{h.text.truncate(h.really_unicode(forum.last_post.subject or '(no subject)'),75)}}</a><br>
by {{lib.user_link(forum.last_post.author())}}<br>
{{h.ago(forum.last_post.mod_date)}}
{% else %}
No posts yet
{% endif %}
</td>
<td class="count">
<span class="forum-topic-count">{{forum.num_topics}}</span>
</td>
</tr>
{% else %}
<tr>
<td colspan="3">No forums exist.</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
{% block extra_js %}
{% if h.has_access(c.app, 'configure') %}
<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 %}