1. Daniel Greenfeld
  2. transifex

Commits

Dimitris Glezos  committed 94d51d8

trivial: Some data presentation work on components page

- Show allows_file_submission on component page
- Grouped component details in sections
- Moved header of stats table ouside of HTML snippet file
- Removed incorrect delete_release link (#144)

  • Participants
  • Parent commits f3645b0
  • Branches default

Comments (0)

Files changed (12)

File site_media/css/base.css

View file
  • Ignore whitespace
 table.definition th { text-align: left; color: #666; }
 table.definition td {
   padding: 0.2em 0.5em;
+  margin: 0.5em 0;
 }
 
 table.definition tr.empty th,

File site_media/css/icons.css

View file
  • Ignore whitespace
 .i16.action { background-image: url('../images/icons/lightning.png'); }
 .i16.admin { background-image: url('../images/icons/award_star_gold_1.png'); }
 .i16.add { background-image: url('../images/icons/add.png'); }
+.i16.allow_file { background-image: url('../images/icons/database_edit.png'); }
 .i16.bell { background-image: url('../images/icons/bell.png'); }
 .i16.branch { background-image: url('../images/icons/arrow_branch.png'); }
 .i16.collection { background-image: url('../images/icons/basket.png'); }
 .i16.component { background-image: url('../images/icons/brick.png'); }
 .i16.delete { background-image: url('../images/icons/cross.png'); }
+.i16.delete_circle { background-image: url('../images/icons/cancel.png'); }
 .i16.edit { background-image: url('../images/icons/pencil.png'); }
 .i16.cache { background-image: url('../images/icons/lorry.png'); }
 .i16.cache_empty { background-image: url('../images/icons/lorry_flatbed.png'); }
 .i16.repository { background-image: url('../images/icons/drive_network.png'); }
 .i16.stats { background-image: url('../images/icons/chart_bar.png'); }
 .i16.stats_edit { background-image: url('../images/icons/chart_bar_edit.png'); }
+.i16.stop { background-image: url('../images/icons/delete.png'); }
 .i16.submit { background-image: url('../images/icons/page_white_edit.png'); }
 .i16.tag { background-image: url('../images/icons/tag_blue.png'); }
 .i16.tip { background-image: url('../images/icons/lightbulb.png'); }
+.i16.tick_circle { background-image: url('../images/icons/accept.png'); }
 .i16.user { background-image: url('../images/icons/user.png'); }
 .i16.view { background-image: url('../images/icons/page_magnify.png'); }

File site_media/css/stats.css

View file
  • Ignore whitespace
 table.stats_comp {
   font-size: 100%;
   border-collapse: collapse;
-  margin-bottom: 0.5em;
+  margin: 1em 0 0.5em 0;
 }
 
 .stats_comp a {

File site_media/images/icons/accept.png

  • Ignore whitespace
Added
New image

File site_media/images/icons/cancel.png

  • Ignore whitespace
Added
New image

File site_media/images/icons/database_edit.png

  • Ignore whitespace
Added
New image

File site_media/images/icons/delete.png

  • Ignore whitespace
Added
New image

File site_media/images/icons/page_white_key.png

  • Ignore whitespace
Added
New image

File templates/projects/component_detail.html

View file
  • Ignore whitespace
       <td>{{ component.unit.branch }}</td>
     </tr>
     <tr>
-      <th class="i16 filter">{% trans "Filter:" %}</th>
+      <th class="i16 filter">{% trans "File filter:" %}</th>
       <td>{{ component.file_filter }}</td>
     </tr>
-    {% if component.trans.get_source_stats %}
     <tr>
-      <th class="link i16">{% trans "Source file:" %}</th>
+      <th class="i16 allow_file">{% trans "Allows file submissions:" %}</th>
       <td>
-      {% with component.trans.get_source_stats as source_stats %}
-      {% url component_raw_file component.project.slug component.slug source_stats.filename as source_raw_url %}
-      {% url component_view_file component.project.slug component.slug source_stats.filename as source_view_url %}
-        <code style="margin-right: 0.7em;">{{ source_stats.filename }} ({{ source_stats.total }} {% trans "entries" %})</code>
-        <a class="i16 view nodecoration_icon" title="{% trans "View " %}{{ source_stats.filename }}" href="{{ source_view_url }}"></a>
-        <a class="i16 link nodecoration_icon" title="{% trans "Download " %}{{ source_stats.filename }}" href="{{ source_raw_url }}"></a>
-      {% endwith %}
+        {% if component.allows_submission %}<span class="i16 tick_circle"></span>
+        {% else %}<span class="i16 stop"></span>
+        {% endif %}
       </td>
     </tr>
-    {% endif %}
     {% with component.releases.all as releases %}
     {% if releases %}
     <tr>
     {% endif %}
     {% endwith %}
     <tr>
-      <th class="i16 cache">{% trans "Local cache:" %}</th>
-      <td>
-        {% if component.unit.last_checkout %}
-        {% trans "The local checked-out copy of this component was last updated " %} <strong>{{component.unit.last_checkout|timesince}}</strong> {% trans "ago" %}.
-        {% else %}
-        {% trans "Component not yet pulled from source repository." %}
-        {% endif %}
-      </td>
-    </tr>
-    <tr>
     {% if request.user.is_authenticated %}<tr>
       <th class="i16 maintainer">{% trans "Maintainer actions:" %}</th>
       <td>
 </div>
 {% endif %}  
 
+<h3>{% trans "Translation files" %}</h3>
+
+{% if component.trans.get_source_stats %}
+<table class="definition">
+<tr>
+  <th class="link i16">{% trans "Source file:" %}</th>
+  <td>
+  {% with component.trans.get_source_stats as source_stats %}
+  {% url component_raw_file component.project.slug component.slug source_stats.filename as source_raw_url %}
+  {% url component_view_file component.project.slug component.slug source_stats.filename as source_view_url %}
+    <code style="margin-right: 0.7em;">{{ source_stats.filename }} ({{ source_stats.total }} {% trans "entries" %})</code>
+    <a class="i16 view nodecoration_icon" title="{% trans "View " %}{{ source_stats.filename }}" href="{{ source_view_url }}"></a>
+    <a class="i16 link nodecoration_icon" title="{% trans "Download " %}{{ source_stats.filename }}" href="{{ source_raw_url }}"></a>
+  {% endwith %}
+  </td>
+</tr>
+    <tr>
+      <th class="i16 cache">{% trans "Statistics last updated:" %}</th>
+      <td>
+        {% if component.unit.last_checkout %}<strong>{{component.unit.last_checkout|timesince}}</strong> {% trans "ago" %}.
+        {% else %}{% trans "Component not yet pulled from source repository." %}{% endif %}
+      </td>
+    </tr>
+</table>
+{% endif %}
+
 {% comp_stats_table component.trans.get_stats %}
 
 {% if request.user.is_authenticated and component.allows_submission and perms.projects.submit_file %}

File templates/txcollections/release_detail.html

View file
  • Ignore whitespace
 
 <div id="projects" class="projects">
 
+<h3>{% trans "Translation statistics" %} </h3>
 {% release_stats_table pofile_list collection release %}
 
 {% if not pofile_list %}
 <p>{% trans "No translations added for this release. :-(" %}</p>
 {% endif %}
-
+</div>
 </div>
 {% endblock %}{# body_main #}
 
-{% block content_footer %}
-  <div id="content_footer_center">
-    {% if request.user.is_authenticated and perms.txcollections.delete_collectionrelease %}
-    <div class="deletelink">
-      <span class="i16 delete"><a href="{% url collection_delete slug=collection.slug %}">{% trans "Delete collection" %}</a></span>
-    </div>
-    {% endif %}
-  </div>
-{% endblock %}

File translations/templates/comp_stats_table.html

View file
  • Ignore whitespace
 {% load statistics %}
 {% load locks %}
 {% if stats %}
-<h3>{% trans "Translation statistics" %} </h3>
 <table class="stats_comp">
    <thead>
     <tr>

File translations/templates/release_stats_table.html

View file
  • Ignore whitespace
 {% load i18n %}
 {% load statistics %}
 {% if stats %}
-<h3>{% trans "Translation statistics" %} </h3>
 <table class="stats_comp">
    <thead>
     <tr>