app/views/media_resources/browse.html.haml
.app.view-media-resource-browse
= render "application/header"
.app-body
.app-body-title
.ui-body-title
.ui-body-title-label
%h1.title-xl
%i.icon-eye
= _("Browse for similar content")
.app-body-ui-container
.bordered.ui-container.midtone.rounded-right.rounded-bottom.table
= render :partial => "application/sidebar/browse"
.app-body-content.table-cell.table-substance.ui-container
- if @browsable_meta_terms.any?
- @browsable_meta_terms.each do |meta_term|
.ui-container.midtone.rounded-right.ptl.phl.pbm
.ui-resources-header.mbm
%h2.title-m.ui-resources-title
%strong.ui-resource-title-core= "#{meta_term[:meta_datum].meta_key.all_context_labels}: "
= meta_term[:meta_term]
%span.ui-counter
= "#{meta_term[:count]}"
- if meta_term[:count] > 20
%a.strong{:href => media_resources_path(:meta_data => {meta_term[:meta_datum].meta_key.label => {:ids => [meta_term[:meta_term].id]}})} Alle anzeigen
.ui-featured-entries.small.active
%ul.ui-featured-entries-list.not-loaded{:data => {"meta-key" => meta_term[:meta_datum].meta_key.label, "meta-term" => meta_term[:meta_term].id}}
%hr.separator
- else
.row.mth
.pvh.mth.mbl
.title-l.by-center
= _("No similar content found")
.title-s.by-center
= _("This item does not have enough metadata")
- if current_user.authorized?(:edit, @media_resource)
.mts
%a.primary-button{:href => edit_media_resource_path(@media_resource)}
= _("Add metadata")
.app-footer-push
= render :partial => "application/footer"
:coffeescript
jQuery ->
new App.MediaResourcesController.Browse
previewAmount: 20