partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

AttachmentRenderer.js (692B)


      1 Ext.define("PartKeepr.Components.Part.Renderers.AttachmentRenderer", {
      2     extend: "PartKeepr.Components.Grid.Renderers.AbstractRenderer",
      3 
      4     alias: 'columnRenderer.partAttachment',
      5 
      6     renderer: function (val, q, rec)
      7     {
      8         var ret = "";
      9         if (rec.attachments().getCount() > 0)
     10         {
     11             ret += '<span class="web-icon fugue-icon paper-clip" title="' + i18n("Has attachments") + '"/>';
     12         }
     13 
     14         return ret;
     15     },
     16 
     17     statics: {
     18         rendererName: i18n("Attachment Renderer"),
     19         rendererDescription: i18n("Renders an attachment icon if one or more attachments exist"),
     20 
     21         restrictToEntity: ["PartKeepr.PartBundle.Entity.Part"]
     22     }
     23 });