app/views/collections/_sidebar.html.erb in iqvoc-4.12.1 vs app/views/collections/_sidebar.html.erb in iqvoc-4.13.0
- old
+ new
@@ -1,12 +1,20 @@
<%= sidebar do %>
- <%= sidebar_header 'Links' %>
- <%= sidebar_item :icon => :edit, :text => t("txt.views.collections.new"), :path => new_collection_path,
- :perms => [:create, Iqvoc::Collection.base_class], :active => params[:action] == 'new' %>
<% if defined?(collection) %>
- <%= sidebar_header t('txt.common.representations') %>
- <%= sidebar_item :icon => 'link', :text => 'HTML', :path => collection_url(collection.origin, :format => :html) %>
- <%= sidebar_item :icon => 'link', :text => 'RDF/XML', :path => rdf_url(collection.origin, :format => :rdf, :lang => nil), :id => 'rdf_link_xml' %>
- <%= sidebar_item :icon => 'link', :text => 'RDF/Turtle', :path => rdf_url(collection.origin, :format => :ttl, :lang => nil), :id => 'rdf_link_ttl' %>
- <%= sidebar_item :icon => 'link', :text => 'RDF/NTriples', :path => rdf_url(collection.origin, :format => :nt, :lang => nil), :id => 'rdf_link_nt' %>
+ <%= sidebar_header t('txt.common.representations') %>
+ <%= sidebar_item :icon => 'share', :text => 'HTML', :path => collection_url(collection.origin, :format => :html) %>
+ <%= sidebar_item :icon => 'share', :text => 'RDF/XML', :path => rdf_url(collection.origin, :format => :rdf, :lang => nil), :id => 'rdf_link_xml' %>
+ <%= sidebar_item :icon => 'share', :text => 'RDF/Turtle', :path => rdf_url(collection.origin, :format => :ttl, :lang => nil), :id => 'rdf_link_ttl' %>
+ <%= sidebar_item :icon => 'share', :text => 'RDF/NTriples', :path => rdf_url(collection.origin, :format => :nt, :lang => nil), :id => 'rdf_link_nt' %>
<% end %>
+<% end %>
+
+<%= sidebar do %>
+ <% if defined?(collection) || can?(:create, Iqvoc::Collection.base_class) %>
+ <%= sidebar_header 'Links' %>
+ <% end %>
+ <% if defined?(collection) %>
+ <%= sidebar_item :icon => 'link', :text => t('txt.models.collection.uri'), :path => rdf_url(collection.origin, :format => nil, :lang => nil) %>
+ <% end %>
+ <%= sidebar_item :icon => :edit, :text => t("txt.views.collections.new"), :path => new_collection_path,
+ :perms => [:create, Iqvoc::Collection.base_class] %>
<% end %>