rosa-build/app/views/platforms/repositories/edit.html.slim

76 lines
3.1 KiB
Plaintext

-set_meta_tags title: [title_object(@repository), t('layout.repositories.edit')]
= render 'submenu'
.container.col-md-offset-2.col-md-8
.row
h3
= t("layout.repositories.about")
|  
i
= @repository.name
.row
= simple_form_for @repository, url: platform_repository_path(@platform, @repository) do |f|
= render "form", f: f
hr
- if can?(:update, @repository)
.row
h3= t('layout.repositories.extra_actions')
- if @platform.main?
.row
- if @repository.sync_lock_file_exists?
- label = t('layout.repositories.remove_sync_lock_file')
- path = sync_lock_file_platform_repository_path(@platform, @repository, remove: true)
- else
- label = t('layout.repositories.add_sync_lock_file')
- path = sync_lock_file_platform_repository_path(@platform, @repository)
= simple_form_for @repository, url: path, html: { method: :put } do |f|
.col-md-8
= t('layout.repositories.sync_lock_file_info')
.col-md-2
= f.button :submit, label, data: { confirm: t('layout.confirm') }, class: 'btn-warning'
.row.offset10
= simple_form_for @repository, url: regenerate_metadata_platform_repository_path(@platform, @repository), html: { method: :put } do |f|
.col-md-6
= t('layout.repositories.regenerate_metadata')
.col-md-2
- if @platform.personal?
= f.input :build_for_platform_id, collection: platform_options, label: false
.col-md-2
= f.button :submit, t('layout.repositories.regenerate_metadata'), data: { confirm: t('layout.confirm') }, class: 'btn-warning'
- if @repository.repository_statuses.present?
.row
hr
table.table.table-striped
thead
tr
th= t('activerecord.attributes.regeneration_status.status')
th= t('activerecord.attributes.regeneration_status.last_regenerated_status')
th= t('activerecord.attributes.regeneration_status.last_regenerated_log_sha1')
th= t('activerecord.attributes.regeneration_status.last_regenerated_at')
- unless @platform.main?
th= t('activerecord.models.platform')
tbody
- @repository.repository_statuses.sort_by{ |s| s.platform.name }.each do |status|
tr
td= t("layout.regeneration_statuses.statuses.#{status.human_status}")
td= t("layout.regeneration_statuses.last_regenerated_statuses.#{status.human_regeneration_status}")
td= link_to_file_store('regeneration.log', status.last_regenerated_log_sha1)
td= status.last_regenerated_at
- unless @platform.main?
td= status.platform.name
hr
.row
- if @platform.main?
= render "shared/members_table",
remove_members_path: remove_members_platform_repository_path(@platform, @repository),
add_member_path: add_member_platform_repository_path(@platform, @repository),
members: @members,
editable_object: @repository