_ontology.html.haml revision 0b611cf877554b1aa910fa23099220f2d1d15e89
// = link_to resource, resource#, 'data-type' => resource.class
%h2{'style' => 'display: inline-block'}
%span= resource
%small
= "#{resource.language}/#{resource.logic}"
- if resource.state != 'done'
%small#status
= status resource
%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 'Show comments', [resource, :comments]
%li= link_to 'Show metadata', [resource, :metadata]
-if can? :permissions, resource
%li= link_to 'Show permissions', [resource, :permissions]
-if can? :edit, resource
%li= link_to 'Upload new version from my computer', new_ontology_ontology_version_path(resource, :from => 'http-client')
%li= link_to 'Import new version from other website', new_ontology_ontology_version_path(resource, :from => 'http-server')
%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
%div= link_to resource.iri, download_path(resource) if download_path(resource)
%div= resource.description
%nav
- @entities.each do |entity|
%li{:class => (entity.kind == @active_kind ? 'active' : nil)}
%a{:href => ontology_entities_path(resource, :kind => entity.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