_info.html.haml revision 268e4c0f7fc6630f88604079ab4ede1b8963ec6a
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen= render partial: '/ontologies/menu', locals: {resource: resource}
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen%br
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen%h2{'style' => 'display: inline-block'}
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen %span= resource.class.name
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen %span= link_to resource
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen %small
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen -if !resource.language_id.nil?
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen = link_to resource.language, resource.language
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen - else
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen = 'unknown'
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen - unless resource.distributed?
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen = '/'
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen = link_to resource.logic.to_s, resource.logic
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen - if resource.state != 'done'
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen %small#ontology-state{ class: resource.state, 'data-uri' => url_for(resource) }
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen = status resource
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen%p= link_to resource.iri, download_path(resource) if download_path(resource)
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen%p= resource.description
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen= render partial: '/ontologies/oops_state', locals: {resource: resource}
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen%nav
ba7db1e008078bfbed489e17bee00309e0a7b1f0Timo Sirainen %ul.nav.nav-tabs
- @top_level_pages.each do |(page_title, page)|
%li{class: page==current_page ? 'active' : nil}
= link_to page_title, [resource, page]
- if controller_name == "entities" || controller_name == "sentences"
%nav
%ul.nav.nav-tabs
- @entities.each do |entity|
%li{:class => (entity.kind == @active_kind ? 'active' : nil)}
%a{:href => ontology_entities_path(resource, :kind => entity.kind)}
= entity.count == 1 ? entity.kind : entity.kind.pluralize
%span.badge{:style => entity.count == 0 && 'display:none'}= entity.count
- pages.each do |page, path, count|
%li{:class => (page==current_page ? 'active' : nil)}
%a{:href => url_for(path)}
= page.to_s.capitalize
- if count # hide counter if empty
%span.badge{:style => count==0 && 'display:none'}= count