Sha256: 25724ec6f4e80ee268dc16ece71e8e75971bb0422dab7642423a40e2ccf8ac88

Contents?: true

Size: 1.68 KB

Versions: 7

Compression:

Stored size: 1.68 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| %>
    <% if params[:published] == '0' %>
      <% has_children = broader ? concept.broader_relations.any? : concept.narrower_relations.any? %>
    <% else %>
      <% has_children = broader ? concept.broader_relations.published.any? : concept.narrower_relations.published.any? %>
    <% end %>
    <% locked = can?(:branch, concept) || can?(:update, concept) ? false : true %>

    <li class="<%= has_children ? "hasChildren" : "" %>" id="<%= concept.id %>"
      data-has-children="<%= has_children %>"
      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

7 entries across 7 versions & 1 rubygems

Version Path
iqvoc-4.13.0 app/views/concepts/hierarchical/_treeview.html.erb
iqvoc-4.12.1 app/views/concepts/hierarchical/_treeview.html.erb
iqvoc-4.12.0 app/views/concepts/hierarchical/_treeview.html.erb
iqvoc-4.11.1 app/views/concepts/hierarchical/_treeview.html.erb
iqvoc-4.11.0 app/views/concepts/hierarchical/_treeview.html.erb
iqvoc-4.10.0 app/views/concepts/hierarchical/_treeview.html.erb
iqvoc-4.9.0 app/views/concepts/hierarchical/_treeview.html.erb