Sha256: 4739edcf7417d02b4dae49d3bd8572470974dc00caf59a79f17f1f5d93459cd6

Contents?: true

Size: 1.57 KB

Versions: 4

Compression:

Stored size: 1.57 KB

Contents

<% hcpath = hierarchical_concepts_path(:format => :json, :published => params[:published], :broader => broader || nil) unless hcpath %>
<% if dragabble %>
<ul class="hybrid-treeview" data-url="<%= hcpath %>"
  data-dragabble="true"
  data-polyhierarchy-support="<%= Iqvoc::Concept.root_class.instance.poly_hierarchy? %>"
  data-save-label="<%= t('txt.common.move') %>"
  data-copy-label="<%= t('txt.common.copy') %>"
  data-undo-label="<%= t('txt.common.reset') %>">
<% else %>
  <ul class="hybrid-treeview" data-url="<%= hcpath %>">
<% end %>
  <% concepts.select { |c| can? :read, c }.each do |concept| %>
    <% has_children = broader ? concept.broader_relations.any? : concept.narrower_relations.any? %>
    <% locked = can?(:branch, concept) || can?(:update, concept) ? false : true %>

    <li class="<%= has_children ? "hasChildren" : "" %>" id="<%= concept.id %>"
      data-has-children="<%= (params[:broader] ? concept.broader_relations.any? : concept.narrower_relations.any?) %>"
      data-update-url="<%= move_concept_url(concept, format: :json) %>"
      data-published="<%= concept.published? %>"
      data-locked="<%= locked %>"
      data-glance-url="<%= glance_concept_url(concept) %>">
      <% if concept.published? %>
        <%= link_to(concept.pref_label.to_s, concept_url(id: concept)) %>
      <% else %>
        <%= link_to(concept.pref_label.to_s, concept_url(id: concept, published: 0)) %>
      <% end %>

      <% if concept.additional_info.present? %>
        <span class="additional_info">(<%= concept.additional_info %>)</span>
      <% end %>
    </li>
  <% end %>
</ul>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iqvoc-4.8.2 app/views/concepts/hierarchical/_treeview.html.erb
iqvoc-4.8.1 app/views/concepts/hierarchical/_treeview.html.erb
iqvoc-4.8.0 app/views/concepts/hierarchical/_treeview.html.erb
iqvoc-4.7.0 app/views/concepts/hierarchical/_treeview.html.erb