damned-lies r1105 - in branches/djamnedlies/templates: . stats



Author: stephaner
Date: Sun Oct 26 12:05:37 2008
New Revision: 1105
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1105&view=rev

Log:
2008-10-26  StÃphane Raimbault  <stephane raimbault gmail com>

	* TODO: Add some items
	* stats/models.py: Add some get_absolute_url. Don't escape release
	name with PostgreSQL.	
	* stats/urls.py: Add explicit names.
	* stats/views.py: Remove all webroot except one.
	* templates/*.html: Get rid of webroot with url filter or
	get_absolute_url.  Use the Django convention to name the template
	files.
	* urls.py: Define the index view.


Added:
   branches/djamnedlies/templates/language_list.html
      - copied, changed from r1103, /branches/djamnedlies/templates/list-languages.html
   branches/djamnedlies/templates/language_release.html
      - copied, changed from r1103, /branches/djamnedlies/templates/language-release.html
   branches/djamnedlies/templates/language_release_stats.html
      - copied unchanged from r1103, /branches/djamnedlies/templates/language-release-stats.html
   branches/djamnedlies/templates/module_images.html
      - copied unchanged from r1103, /branches/djamnedlies/templates/module-images.html
   branches/djamnedlies/templates/module_list.html
      - copied unchanged from r1103, /branches/djamnedlies/templates/list-modules.html
   branches/djamnedlies/templates/person_base.html
      - copied unchanged from r1103, /branches/djamnedlies/templates/person-base.html
   branches/djamnedlies/templates/release_list.html
      - copied unchanged from r1103, /branches/djamnedlies/templates/list-releases.html
   branches/djamnedlies/templates/stats_show.html
      - copied unchanged from r1103, /branches/djamnedlies/templates/show-stats.html
   branches/djamnedlies/templates/team_detail.html
      - copied, changed from r1103, /branches/djamnedlies/templates/team.html
   branches/djamnedlies/templates/team_list.html
      - copied unchanged from r1103, /branches/djamnedlies/templates/list-teams.html
Removed:
   branches/djamnedlies/templates/language-release-stats.html
   branches/djamnedlies/templates/language-release.html
   branches/djamnedlies/templates/list-languages.html
   branches/djamnedlies/templates/list-modules.html
   branches/djamnedlies/templates/list-releases.html
   branches/djamnedlies/templates/list-teams.html
   branches/djamnedlies/templates/module-images.html
   branches/djamnedlies/templates/person-base.html
   branches/djamnedlies/templates/show-stats.html
   branches/djamnedlies/templates/team.html
Modified:
   branches/djamnedlies/templates/base.html
   branches/djamnedlies/templates/index.html
   branches/djamnedlies/templates/module.html
   branches/djamnedlies/templates/people.html
   branches/djamnedlies/templates/release.html
   branches/djamnedlies/templates/stats/person_detail.html

Modified: branches/djamnedlies/templates/base.html
==============================================================================
--- branches/djamnedlies/templates/base.html	(original)
+++ branches/djamnedlies/templates/base.html	Sun Oct 26 12:05:37 2008
@@ -54,28 +54,28 @@
 {% ifequal pageSection "home" %}
 	  class="selected"
 {% endifequal %}
-            ><a href="{{ webroot }}/" title="{% trans "Back to Damned Lies home page" %}"><span>{% trans "Home" %}</span></a>
+            ><a href="{% url home %}" title="{% trans "Back to Damned Lies home page" %}"><span>{% trans "Home" %}</span></a>
           </li>
 	  <li
 {% ifequal pageSection "teams" %}
 	  class="selected"
 {% endifequal %}
-	   ><a href="{{ webroot }}/teams/"><span>{% trans "Teams" %}</span></a></li>
+	   ><a href="{% url teams %}"><span>{% trans "Teams" %}</span></a></li>
 	  <li
 {% ifequal pageSection "languages" %}
 	  class="selected"
 {% endifequal %}
-	   ><a href="{{ webroot }}/languages/"><span>{% trans "Languages" %}</span></a></li>
+	   ><a href="{% url languages %}"><span>{% trans "Languages" %}</span></a></li>
 	  <li
 {% ifequal pageSection "releases" %}
 	  class="selected"
 {% endifequal %}
-	   ><a href="{{ webroot }}/releases/"><span>{% trans "Release sets" %}</span></a></li>
+	   ><a href="{% url releases %}"><span>{% trans "Release sets" %}</span></a></li>
 	  <li
 {% ifequal pageSection "module" %}
 	  class="selected"
 {% endifequal %}
-	   ><a href="{{ webroot }}/module/"><span>{% trans "Modules" %}</span></a></li>
+	   ><a href="{% url modules %}"><span>{% trans "Modules" %}</span></a></li>
         </ul>
       </div> <!-- end of #tabs -->
     </div> <!-- end of #header -->

Modified: branches/djamnedlies/templates/index.html
==============================================================================
--- branches/djamnedlies/templates/index.html	(original)
+++ branches/djamnedlies/templates/index.html	Sun Oct 26 12:05:37 2008
@@ -10,20 +10,20 @@
 
 <table><tr><td width="50%" valign="top">
 
-<h2><a href="teams/">{% trans "Teams" %}</a></h2>
+<h2><a href="{% url teams %}">{% trans "Teams" %}</a></h2>
 <p>{% trans "List of all GNOME Translation Teams, with full information such as primary contact (coordinator), web pages and mailing list information." %}
   {% trans "If there is no team for your language, you can easily <a href='http://live.gnome.org/TranslationProject/StartingATeam/'>start your own team</a>." %}
 </p>
 
 </td><td valign="top">
 
-<h2><a href="languages/">{% trans "Languages" %}</a></h2>
-<p>{% trans "List of all languages there are <a href='teams/'>Translation Teams</a> for." %}
+<h2><a href="{% url languages %}">{% trans "Languages" %}</a></h2>
+<p>{% trans "List of all languages there are <a href='/stats/teams'>Translation Teams</a> for."%}
   {% trans "Some teams manage more than one language (usually just simple variants), and here you can see all the languages GNOME is being translated to." %}</p>
 
 </td></tr><tr><td valign="top">
 
-<h2><a href="releases/">{% trans "Release Sets" %}</a></h2>
+<h2><a href="{% url releases %}">{% trans "Release Sets" %}</a></h2>
 <p>{% trans "List of all GNOME release sets and releases we gather stats for." %}</p>
 
 <p>{% trans "Examples of release sets are &quot;GNOME Office&quot;, &quot;Fifth Toe&quot; or &quot;GNOME 2.14&quot;." %}
@@ -32,7 +32,7 @@
 <p>{% trans "Look here if you want to compare language support in any of these release sets." %}</p>
 </td><td valign="top">
 
-<h2><a href="module/">{% trans "Modules" %}</a></h2>
+<h2><a href="{% url modules %}">{% trans "Modules" %}</a></h2>
 <p>{% trans "List of all modules with statistics in here." %}</p>
 
 <p>{% trans "Modules are separate libraries or applications, with one or more branches of development included." %}

Copied: branches/djamnedlies/templates/language_list.html (from r1103, /branches/djamnedlies/templates/list-languages.html)
==============================================================================
--- /branches/djamnedlies/templates/list-languages.html	(original)
+++ branches/djamnedlies/templates/language_list.html	Sun Oct 26 12:05:37 2008
@@ -19,9 +19,9 @@
 {% for lang in languages %}
 <li style="font-size: 120%;">
   {% if lang.name %}
-  <a href="{{ webroot }}/languages/{{ lang.locale }}">{{ lang.translated_name }}</a>
+  <a href="{{ lang.get_absolute_url }}">{{ lang.translated_name }}</a>
   {% else %}
-  <a href="{{ webroot }}/languages/{{ lang.locale }}">{{ lang.locale }}</a>
+  <a href="{{ lang.get_absolute_url }}">{{ lang.locale }}</a>
   {% endif %}
 </li>
 {% endfor %}

Copied: branches/djamnedlies/templates/language_release.html (from r1103, /branches/djamnedlies/templates/language-release.html)
==============================================================================
--- /branches/djamnedlies/templates/language-release.html	(original)
+++ branches/djamnedlies/templates/language_release.html	Sun Oct 26 12:05:37 2008
@@ -39,7 +39,7 @@
     <h2>{% trans "Coordinator" %}</h2>
     {% with language.team.coordinator as person %}
     {% with 0 as printroles %}
-    {% include "person-base.html" %}
+    {% include "person_base.html" %}
     {% endwith %}
     {% endwith %}
   {% endif %}
@@ -69,7 +69,7 @@
   <td valign="top" width="50%"><!-- two columns set-up -->
   <h3>{% trans "Documentation" %}</h3>
   {% with stats.doc as modstats %}
-    {% include "language-release-stats.html" %}
+    {% include "language_release_stats.html" %}
   {% endwith %}
   </td>
 {% endif %}  
@@ -77,7 +77,7 @@
 
   <h3>{% trans "UI translations" %}</h3>
   {% with stats.ui as modstats %}
-    {% include "language-release-stats.html" %}
+    {% include "language_release_stats.html" %}
   {% endwith %}
 </td></tr></table><!-- end two column layout -->
 

Modified: branches/djamnedlies/templates/module.html
==============================================================================
--- branches/djamnedlies/templates/module.html	(original)
+++ branches/djamnedlies/templates/module.html	Sun Oct 26 12:05:37 2008
@@ -31,7 +31,7 @@
     {% else %}
       <img class="people" src="/media/img/nobody.png" alt="" />
     {% endif %}
-    <a style="font-size: 140%;" href="{% url stats.views.person maintainer.id %}">{{ maintainer.name }}</a>
+    <a style="font-size: 140%;" href="{{ maintainer.get_absolute_url }}">{{ maintainer.name }}</a>
     </div>
   {% endfor %}
 {% endif %}
@@ -81,7 +81,7 @@
       {% ifnotequal stats|length 1 %}
         <h3>{% trans "Documentation" %}</h3>
       {% endifnotequal %}
-      {% include "show-stats.html" %}
+      {% include "stats_show.html" %}
     {% endif %}
     {% endwith %}
 
@@ -91,7 +91,7 @@
       {% ifnotequal stats|length 1 %}
         <h3>{% trans "Translation" %}</h3>
       {% endifnotequal %}
-      {% include "show-stats.html" %}
+      {% include "stats_show.html" %}
     {% endif %}
     {% endwith %}
 

Modified: branches/djamnedlies/templates/people.html
==============================================================================
--- branches/djamnedlies/templates/people.html	(original)
+++ branches/djamnedlies/templates/people.html	Sun Oct 26 12:05:37 2008
@@ -18,7 +18,7 @@
   {% else %}
     <img class="people" src="/media/img/nobody.png" alt="" />
   {% endifnotequal %}
-  <a style="font-size: 120%;" href="{{ webroot }}/people/{{ person.id }}">{{ person.name }}</a><br />
+  <a style="font-size: 120%;" href="{{ person.get_absolute_url }}">{{ person.name }}</a><br />
   {% if person.webpage_url %}
   <a href="{{ person.webpage_url }}">{{ person.webpage_url }}</a><br />
   {% endif %}

Modified: branches/djamnedlies/templates/release.html
==============================================================================
--- branches/djamnedlies/templates/release.html	(original)
+++ branches/djamnedlies/templates/release.html	Sun Oct 26 12:05:37 2008
@@ -19,7 +19,7 @@
 {% for lstats in release.get_global_stats %}
 <tr>
   <td class="leftcell" style="font-size:120%;">
-    <a href="{{ webroot }}/languages/{{ lstats.lang_code }}/{{ release.id }}">{% trans lstats.lang %}</a>
+    <a href="{{ url languagerelease lstats.lang_code, release.id }}">{% trans lstats.lang %}</a>
   </td>
   
   {% ifnotequal lstats.doc_trans|add:lstats.doc_fuzzy "0" %}

Modified: branches/djamnedlies/templates/stats/person_detail.html
==============================================================================
--- branches/djamnedlies/templates/stats/person_detail.html	(original)
+++ branches/djamnedlies/templates/stats/person_detail.html	Sun Oct 26 12:05:37 2008
@@ -9,7 +9,7 @@
   <h2>{{ object.name}}</h2>
   {% with 1 as printroles %}
   {% with object as person %}
-  {% include "person-base.html" %}
+  {% include "person_base.html" %}
   {% endwith %}
   {% endwith %}
 

Copied: branches/djamnedlies/templates/team_detail.html (from r1103, /branches/djamnedlies/templates/team.html)
==============================================================================
--- /branches/djamnedlies/templates/team.html	(original)
+++ branches/djamnedlies/templates/team_detail.html	Sun Oct 26 12:05:37 2008
@@ -38,7 +38,7 @@
     <h2>{% trans "Coordinator" %}</h2>
     {% with team.coordinator as person %}
     {% with 0 as printroles %}
-    {% include "person-base.html" %}
+    {% include "person_base.html" %}
     {% endwith %}
     {% endwith %}
   {% endif %}
@@ -52,7 +52,7 @@
   {% for stat in lang.get_release_stats %}
     <tr>
       <td class="leftcell" style="font-size:120%;">
-        <a href="{{ webroot }}/languages/{{ lang.locale }}/{{ stat.id }}">{{ stat.name }}</a>
+        <a href="{% url languagerelease lang.locale,stat.id %}">{{ stat.name }}</a>
       </td>
   
     {% if stat.doctotal %}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]