mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 18:59:38 +02:00
Refactor admin interface under namespace
This commit is contained in:
parent
0c3105a159
commit
a3b04786cf
7 changed files with 18 additions and 18 deletions
14
app/views/admin/setting_groups/index.haml
Normal file
14
app/views/admin/setting_groups/index.haml
Normal file
|
@ -0,0 +1,14 @@
|
|||
%h2= t('shared.setting_groups')
|
||||
%hr
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-striped.table-bordered
|
||||
%tr
|
||||
%th{class: 'col-xs-9'}
|
||||
= t('shared.setting_group')
|
||||
%th{class: 'col-xs-2'}
|
||||
= t('shared.action')
|
||||
- @setting_groups.each do |x|
|
||||
%tr
|
||||
%td= t("setting_groups.codes.#{x.code}")
|
||||
%td= link_to(t('shared.edit_settings'), admin_setting_group_path(x), class: 'btn btn-primary btn-xs')
|
19
app/views/admin/setting_groups/show.haml
Normal file
19
app/views/admin/setting_groups/show.haml
Normal file
|
@ -0,0 +1,19 @@
|
|||
%h2= t("setting_groups.codes.#{@setting_group.code}")
|
||||
%hr
|
||||
= form_for([:admin, @setting_group]) do |f|
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-striped.table-bordered
|
||||
%tr
|
||||
%th{class: 'col-xs-9'}
|
||||
= t('setting')
|
||||
%th{class: 'col-xs-2'}
|
||||
= t('value')
|
||||
- @setting_group.settings.each do |setting|
|
||||
= f.fields_for :settings, setting do |sf|
|
||||
%tr
|
||||
%td= sf.label :value, t("settings.codes.#{sf.object.code}")
|
||||
%td= sf.text_field(:value, autocomplete: 'off')
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
%button.btn.btn-primary=t('shared.save')
|
Loading…
Add table
Add a link
Reference in a new issue