_info.html.haml revision 9136e24da27774d3012ec8d8c33660661abd8ec4
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch= render partial: '/ontologies/menu', locals: {resource: resource}
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen%h1#ontology_title
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = ontology_link_to resource
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen %span= fancy_link(resource.parent)
0d7b2e0750386fe1646a17d83a803d1d5eb3d3a0Timo Sirainen = fancy_link repository_tree_path(resource.repository, resource.path)
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen See for detailed documentation
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = link_to resource.documentation, resource.documentation
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen%p= link_to resource.iri, download_path(resource) if download_path(resource)
08a0b7b0d0444875001847ef2b1b7b76122620abTimo Sirainen = render partial: '/ontologies/oops_state', locals: {resource: resource}
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen- if resource.non_current_active_version?(current_user)
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = render partial: '/ontologies/status'
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen - @top_level_pages.each do |(page_title, page)|
a75d470c9223a75801418fcdda258885c36317e0Timo Sirainen %li{class: page==current_page || in_subcontroller?(page, current_page) ? 'active' : nil}
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = link_to page_title, [*resource_chain, page]
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen - if %w[entities sentences children].include? controller_name
08a0b7b0d0444875001847ef2b1b7b76122620abTimo Sirainen %li{:class => (entity.kind == @active_kind ? 'active' : nil)}
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = link_to repository_ontology_entities_path(*resource_chain, kind: entity.kind) do
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = entity.count == 1 ? entity.kind : entity.kind.pluralize
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen %span.badge{:style => entity.count == 0 && 'display:none'}= entity.count
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen - pages.each do |page, path, count|
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen %li{:class => (page==current_page ? 'active' : nil)}
08a0b7b0d0444875001847ef2b1b7b76122620abTimo Sirainen = link_to path do
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen - if count # hide counter if empty
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen %span.badge{:style => count==0 && 'display:none'}= count
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen - if in_metadata?
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen - @metadatas.each do |(page_title, page)|
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen %li{class: page[-1]==current_page ? 'active' : nil}
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = link_to page_title, page