Browse Source

New and Popular lists moved to new threads list. #180

Rafał Pitoń 12 years ago
parent
commit
87ecd88b62

+ 3 - 3
static/cranefly/css/cranefly.css

@@ -969,9 +969,9 @@ a.btn-link:hover,a.btn-link:active,a.btn-link:focus{color:#333;text-decoration:n
 .forum-subforums-list.forum-subforums-inverse .header{background-color:#333;border:1px solid #1a1a1a}.forum-subforums-list.forum-subforums-inverse .header h2{color:#eee;text-shadow:0 1px 0 #000}.forum-subforums-list.forum-subforums-inverse .header h2 small{color:#b3b3b3;text-shadow:none}
 .forum-subforums-list.forum-subforums-info .header{background-color:#3c85a3;border:1px solid #2e677e}.forum-subforums-list.forum-subforums-info .header h2{color:#fff;text-shadow:0 1px 0 #1a3946}.forum-subforums-list.forum-subforums-info .header h2 small{color:#1a3946;text-shadow:none}
 .forum-threads-list-new{background-color:#fff;border:1px solid #d5d5d5;border-radius:2px;-webkit-box-shadow:0 0 0 3px #eee;-moz-box-shadow:0 0 0 3px #eee;box-shadow:0 0 0 3px #eee;margin-bottom:20px}.forum-threads-list-new .threads-list-empty{padding:28px 0;color:#999;font-size:26.25px;text-align:center}
-.forum-threads-list-new>ul{list-style:none;margin:0}.forum-threads-list-new>ul>li{border-bottom:1px solid #d5d5d5;padding:9.9px 0;overflow:auto}.forum-threads-list-new>ul>li .thread-icon{float:left;width:39.5px;color:#d5d5d5;font-size:22px;text-align:center;text-decoration:none;margin-bottom:-1px}
-.forum-threads-list-new>ul>li .thread-body{margin:-9.9px 0;margin-left:39.5px;padding:9.9px 0}.forum-threads-list-new>ul>li .thread-body .thread-title{display:block;position:relative;top:1px}.forum-threads-list-new>ul>li .thread-body .thread-title a:link,.forum-threads-list-new>ul>li .thread-body .thread-title a:active,.forum-threads-list-new>ul>li .thread-body .thread-title a:visited,.forum-threads-list-new>ul>li .thread-body .thread-title a:hover{color:#555;font-size:17.5px}
-.forum-threads-list-new>ul>li .thread-body .thread-activity{float:right;list-style:none;margin:0;margin-top:-9.9px;padding:6px 0;padding-right:8px;overflow:auto;position:relative;top:2px;z-index:2}.forum-threads-list-new>ul>li .thread-body .thread-activity li{float:left;margin:0;margin-left:10px;padding:0}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-reported,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-moderated{position:relative;top:2px;color:#555;font-size:17.5px;font-weight:bold}
+.forum-threads-list-new>ul{list-style:none;margin:0}.forum-threads-list-new>ul>li{border-bottom:1px solid #d5d5d5;padding:9.9px 0;overflow:auto}.forum-threads-list-new>ul>li .thread-icon{float:left;height:22px;width:39.5px;color:#d5d5d5;font-size:22px;text-align:center;text-decoration:none;margin-bottom:-1px}
+.forum-threads-list-new>ul>li .thread-body{margin:-9.9px 0;margin-left:39.5px;padding:9.9px 0}.forum-threads-list-new>ul>li .thread-body .thread-title{display:block}.forum-threads-list-new>ul>li .thread-body .thread-title a:link,.forum-threads-list-new>ul>li .thread-body .thread-title a:active,.forum-threads-list-new>ul>li .thread-body .thread-title a:visited,.forum-threads-list-new>ul>li .thread-body .thread-title a:hover{color:#555;font-size:17.5px}
+.forum-threads-list-new>ul>li .thread-body .thread-activity{float:right;list-style:none;margin:0;margin-top:-9.9px;padding:6px 0;padding-right:8px;overflow:auto;position:relative;top:1px;z-index:2}.forum-threads-list-new>ul>li .thread-body .thread-activity li{float:left;margin:0;margin-left:10px;padding:0}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-reported,.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-moderated{position:relative;top:2px;color:#555;font-size:17.5px;font-weight:bold}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-reported{color:#cf402e}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies-moderated{color:#7a43b6}
 .forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies{position:relative;top:2px;color:#555;font-size:17.5px;font-weight:bold}.forum-threads-list-new>ul>li .thread-body .thread-activity li.thread-replies.thread-replies-new{color:#cf402e}

+ 2 - 3
static/cranefly/css/cranefly/forum.less

@@ -325,6 +325,7 @@
 
 			.thread-icon {
 				float: left;
+				height: @threadIconSize;
 				width: @threadIconSize + @fontSizeLarge;
 
 				color: @itemOldColor;
@@ -341,8 +342,6 @@
 
 				.thread-title {
 					display: block;
-					position: relative;
-					top: 1px;
 
 					a:link, a:active, a:visited, a:hover {
 						color: @gray;
@@ -359,7 +358,7 @@
 					padding-right: 8px;
 					overflow: auto;
 					position: relative;
-					top: 2px;
+					top: 1px;
 					z-index: 2;
 
 					li {

+ 83 - 62
templates/cranefly/new_threads.html

@@ -13,55 +13,96 @@
 
 <div class="container container-primary">
   {% if threads %}
-  <div class="forum-threads-list">
-    <div class="header">
-      <div class="row-fluid">
-        <div class="span7">{% trans %}Thread{% endtrans %}</div>
-        <div class="span5 thread-activity">
-          <div class="thread-replies">{% trans %}Activity{% endtrans %}</div>
-        </div>
-      </div>
-    </div>
-    {% for thread in threads %}
-    <div class="thread-row{% if not thread.is_read %} thread-new{% endif %}{% if loop.last %} thread-last{% endif %}">
-      <div class="row-fluid">
-        <div class="span7">
+  <div class="forum-threads-list-new">
+    <ul>
+      {% for thread in threads %}
+      <li{% if not thread.is_read %} class="thread-new"{% endif %}>
+        <div class="thread-icon">
+          {% if thread.weight == 2 %}
           {% if thread.is_read %}
-          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-circle-blank"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Announcement, click to see last post{% endtrans %}">
           {% else %}
-          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-circle"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Announcement, click to see first unread post{% endtrans %}">
+          {% endif %}
+            <i class="icon-star{% if thread.is_read %}-empty{% endif %}"></i>
+          </a>
+          {% elif thread.weight == 1 %}
+          {% if thread.is_read %}
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Pinned, click to see last post{% endtrans %}">
+          {% else %}
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Pinned, click to see first unread post{% endtrans %}">
+          {% endif %}
+            <i class="icon-bookmark{% if thread.is_read %}-empty{% endif %}"></i>
+          </a>
+          {% else %}
+          {% if thread.is_read %}
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}">
+          {% else %}
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}">
+          {% endif %}
+            <i class="icon-circle{% if thread.is_read %}-blank{% endif %}"></i>
+          </a>
           {% endif %}
-
-          <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="thread-name">{{ thread.name }}</a>
-
-          {{ macros.thread_flags(thread) }}
-
-          <div class="thread-details">
-            {% trans user=thread_starter(thread), forum=thread_forum(thread), start=thread.start|reltimesince|low %}by {{ user }} in {{ forum }} {{ start }}{% endtrans %}
-          </div>
-
         </div>
-        <div class="span5 thread-activity">
-
-          {% if settings.avatars_on_threads_list %}
-          <div class="thread-last-avatar">
-            {% if thread.last_poster_id %}
-            <a href="{{ url('user', user=thread.last_poster.pk, username=thread.last_poster.username_slug) }}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
-            {% else %}
-            <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
+        <div class="thread-body">
+          <ul class="thread-activity">
+            {% if thread.replies_reported %}
+            <li class="thread-replies-reported tooltip-top" title="{% trans %}Reported replies{% endtrans %}">
+              {{ thread.replies_reported|intcomma }}
+            </li>
             {% endif %}
+            {% if thread.replies_moderated %}
+            <li class="thread-replies-moderated tooltip-top" title="{% trans %}Unreviewed replies{% endtrans %}">
+              {{ thread.replies_moderated|intcomma }}
+            </li>
+            {% endif %}
+            {% if thread.replies %}
+            <li class="thread-replies{% if not thread.is_read%} thread-replies-new{% endif %} tooltip-top" title="{% trans %}Replies{% endtrans %}">
+              {{ thread.replies|intcomma }}
+            </li>
+            {% endif %}
+            <li class="thread-last-reply tooltip-top" title="{% trans last=thread.last|reldate %}Last post {{ last }}{% endtrans %}">
+              <a href="{{ url('thread_last', thread=thread.pk, slug=thread.slug) }}">{{ thread.last|relcompact }}</a>
+            </li>
+            {% if thread.start_poster_name != thread.last_poster_name %}
+            <li class="thread-author tooltip-top" title="{% trans username=thread.start_poster_name %}Thread by {{ username }}{% endtrans %}">
+              {% if thread.start_poster_id %}
+              <a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_name) }}">{% if settings.avatars_on_threads_list %}<img src="{{ thread.start_poster.get_avatar(18) }}" alt="{{ thread.start_poster_name }}" class="user-avatar">{% else %}{{ thread.start_poster_name }}{% endif %}</a>
+              {% else %}
+              {% if settings.avatars_on_threads_list %}<img src="{{ macros.avatar_guest(24) }}" alt="{{ thread.start_poster_name }}" class="user-avatar">{% else %}{{ thread.start_poster_name }}{% endif %}
+              {% endif %}
+            </li>
+            {% endif %}
+            <li class="thread-poster tooltip-top" title="{% if thread.start_poster_name != thread.last_poster_name %}{% trans username=thread.last_poster_name %}Last reply by {{ username }}{% endtrans %}{% else %}{% trans username=thread.last_poster_name %}Thread and last post by {{ username }}{% endtrans %}{% endif %}">
+              {% if thread.last_poster_id %}
+              <a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_name) }}">{% if settings.avatars_on_threads_list %}<img src="{{ thread.last_poster.get_avatar(18) }}" alt="{{ thread.last_poster_name }}" class="user-avatar">{% else %}{{ thread.last_poster_name }}{% endif %}</a>
+              {% else %}
+              {% if settings.avatars_on_threads_list %}<img src="{{ macros.avatar_guest(24) }}" alt="{{ thread.last_poster_name }}" class="user-avatar">{% else %}{{ thread.last_poster_name }}{% endif %}
+              {% endif %}
+            </li>
+            {% if thread.moderated %}
+            <li class="thread-flag thread-moderated tooltip-top" title="{% trans %}This thread awaits review{% endtrans %}">
+              <i class="icon-remove-circle"></i>
+            </li>
+            {% endif %}
+            {% if thread.closed %}
+            <li class="thread-flag thread-closed tooltip-top" title="{% trans %}This thread is closed{% endtrans %}">
+              <i class="icon-remove-circle"></i>
+            </li>
+            {% endif %}
+            {% if thread.deleted %}
+            <li class="thread-flag thread-deleted tooltip-top" title="{% trans %}This thread is deleted{% endtrans %}">
+              <i class="icon-trash"></i>
+            </li>
+            {% endif %}
+          </ul>
+          <div class="thread-title">
+            <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a>
           </div>
-          {% endif %}
-
-          <div class="thread-replies">
-            <strong class="lead">{{ thread_reply(thread) }}, {{ thread.last|reldate|low }}</strong><br>
-            {{ replies(thread.replies) }}, <span{% if (thread.upvotes-thread.downvotes) > 0 %} class="text-success"{% elif (thread.upvotes-thread.downvotes) < 0 %} class="text-error"{% endif %}><strong>{% if (thread.upvotes-thread.downvotes) > 0 %}+{% elif (thread.upvotes-thread.downvotes) < 0 %}-{% endif %}</strong>{% trans rating=(thread.upvotes-thread.downvotes)|abs|intcomma %}{{ rating }} thread rating{% endtrans %}</span>
-          </div>
-
         </div>
-      </div>
-    </div>
-    {% endfor %}
+      </li>
+      {% endfor %}
+    </ul>
   </div>
   {{ pager() }}
   {% else %}
@@ -71,26 +112,6 @@
 {% endblock %}
 
 
-{% macro replies(thread_replies) -%}
-{% trans count=thread_replies, replies=thread_replies|intcomma -%}
-{{ replies }} reply
-{%- pluralize -%}
-{{ replies }} replies
-{%- endtrans %}
-{%- endmacro %}
-
-{% macro thread_starter(thread) -%}
-{% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
-{%- endmacro %}
-
-{% macro thread_forum(thread) -%}
-<a href="{{ url('forum', forum=thread.forum_id, slug=thread.forum.slug) }}" class="forum-link">{{ thread.forum.name }}</a>
-{%- endmacro %}
-
-{% macro thread_reply(thread) -%}
-{% if thread.last_poster_id %}<a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_slug) }}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
-{%- endmacro %}
-
 {% macro pager() -%}
 {% if items_total > 0 and pagination['total'] > 1 %}
 <div class="pagination">

+ 83 - 62
templates/cranefly/popular_threads.html

@@ -13,55 +13,96 @@
 
 <div class="container container-primary">
   {% if threads %}
-  <div class="forum-threads-list">
-    <div class="header">
-      <div class="row-fluid">
-        <div class="span7">{% trans %}Thread{% endtrans %}</div>
-        <div class="span5 thread-activity">
-          <div class="thread-replies">{% trans %}Activity{% endtrans %}</div>
-        </div>
-      </div>
-    </div>
-    {% for thread in threads %}
-    <div class="thread-row{% if not thread.is_read %} thread-new{% endif %}{% if loop.last %} thread-last{% endif %}">
-      <div class="row-fluid">
-        <div class="span7">
+  <div class="forum-threads-list-new">
+    <ul>
+      {% for thread in threads %}
+      <li{% if not thread.is_read %} class="thread-new"{% endif %}>
+        <div class="thread-icon">
+          {% if thread.weight == 2 %}
           {% if thread.is_read %}
-          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-circle-blank"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Announcement, click to see last post{% endtrans %}">
           {% else %}
-          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-circle"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Announcement, click to see first unread post{% endtrans %}">
+          {% endif %}
+            <i class="icon-star{% if thread.is_read %}-empty{% endif %}"></i>
+          </a>
+          {% elif thread.weight == 1 %}
+          {% if thread.is_read %}
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Pinned, click to see last post{% endtrans %}">
+          {% else %}
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Pinned, click to see first unread post{% endtrans %}">
+          {% endif %}
+            <i class="icon-bookmark{% if thread.is_read %}-empty{% endif %}"></i>
+          </a>
+          {% else %}
+          {% if thread.is_read %}
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}">
+          {% else %}
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}">
+          {% endif %}
+            <i class="icon-circle{% if thread.is_read %}-blank{% endif %}"></i>
+          </a>
           {% endif %}
-
-          {{ macros.thread_flags(thread) }}
-
-          <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="thread-name">{{ thread.name }}</a>
-
-          <div class="thread-details">
-            {% trans user=thread_starter(thread), forum=thread_forum(thread), start=thread.start|reltimesince|low %}by {{ user }} in {{ forum }} {{ start }}{% endtrans %}
-          </div>
-
         </div>
-        <div class="span5 thread-activity">
-
-          {% if settings.avatars_on_threads_list %}
-          <div class="thread-last-avatar">
-            {% if thread.last_poster_id %}
-            <a href="{{ url('user', user=thread.last_poster.pk, username=thread.last_poster.username_slug) }}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
-            {% else %}
-            <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
+        <div class="thread-body">
+          <ul class="thread-activity">
+            {% if thread.replies_reported %}
+            <li class="thread-replies-reported tooltip-top" title="{% trans %}Reported replies{% endtrans %}">
+              {{ thread.replies_reported|intcomma }}
+            </li>
             {% endif %}
+            {% if thread.replies_moderated %}
+            <li class="thread-replies-moderated tooltip-top" title="{% trans %}Unreviewed replies{% endtrans %}">
+              {{ thread.replies_moderated|intcomma }}
+            </li>
+            {% endif %}
+            {% if thread.replies %}
+            <li class="thread-replies{% if not thread.is_read%} thread-replies-new{% endif %} tooltip-top" title="{% trans %}Replies{% endtrans %}">
+              {{ thread.replies|intcomma }}
+            </li>
+            {% endif %}
+            <li class="thread-last-reply tooltip-top" title="{% trans last=thread.last|reldate %}Last post {{ last }}{% endtrans %}">
+              <a href="{{ url('thread_last', thread=thread.pk, slug=thread.slug) }}">{{ thread.last|relcompact }}</a>
+            </li>
+            {% if thread.start_poster_name != thread.last_poster_name %}
+            <li class="thread-author tooltip-top" title="{% trans username=thread.start_poster_name %}Thread by {{ username }}{% endtrans %}">
+              {% if thread.start_poster_id %}
+              <a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_name) }}">{% if settings.avatars_on_threads_list %}<img src="{{ thread.start_poster.get_avatar(18) }}" alt="{{ thread.start_poster_name }}" class="user-avatar">{% else %}{{ thread.start_poster_name }}{% endif %}</a>
+              {% else %}
+              {% if settings.avatars_on_threads_list %}<img src="{{ macros.avatar_guest(24) }}" alt="{{ thread.start_poster_name }}" class="user-avatar">{% else %}{{ thread.start_poster_name }}{% endif %}
+              {% endif %}
+            </li>
+            {% endif %}
+            <li class="thread-poster tooltip-top" title="{% if thread.start_poster_name != thread.last_poster_name %}{% trans username=thread.last_poster_name %}Last reply by {{ username }}{% endtrans %}{% else %}{% trans username=thread.last_poster_name %}Thread and last post by {{ username }}{% endtrans %}{% endif %}">
+              {% if thread.last_poster_id %}
+              <a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_name) }}">{% if settings.avatars_on_threads_list %}<img src="{{ thread.last_poster.get_avatar(18) }}" alt="{{ thread.last_poster_name }}" class="user-avatar">{% else %}{{ thread.last_poster_name }}{% endif %}</a>
+              {% else %}
+              {% if settings.avatars_on_threads_list %}<img src="{{ macros.avatar_guest(24) }}" alt="{{ thread.last_poster_name }}" class="user-avatar">{% else %}{{ thread.last_poster_name }}{% endif %}
+              {% endif %}
+            </li>
+            {% if thread.moderated %}
+            <li class="thread-flag thread-moderated tooltip-top" title="{% trans %}This thread awaits review{% endtrans %}">
+              <i class="icon-remove-circle"></i>
+            </li>
+            {% endif %}
+            {% if thread.closed %}
+            <li class="thread-flag thread-closed tooltip-top" title="{% trans %}This thread is closed{% endtrans %}">
+              <i class="icon-remove-circle"></i>
+            </li>
+            {% endif %}
+            {% if thread.deleted %}
+            <li class="thread-flag thread-deleted tooltip-top" title="{% trans %}This thread is deleted{% endtrans %}">
+              <i class="icon-trash"></i>
+            </li>
+            {% endif %}
+          </ul>
+          <div class="thread-title">
+            <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a>
           </div>
