_ontology.html.haml revision cd3073fbe6dc665dc20e2c65cf1ac33f723408f3
// = link_to resource, resource#, 'data-type' => resource.class
%h2{'style' => 'display: inline-block'}
%span= resource
%small
= "#{resource.language}/#{resource.logic}"
%div.btn-group{'style' => 'display: inline-block'}
%a.btn.btn-mini.dropdown-toggle{'href' => '#', 'data-toggle' => 'dropdown'}
-if can? :edit, resource
%li= link_to 'Rename', [:edit, resource]
%li= link_to 'View symbols/sentences', [resource]
%li= link_to 'View comments', [resource, :comments]
%li= link_to 'View metadata', [resource, :metadata]
-if can? :permissions, resource
%li= link_to 'View permissions', [resource, :permissions]
-if can? :edit, resource
%li= link_to 'Add versions', [:new, resource, :ontology_version] #TODO correct symbol
%li= link_to 'Browse versions', [resource, :ontology_versions]
-if can? :edit, resource
%li= link_to 'Delete', resource, :confirm => 'Do you really want to delete this ontology?', :method => :delete
%script= '$().dropdown()'
%div= link_to resource.iri, download_path(resource)
%div= resource.description
%nav
- if !@groups.nil?
- @groups.each do |group|
%li{:class => (group.kind == @kind ? 'active' : nil)}
%a{:href => ontology_entities_path(resource, :kind => group.kind)}
- pages.each do |page, path, count|
%li{:class => (page==current_page ? 'active' : nil)}
%a{:href => url_for(path)}
- if count # hide counter if empty
%span.badge{:style => count==0 && 'display:none'}= count