rosa-build/app/views/platforms/repositories/_form.html.haml

25 lines
1.2 KiB
Plaintext

- if ['edit', 'update'].exclude? controller.action_name
.leftlist= f.label :name, t("activerecord.attributes.repository.name"), :class => :label
.rightlist= f.text_field :name, :class => 'text_field'
.leftlist= f.label :description, t("activerecord.attributes.repository.description"), :class => :label
.rightlist= f.text_field :description, :class => 'text_field'
.leftlist= f.label :publish_without_qa, t("activerecord.attributes.repository.publish_without_qa"), :class => :label
.rightlist= f.check_box :publish_without_qa, :class => 'check_box'
.both
.hr
- if ['edit', 'update'].include?(controller.action_name) && can?(:regenerate_metadata, @repository)
.leftside= t('layout.repositories.regenerate_metadata')
.rightside
= link_to t('layout.repositories.regenerate_metadata').split.first, regenerate_metadata_platform_repository_path(@platform, @repository),
:method => :put, :confirm => t('layout.confirm'), :class => :button
.hr{:style => 'padding-bottom:20px;'}
.both
.button_block
= submit_tag t("layout.save")
%span.text_button_padding= t("layout.or")
= link_to t("layout.cancel"), @repository.new_record? ? platform_repositories_path(@platform) : platform_repository_path(@platform, @repository), :class => "button"