-          {% endif %}
-
-          <div class="thread-replies">
-            <strong class="lead">{{ thread_reply(thread) }}, {{ thread.last|reldate|low }}</strong><br>
-            {{ replies(thread.replies) }}, <span{% if (thread.upvotes-thread.downvotes) > 0 %} class="text-success"{% elif (thread.upvotes-thread.downvotes) < 0 %} class="text-error"{% endif %}><strong>{% if (thread.upvotes-thread.downvotes) > 0 %}+{% elif (thread.upvotes-thread.downvotes) < 0 %}-{% endif %}</strong>{% trans rating=(thread.upvotes-thread.downvotes)|abs|intcomma %}{{ rating }} thread rating{% endtrans %}</span>
-          </div>
-
         </div>
-      </div>
-    </div>
-    {% endfor %}
+      </li>
+      {% endfor %}
+    </ul>
   </div>
   {{ pager() }}
   {% else %}
@@ -71,26 +112,6 @@
 {% endblock %}
 
 
-{% macro replies(thread_replies) -%}
-{% trans count=thread_replies, replies=thread_replies|intcomma -%}
-{{ replies }} reply
-{%- pluralize -%}
-{{ replies }} replies
-{%- endtrans %}
-{%- endmacro %}
-
-{% macro thread_starter(thread) -%}
-{% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
-{%- endmacro %}
-
-{% macro thread_forum(thread) -%}
-<a href="{{ url('forum', forum=thread.forum_id, slug=thread.forum.slug) }}" class="forum-link">{{ thread.forum.name }}</a>
-{%- endmacro %}
-
-{% macro thread_reply(thread) -%}
-{% if thread.last_poster_id %}<a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_slug) }}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
-{%- endmacro %}
-
 {% macro pager() -%}
 {% if items_total > 0 and pagination['total'] > 1 %}
 <div class="pagination">

