Anonymous avatar Anonymous committed 6e9484a

[project @ 374]
- Made all 'popular tag' sections display top X tags by popularity,
but sorted alphabetically.
- HTML and CSS tweaks

Comments (0)

Files changed (3)

cciw/cciwmain/views/tagging.py

     
     return tagging_views.recent_popular(request, creator=member, template_name="cciw/tags/index.html",
                 extra_context=extra_context, paginate_by=TAG_PAGINGATE_BY,
-                extra_handler=feed_handler)
+                extra_handler=feed_handler, popular_tags_order='count')
 
 def members_tags_single_text(request, user_name, text):
     try:
 {
 	color: #c0c0c0;
 }
+div.tagdetail
+{
+	padding-top: .8em;
+	padding-bottom: .8em;
+	border-bottom: 1px solid #663300;
+}
+
 
 /************************** END COLOURS *******************/
 

templates/cciw/tags/index.html

 <h2>Recent</h2>
 {% if object_list %}
 	{% for tag in object_list %}
-		<div>
+		<div class="tagdetail">
 		{% if showtagtarget %}
 		<span class="tagtitle">{{ tag.render }}</span> 
 		<span class="seealltags"><a class="tagcount" href="/tag_targets/{{ tag.target_ct.name }}/{{ tag.target_id }}/">View all tags</a> {% add_tag_link for tag.target %}</span>
 		{% if showtagcounts %}
 			 <a class="tagcount" href="/tag_targets/{{ tag.target_ct.name }}/{{ tag.target_id }}/{{ tag.text }}/" title="Details for tag '{{ tag.text }}'">x{{ tag.count_tagged_with_text }}</a>
 		{% endif %}
-		</div><br/>
+		</div>
 	{% endfor %}
 {% else %}
 	<p>No tags found.</p>
 		{% else %}
 		<h2>Popular</h2>
 		{% endif %}
-		{% for tag in popular_tags %}
+		{% for tag in popular_tags|dictsort:"text" %}
 			<span class="tag weight{{ tag.weight }}"><a href="{{ tag_href_prefix }}{{ tag.text }}/">{{ tag.text }}</a></span>&nbsp;
 		{% endfor %}
 		<br/><br/>
 <br/>
 {% endif %}
 
-<h2>Search all tags</h2>
+<h2>Search tags</h2>
 <div>
 <form method='get' action='/tag_search/'>
 <p><label>Text: <input type='text' name='search' id='search' /></label>
 </div>
 
 
-{% endblock %}
+{% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.