Commits

chrislawlor  committed f6eadc7

plugin list no longer shows sidebar for wider display

  • Participants
  • Parent commits bbf8719

Comments (0)

Files changed (7)

File murphy/management/commands/generate_data.py

             release.save()
             
             # create download activity
-            for i in range(0,10):
+            num_downloads = random.randint(0,20)
+            for i in range(0,num_downloads):
                 
                 dl = Download(user=get_random_from(users),
                               date=get_random_date(max_days_ago=(now - release.pub_date).days),

File murphy/urls/popular.py

         object_list,
         dict(plugins_by_total_downloads,
              paginate_by=30,
-             template_name='murphy/plugin_list_rating.html',
+             template_name='murphy/plugin_list_downloads.html',
              extra_context={'show_dl_info': True}),
         name="plugins_by_total_downloads"
     ),

File templates/base.html

 <!-- start page -->
 <div id="page">
 	<!-- start sidebar -->
+	{% block entire_sidebar %}
 	<div id="sidebar">
 	    <ul>
 	    <li id="search">
 	    {% block sidebar %}{% endblock %}
 	    </ul>
 	</div>
+	{% endblock entire_sidebar %}
 	<!-- end sidebar -->
 	<!-- start content -->
 	<div id="content">

File templates/murphy/base_list.html

 {%  block head %}
 <style type='text/css'>
 
+#content {
+    margin-right: 50px;
+}
+
 #previous {
     float: left;
 }
 {% for object in object_list %}
 <tr>
     <td><a href="{{ object.get_absolute_url }}">{{ object.title }} {{ object.latest_release_version }}</a></td>
-    <td>{{ object.latest_release_date|naturalday:"d M Y" }}</td>
-    <td>{{ object.rating.score }}</td>
+    <td width="80">{{ object.latest_release_date|naturalday:"d M Y" }}</td>
+    <td width="50">{{ object.rating.score }}</td>
     {% if show_dl_info %}
-    <td>{{ object.dl_total }}</td>
+    <td width="50">{{ object.dl_total }}</td>
     {% endif %}
     <td>{% ifequal object.release_count 1 %}<strong>First Release!!</strong>{% endifequal %}
     {{ object.summary}}</td>
 </table>
 {% endblock %}
 </div>
-{% endblock main_content %}
+{% endblock main_content %}
+
+{% comment %} Suppress the sidebar {% endcomment %}
+{% block entire_sidebar %}{% endblock %}

File templates/murphy/plugin_list.html

 {% block list_options %}
 <p>Show: <a href="{% url plugins_by_rating %}">Highest Rated</a> |
 <a href="{% url plugins_by_total_downloads %}">Most Downloaded</a></p>
-{% endblock %}
-    
-{% block sidebar %}
-<li>
-	<h2>Subscribe</h2>
-	<ul>
-		<li><a class="rss" title="Subscribe to the latest releases RSS feed"
-				 href="/feeds/rss/releases">RSS Feed</a></li>
-		<li><a class="rss" title="Subscribe to the latest releases Atom feed"
-				 href="/feeds/atom/releases">Atom Feed</a></li>
-				 	
-	</ul>
-</li>
 {% endblock %}

File templates/murphy/plugin_list_downloads.html

-{% extends 'murphy/plugin_list.html' %}
+{% extends 'murphy/base_list.html' %}
 {% block title %}Most Downloaded Plugins{% endblock %}
 {% block page_title %}Most Downloaded Plugins{% endblock %}
 {% block list_options %}

File templates/murphy/plugin_list_rating.html

-{% extends 'murphy/plugin_list.html' %}
+{% extends 'murphy/base_list.html' %}
 {% block title %}Plugins by Rating{% endblock %}
 {% block page_title %}Plugins by Rating{% endblock %}
 {% block list_options %}