Bug 20343: Put translatable strings in strings.tt
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 18 Apr 2018 13:20:02 +0000 (15:20 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 19 Apr 2018 15:32:20 +0000 (12:32 -0300)
Also add a CSS class on <details> for easier styling and change the
list style so it take less space on screen

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc
koha-tmpl/intranet-tmpl/prog/js/checkouts.js

index 310e84d..868a596 100644 (file)
@@ -1092,6 +1092,11 @@ span.expired {
        font-style : italic;
 }
 
+details.checkouts-by-itemtype li {
+    display: inline-block;
+    margin-right: 1em;
+}
+
 div.help {
        margin: .9em 0 0 0;  
 }
index e116204..e7c68d7 100644 (file)
@@ -43,5 +43,7 @@
     var SUSPEND_HOLD_ERROR_NOT_FOUND = _("Unable to suspend hold, hold not found");
     var RESUME_HOLD_ERROR_NOT_FOUND = _("Unable to resume, hold not found");
     var CURRENT = _(" (current) ");
+    var MSG_NO_ITEMTYPE = _("No itemtype");
+    var MSG_CHECKOUTS_BY_ITEMTYPE = _("Number of checkouts by item type");
 //]]>
 </script>
index 5718bbc..d6cd4b8 100644 (file)
@@ -497,12 +497,13 @@ $(document).ready(function() {
                 var ul = $('<ul>');
                 Object.keys(checkoutsByItype).sort().forEach(function (itype) {
                     var li = $('<li>')
-                        .append($('<strong>').html(itype || _("No itemtype")))
+                        .append($('<strong>').html(itype || MSG_NO_ITEMTYPE))
                         .append(': ' + checkoutsByItype[itype]);
                     ul.append(li);
                 })
                 $('<details>')
-                    .append($('<summary>').html(_("Number of checkouts by item type")))
+                    .addClass('checkouts-by-itemtype')
+                    .append($('<summary>').html(MSG_CHECKOUTS_BY_ITEMTYPE))
                     .append(ul)
                     .insertBefore(oSettings.nTableWrapper)
             },