1. Daniel Greenfeld
  2. transifex

Commits

Diego Búrigo Zacarão  committed 3eb1bb7

Added lock info in stats table rows

  • Participants
  • Parent commits e790de7
  • Branches default

Comments (0)

Files changed (8)

File transifex/media/css/icons.css

View file
  • Ignore whitespace
 .i16.bell { background-image: url('../images/icons/bell.png'); }
 .i16.book { background-image: url('../images/icons/book_open.png'); }
 .i16.branch { background-image: url('../images/icons/arrow_branch.png'); }
+
+.i16.bullet_delete { background-image: url('../images/icons/bullet_delete.png'); }
+.i16.bullet_green { background-image: url('../images/icons/bullet_green.png'); }
+.i16.bullet_lock { background-image: url('../images/icons/bullet_lock.png'); }
+
 .i16.bug { background-image: url('../images/icons/bug.png'); }
 .i16.clone { background-image: url('../images/icons/layers.png'); }
 .i16.clock { background-image: url('../images/icons/clock.png'); }

File transifex/media/css/stats.css

View file
  • Ignore whitespace
   height: 22px;
   line-height: 22px;
 }
+
+table.stats_table .bullet {
+  border:0;
+  margin-right:4px;
+}

File transifex/media/images/icons/bullet_delete.png

  • Ignore whitespace
Added
New image

File transifex/media/images/icons/bullet_green.png

  • Ignore whitespace
Added
New image

File transifex/media/images/icons/bullet_lock.png

  • Ignore whitespace
Added
New image

File transifex/resources/views.py

View file
  • Ignore whitespace
             Q(coordinators=request.user)|
             Q(members=request.user)).distinct()
 
-    statslist = RLStats.objects.select_related('language', 'last_committer'
-        ).by_resource(resource)
+    statslist = RLStats.objects.select_related('language', 'last_committer',
+        'lock').by_resource(resource)
 
     return render_to_response("resources/resource_detail.html",
         { 'project' : resource.project,

File transifex/templates/projects/release_language_detail.html

View file
  • Ignore whitespace
   {% for stat in stats %}
     <tr id="stat_row_{{forloop.counter}}" title="{% trans 'click for translation' %}">
         <td>
-		  <span class="clickable">{{ stat.resource.project.name }} &rarr; {{ stat.resource.name }}</span>
+        <span class="clickable">{{ stat.resource.project.name }} &rarr; {{ stat.resource.name }}</span>
+        {% if stat.lock.valid %}
+            <img class="tipsy_enable bullet" src="{{ STATIC_URL }}images/icons/bullet_lock.png" title="{% trans "Locked" %}"/>
+        {% else %}
+          {% if stat.resource.accept_translations %}
+            <img class="tipsy_enable bullet" src="{{ STATIC_URL }}images/icons/bullet_green.png" title="{% trans "Accepting translations" %}"/>
+          {% else %}
+            <img class="tipsy_enable bullet" src="{{ STATIC_URL }}images/icons/bullet_delete.png" title="{% trans "Not accepting translations at the moment" %}"/>
+          {% endif %}
+        {% endif %}
         </td>
         <td>
         {% with 200 as barwidth %}
   {% for stat in private_stats %}
     <tr id="stat_row_{{forloop.counter}}" title="{% trans 'click for translation' %}">
         <td>
-		  <span class="clickable">{{ stat.resource.project.name }} &rarr; {{ stat.resource.name }}</span>
+        <span class="clickable">{{ stat.resource.project.name }} &rarr; {{ stat.resource.name }}</span>
+        {% if stat.lock.valid %}
+            <img class="tipsy_enable bullet" src="{{ STATIC_URL }}images/icons/bullet_lock.png" title="{% trans "Locked" %}"/>
+        {% else %}
+          {% if stat.resource.accept_translations %}
+            <img class="tipsy_enable bullet" src="{{ STATIC_URL }}images/icons/bullet_green.png" title="{% trans "Accepting translations" %}"/>
+          {% else %}
+            <img class="tipsy_enable bullet" src="{{ STATIC_URL }}images/icons/bullet_delete.png" title="{% trans "Not accepting translations at the moment" %}"/>
+          {% endif %}
+        {% endif %}
         </td>
         <td>
         {% with 200 as barwidth %}

File transifex/templates/resources/resource_detail.html

View file
  • Ignore whitespace
           {% ifequal resource.source_language stat.language %}
              <span style="padding-left:1em"><em>{% trans "source language" %}</em></span>
           {% endifequal %}
+          {% if stat.lock.valid %}
+            <img class="tipsy_enable bullet" src="{{ STATIC_URL }}images/icons/bullet_lock.png" title="{% trans "Locked" %}"/>
+          {% endif %}
         </td>
         <td>
           {% with 200 as barwidth %}