Added LinkBlock functionality in admin
• Added: - LinkBlock functionality in admin
This commit is contained in:
5
app/views/admin/link_blocks/_link_block.html.haml
Normal file
5
app/views/admin/link_blocks/_link_block.html.haml
Normal file
@@ -0,0 +1,5 @@
|
||||
%tr
|
||||
%td
|
||||
%samp= link_block.link
|
||||
%td
|
||||
= table_link_to 'trash', t('admin.link_blocks.delete'), admin_link_block_path(link_block), method: :delete
|
||||
14
app/views/admin/link_blocks/index.html.haml
Normal file
14
app/views/admin/link_blocks/index.html.haml
Normal file
@@ -0,0 +1,14 @@
|
||||
- content_for :page_title do
|
||||
= t('admin.link_blocks.title')
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('admin.link_blocks.link')
|
||||
%th
|
||||
%tbody
|
||||
= render @link_blocks
|
||||
|
||||
= paginate @link_blocks
|
||||
= link_to t('admin.link_blocks.add_new'), new_admin_link_block_path, class: 'button'
|
||||
11
app/views/admin/link_blocks/new.html.haml
Normal file
11
app/views/admin/link_blocks/new.html.haml
Normal file
@@ -0,0 +1,11 @@
|
||||
- content_for :page_title do
|
||||
= t('.title')
|
||||
|
||||
= simple_form_for @link_block, url: admin_link_blocks_path do |f|
|
||||
= render 'shared/error_messages', object: @link_block
|
||||
|
||||
.fields-group
|
||||
= f.input :link, wrapper: :with_label, label: t('admin.link_blocks.link')
|
||||
|
||||
.actions
|
||||
= f.button :button, t('.create'), type: :submit
|
||||
Reference in New Issue
Block a user