Merge branch 'feature/promoted-gabs' of https://code.gab.com/gab/social/gab-social into develop

This commit is contained in:
Rob Colbert
2019-09-03 18:38:37 -04:00
17 changed files with 226 additions and 22 deletions

View File

@@ -0,0 +1,8 @@
%tr
%td= promotion.timeline_id
%td= promotion.status_id
%td= promotion.expires_at
%td= promotion.position
%td
= table_link_to 'pencil', t('promotions.edit'), edit_settings_promotion_path(promotion)
= table_link_to 'trash', t('promotions.delete'), settings_promotion_path(promotion), method: :delete, data: { confirm: t('settings.promotions.are_you_sure') }

View File

@@ -0,0 +1,14 @@
- content_for :page_title do
= t('promotions.title')
= simple_form_for @promotion, url: settings_promotion_path(@promotion) do |f|
= render 'shared/error_messages', object: @promotion
.fields-group
= f.input :timeline_id, wrapper: :with_label, label: t('promotions.timeline_id')
= f.input :status_id, wrapper: :with_label, label: t('promotions.status_id')
= f.input :expires_at, as: :string, wrapper: :with_label, label: t('promotions.expires_at')
= f.input :position, wrapper: :with_label, label: t('promotions.position')
.actions
= f.button :button, t('generic.save_changes'), type: :submit

View File

@@ -0,0 +1,16 @@
- content_for :page_title do
= t('promotions.title')
.table-wrapper
%table.table
%thead
%tr
%th= t('promotions.timeline_id')
%th= t('promotions.status_id')
%th= t('promotions.expires_at')
%th= t('promotions.position')
%th
%tbody
= render @promotions
= link_to t('promotions.create'), new_settings_promotion_path, class: 'button'

View File

@@ -0,0 +1,14 @@
- content_for :page_title do
= t('.title')
= simple_form_for @promotion, url: settings_promotions_path do |f|
= render 'shared/error_messages', object: @promotion
.fields-group
= f.input :timeline_id, wrapper: :with_label, label: t('promotions.timeline_id')
= f.input :status_id, wrapper: :with_label, label: t('promotions.status_id')
= f.input :expires_at, as: :string, wrapper: :with_label, label: t('promotions.expires_at')
= f.input :position, wrapper: :with_label, label: t('promotions.position')
.actions
= f.button :button, t('.create'), type: :submit