#369: updated UI of #show and #edit for Platform
This commit is contained in:
parent
ccdb9ce16e
commit
3a815832ac
|
@ -36,29 +36,28 @@ fieldset
|
|||
data: { confirm: t("layout.platforms.confirm_change_visibility") },
|
||||
class: 'btn btn-xs btn-warning'
|
||||
|
||||
h3
|
||||
= t('layout.platform_arch_settings.extra_settings')
|
||||
|
||||
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th.lpadding16= t("activerecord.models.arch")
|
||||
th.lpadding16= t("activerecord.attributes.platform_arch_setting.default")
|
||||
th.lpadding16= t("activerecord.attributes.platform_arch_setting.time_living")
|
||||
tbody
|
||||
- platform_arch_settings(@platform).each do |setting|
|
||||
- unless @platform.personal?
|
||||
h3
|
||||
= t('layout.platform_arch_settings.extra_settings')
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
= f.fields_for :platform_arch_settings, setting do |s_form|
|
||||
td
|
||||
= setting.arch.name
|
||||
= s_form.hidden_field :arch_id
|
||||
td.center
|
||||
= s_form.input :default, as: :boolean, label: false
|
||||
td.right
|
||||
= s_form.input :time_living,
|
||||
input_html: { value: setting.time_living / 60 },
|
||||
label: false
|
||||
th.lpadding16= t("activerecord.models.arch")
|
||||
th.lpadding16= t("activerecord.attributes.platform_arch_setting.default")
|
||||
th.lpadding16= t("activerecord.attributes.platform_arch_setting.time_living")
|
||||
tbody
|
||||
- platform_arch_settings(@platform).each do |setting|
|
||||
tr
|
||||
= f.fields_for :platform_arch_settings, setting do |s_form|
|
||||
td
|
||||
= setting.arch.name
|
||||
= s_form.hidden_field :arch_id
|
||||
td.center
|
||||
= s_form.input :default, as: :boolean, label: false
|
||||
td.right
|
||||
= s_form.input :time_living,
|
||||
input_html: { value: setting.time_living / 60 },
|
||||
label: false
|
||||
|
||||
|
||||
.button_block
|
||||
|
|
|
@ -8,46 +8,65 @@
|
|||
= t('layout.platforms.about')
|
||||
|
|
||||
= link_to @platform.name, platform_contents_path(@platform)
|
||||
dl.dl-horizontal
|
||||
dt= t('activerecord.attributes.platform.description')
|
||||
dd= @platform.description
|
||||
|
||||
- if @platform.parent
|
||||
dt= t('activerecord.attributes.platform.parent')
|
||||
dd= link_to @platform.parent.description, platform_path(@platform.parent)
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('activerecord.attributes.platform.description')
|
||||
.col-md-8= @platform.description
|
||||
|
||||
dt= t('layout.platforms.owner')
|
||||
dd= link_to @platform.owner.try(:name), url_for(@platform.owner)
|
||||
- if @platform.parent
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('activerecord.attributes.platform.parent')
|
||||
.col-md-8
|
||||
= link_to @platform.parent.description, platform_path(@platform.parent)
|
||||
|
||||
dt= t('layout.platforms.visibility')
|
||||
dd= t("layout.visibilities.#{@platform.visibility}")
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.owner')
|
||||
.col-md-8= link_to @platform.owner.try(:name), url_for(@platform.owner)
|
||||
|
||||
dt= t('layout.platforms.platform_type')
|
||||
dd= @platform.platform_type
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.visibility')
|
||||
.col-md-8= t("layout.visibilities.#{@platform.visibility}")
|
||||
|
||||
dt= t('layout.platforms.distrib_type')
|
||||
dd= @platform.distrib_type
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.platform_type')
|
||||
.col-md-8= @platform.platform_type
|
||||
|
||||
- if can? :clone, @platform
|
||||
dt
|
||||
dd
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.distrib_type')
|
||||
.col-md-8= @platform.distrib_type
|
||||
|
||||
- if can? :clone, @platform
|
||||
.row
|
||||
.col-md-4
|
||||
.col-md-8
|
||||
a.btn.btn-primary href=clone_platform_path(@platform)
|
||||
= t('layout.platforms.clone')
|
||||
|
||||
- if @platform.platform_type == 'personal' and @platform.visibility == 'open'
|
||||
.col-md-6 ng-controller='PlatformSysReposController' ng-init="init(#{@platform.id})"
|
||||
h3= t('layout.platforms.sys_repos_header')
|
||||
dl.dl-horizontal
|
||||
dt= t('layout.platforms.target_platform')
|
||||
dd
|
||||
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.target_platform')
|
||||
.col-md-8
|
||||
select ng-model='platform' ng-change='updateCommand()'
|
||||
option ng-repeat='platform in platforms' ng-value='platform'
|
||||
| {{ platform }}
|
||||
|
||||
dt= t('layout.platforms.target_architecture')
|
||||
dd
|
||||
.row
|
||||
.col-md-4
|
||||
b= t('layout.platforms.target_architecture')
|
||||
.col-md-8
|
||||
select ng-model='arch' ng-change='updateCommand()'
|
||||
option ng-repeat='arch in arches' ng-value='arch'
|
||||
| {{ arch }}
|
||||
.row
|
||||
br
|
||||
textarea.form-control readonly='readonly' ng-model='command' rows=3 ng-click='selectAll($event)'
|
||||
|
|
Loading…
Reference in New Issue