%= render 'header', :label => @label %>
<%= render 'sidebar', :label => @label %>
<%= alert :info, :header => t('txt.common.unpublished_version') + "." do %>
<%= t("txt.views.versioning.current_revision", :rev => @label.rev) %>
<% if @label.locked? %>
<%= t("txt.views.versioning.in_ongoing_editing_by", :user => @label.locking_user.name) %>
<% end %>
<% end %>
<% if (not @label.locked?) || @label.locked_by == @current_user.id %>
<%= button_to t("txt.views.versioning.publishing"),
label_versions_merge_path(:origin => @label.origin), :class => 'btn btn-primary' %>
<% end %>
<%= button_to t("txt.views.versioning.consistency_check"),
label_versions_consistency_check_path(:origin => @label.origin),
:method => :get, :class => 'btn btn-default' %>
<% if (not @label.in_review?) && @label.locked_by == @current_user.id %>
<%= button_to t("txt.common.to_review"),
label_versions_to_review_path(:origin => @label.origin),
:class => 'btn btn-default' %>
<% end %>
<% unless @label.locked? %>
<%= button_to t("txt.views.versioning.to_edit_mode"),
label_versions_lock_path(:origin => @label.origin), :class => 'btn btn-default' %>
<%= button_to t("txt.views.versioning.delete"),
label_path(:published => 0, :id => @label.origin),
:method => :delete,
:confirm => I18n.t("txt.views.versioning.delete_confirm"),
:class => 'btn btn-default' %>
<% else %>
<%= button_to t("txt.views.versioning.unlock"),
label_versions_unlock_path(:origin => @label.origin),
:class => 'btn btn-default' if can?(:unlock, @label) %>
<%= link_to t("txt.views.versioning.edit_mode"),
edit_label_path(:published => 0, :id => @label.origin),
:class => 'btn btn-default' if can?(:update, @label) %>
<% end %>
<%= render 'layouts/sections', :sections => Iqvoc::XLLabel.view_sections, :data => label_view_data(@label) %>