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