+ 0 - 76
templates/cranefly/threads/list.html

@@ -222,82 +222,6 @@
     </div>
     {% endif %}
   </div>
-
-  {# START OLD THREADS
-  <div class="forum-threads-list">
-    <div class="header">
-      <div class="row-fluid">
-        <div class="span7">{% trans %}Thread{% endtrans %}</div>
-        <div class="span5 thread-activity">
-          <div class="thread-replies">{% trans %}Activity{% endtrans %}</div>
-          {% if user.is_authenticated() and list_form %}
-          <div class="pull-right check-cell">
-            <label class="checkbox"><input type="checkbox" class="checkbox-master"></label>
-          </div>
-          {% endif %}
-        </div>
-      </div>
-    </div>
-    {% for thread in threads %}
-    <div class="thread-row{% if not thread.is_read %} thread-new{% endif %}{% if loop.last %} thread-last{% endif %}">
-      <div class="row-fluid">
-        <div class="span7">
-          {% if thread.is_read %}
-          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-circle-blank"></i></a>
-          {% else %}
-          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-circle"></i></a>
-          {% endif %}
-
-          {{ macros.thread_flags(thread) }}
-
-          <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="thread-name{% if thread.name|length > 70 %} tooltip-top" title="{{ thread.name }}{% endif %}">{{ thread.name }}</a>
-
-          <div class="thread-details">
-            {% trans user=thread_starter(thread), start=thread.start|reldate|low %}by {{ user }}, {{ start }}{% endtrans %}
-          </div>
-
-        </div>
-        <div class="span5 thread-activity">
-
-          {% if settings.avatars_on_threads_list %}
-          <div class="thread-last-avatar">
-            {% if thread.last_poster_id %}
-            <a href="{{ url('user', user=thread.last_poster.pk, username=thread.last_poster.username_slug) }}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
-            {% else %}
-            <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
-            {% endif %}
-          </div>
-          {% endif %}
-
-          <div class="thread-replies">
-            <strong class="lead">{{ thread_reply(thread) }}, {{ thread.last|reldate|low }}</strong><br>
-            {{ replies(thread.replies) }}, <span{% if (thread.upvotes-thread.downvotes) > 0 %} class="text-success"{% elif (thread.upvotes-thread.downvotes) < 0 %} class="text-error"{% endif %}><strong>{% if (thread.upvotes-thread.downvotes) > 0 %}+{% elif (thread.upvotes-thread.downvotes) < 0 %}-{% endif %}</strong>{% trans rating=(thread.upvotes-thread.downvotes)|abs|intcomma %}{{ rating }} thread rating{% endtrans %}</span>
-          </div>
-
-          {% if user.is_authenticated() and list_form %}
-          <label class="thread-select checkbox"><input form="threads_form" name="{{ list_form['list_items']['html_name'] }}" type="checkbox" class="checkbox-member" value="{{ thread.pk }}"{% if list_form['list_items']['has_value'] and ('' ~ thread.pk) in list_form['list_items']['value'] %} checked="checked"{% endif %}></label>
-          {% endif %}
-        </div>
-      </div>
-    </div>
-    {% else %}
-    <div class="thread-row threads-list-empty">
-      {% trans %}There are no threads in this forum.{% endtrans %}
-    </div>
-    {% endfor %}
-
-    {% if user.is_authenticated() and list_form %}
-    <div class="threads-actions">
-      <form id="threads_form" class="form-inline pull-right" action="{{ request_path }}" method="POST">
-        <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
-        {{ form_theme.field(list_form.list_action, attrs={'class': 'span3'}) }}
-        <button type="submit" class="btn btn-danger">{% trans %}Go{% endtrans %}</button>
-      </form>
-    </div>
-    {% endif %}
-  </div>
-  END OLD THREADS #}
-
   <div class="forum-threads-extra">
     {{ pager() }}
     {% if user.is_authenticated() and acl.threads.can_start_threads(forum) %}