_info.html.haml revision 9136e24da27774d3012ec8d8c33660661abd8ec4
bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch= render partial: '/ontologies/menu', locals: {resource: resource}
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen%h1#ontology_title
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = ontology_link_to resource
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen %small
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen - if resource.logic
55c2029f111653b7c70ec58d7efef531efea63ccTimo Sirainen = link_to resource.logic.to_s, resource.logic
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen - elsif resource.distributed?
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen DOL
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = resource.acronym
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen%small
0d7b2e0750386fe1646a17d83a803d1d5eb3d3a0Timo Sirainen Defined
0d7b2e0750386fe1646a17d83a803d1d5eb3d3a0Timo Sirainen - if resource.parent
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen by
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen %span= fancy_link(resource.parent)
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen in the file
0d7b2e0750386fe1646a17d83a803d1d5eb3d3a0Timo Sirainen = fancy_link repository_tree_path(resource.repository, resource.path)
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen - if resource.documentation
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen See for detailed documentation
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = link_to resource.documentation, resource.documentation
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen%p= link_to resource.iri, download_path(resource) if download_path(resource)
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen%p= resource.description
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen
08a0b7b0d0444875001847ef2b1b7b76122620abTimo Sirainen- if resource.oops_supported?
08a0b7b0d0444875001847ef2b1b7b76122620abTimo Sirainen = render partial: '/ontologies/oops_state', locals: {resource: resource}
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen- if resource.non_current_active_version?(current_user)
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen = render partial: '/ontologies/status'
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen%nav.nav_tab_level1
4ee00532a265bdfb38539d811fcd12d51210ac35Timo Sirainen %ul.nav.nav-tabs
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 %nav.nav_tab_level2
08a0b7b0d0444875001847ef2b1b7b76122620abTimo Sirainen %ul.nav.nav-tabs
08a0b7b0d0444875001847ef2b1b7b76122620abTimo Sirainen - @entities.each do |entity|
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 = page.to_s.capitalize
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen - if count # hide counter if empty
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen %span.badge{:style => count==0 && 'display:none'}= count
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen - if in_metadata?
678d0463849ba777106eb7875f27db07a5d8e3dfTimo Sirainen %nav.nav_tab_level2
91dca97b367c54a139c268b56a0c67f564bd9197Timo Sirainen %ul.nav.nav-tabs
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
7fb70daba4e571eab5b64f496d20b9e37e31141bTimo Sirainen