- if current_version
.pull-right
.btn-group
- if download_path(resource)
.btn-group
= link_to t('ontologies.download'), download_path(resource), class: 'btn btn-default'
- if show_evaluate?
.btn-group
%button.btn.btn-default.dropdown-toggle{'data-toggle' => 'dropdown'}
Evaluate
%span.caret
%ul.dropdown-menu{role: 'menu'}
- if show_oops?
%li= link_to 'design with OOPS', repository_ontology_ontology_version_oops_request_path(*resource_chain, current_version), method: 'post'
- if can? :write, resource.repository
= link_to 'Edit', url_for([resource, :edit]), class: 'btn btn-default'
- if can? :write, resource.repository
- if resource.can_be_deleted?
= modal_button(t('ontology.delete'), btn_class: 'btn-default')
- else
.btn.btn-default.has-tooltip{disabled: true, data: {toggle: "tooltip", :'original-title' => t('ontology.delete_error', oms_with_article: Settings.OMS.with_indefinite_article, oms: Settings.OMS), container: 'body'}}
%span.allow-tooltips
Delete
- if Settings.format_selection
.btn-group
%button.btn.btn-default.dropdown-toggle{'data-toggle' => 'dropdown'}
Formats
%span.caret
%ul.dropdown-menu{role: 'menu'}
- %w(xml json).each do |f|
%li= link_to f.upcase, format: f
= modal_body(t('ontology.delete_confirm.header_text', oms: Settings.OMS), t('ontology.delete_confirm.text', name: resource, parent_text: resource.parent.present? ? t('ontology.delete_confirm.parent') : '', children_text: resource.children.present? ? t('ontology.delete_confirm.children') : '', path: resource.path), resource_chain, t('ontology.delete'))