include ../layout/panelMixins.jade

+panel-title('Sources')
  i.m-add-source.m-icon-enabled.icon-plus-squared(title="Add new source")
  i(class='icon-up-open',
    data-toggle='collapse',
    data-target='#m-source-panel > .m-panel-content')

if sources
  +panel-content('collapse in')
    .m-sources
      each source in sources
        if source.metadata()
          .m-source
            span(title=source.get('name'))= source.get('name').length > 13 ? source.get('name').slice(0,13) + "..." : source.get('name')
              - var attributes = {'cid': source.cid}
              - var sourceType = sourceTypes[source.getSourceType()]
              - var classes = 'm-icon-enabled m-display-source-action ' + sourceType.icon + ' ' + sourceType.action
              i(class=classes)&attributes(attributes)
              //- trash icon to delete source
              - classes = 'icon-trash m-icon-enabled m-delete-source'
              i(title='delete source', class=classes)&attributes(attributes)
              //- info icon for minerva metadata display
              i(title='display source info').icon-info-circled.m-icon-info.m-icon-enabled&attributes(attributes)

include ../layout/panelMixins.jade

+panel-title('Sources')
  i.m-add-source.m-icon-enabled.icon-plus-squared(title="Add new source")
  i(class='icon-up-open',
    data-toggle='collapse',
    data-target='#m-source-panel > .m-panel-content')

if sources
  +panel-content('collapse in')
    .m-sources
      each source in sources
        if source.metadata()
          .m-source
            span(title=source.get('name'))= source.get('name').length > 13 ? source.get('name').slice(0,13) + "..." : source.get('name')
              - var attributes = {'cid': source.cid}
              - var sourceType = sourceTypes[source.getSourceType()]

              if sourceType
                - var classes = 'm-icon-enabled m-display-source-action ' + sourceType.icon + ' ' + sourceType.action
                i(class=classes)&attributes(attributes)
              //- trash icon to delete source
              - classes = 'icon-trash m-icon-enabled m-delete-source'
              i(title='delete source', class=classes)&attributes(attributes)
              //- info icon for minerva metadata display
              i(title='display source info').icon-info-circled.m-icon-info.m-icon-enabled&attributes(attributes)

Fix issue with no action in source
Fix issue with no action in source
