Updated routes for admins dashboard
• Updated: - routes for admins dashboard (expenses, group categories, promotions, trending hashtags) that were in the /settings path but are now in the /admin path - /filters to be in /settings/filters • Removed: - authorize_follow route
This commit is contained in:
6
app/views/admin/expenses/index.html.haml
Normal file
6
app/views/admin/expenses/index.html.haml
Normal file
@@ -0,0 +1,6 @@
|
||||
- content_for :page_title do
|
||||
= t('monthly_funding.title')
|
||||
|
||||
= form_tag admin_expenses_url, :method => :post do
|
||||
= text_field_tag "amount", "", placeholder: "0-100", :value => @amount
|
||||
= submit_tag "Submit"
|
||||
@@ -0,0 +1,5 @@
|
||||
%tr
|
||||
%td= group_categories.created_at
|
||||
%td= group_categories.text
|
||||
%td
|
||||
= table_link_to 'trash', t('group_categories.delete'), admin_group_categories_url(group_categories), method: :delete
|
||||
20
app/views/admin/group_categories/index.html.haml
Normal file
20
app/views/admin/group_categories/index.html.haml
Normal file
@@ -0,0 +1,20 @@
|
||||
- content_for :page_title do
|
||||
= t('group_categories.title')
|
||||
|
||||
= form_tag admin_group_categories_url, method: 'POST', class: 'simple_form' do
|
||||
.fields-group
|
||||
.input.string.optional
|
||||
= text_field_tag :text, params[:text], class: 'string optional', placeholder: I18n.t("group_categories.text")
|
||||
|
||||
.actions
|
||||
%button= t('group_categories.create')
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('categories.created_at')
|
||||
%th= t('categories.text')
|
||||
%th
|
||||
%tbody
|
||||
= render @categories
|
||||
8
app/views/admin/promotions/_promotion.html.haml
Normal file
8
app/views/admin/promotions/_promotion.html.haml
Normal 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_admin_promotion_path(promotion)
|
||||
= table_link_to 'trash', t('promotions.delete'), admin_promotion_path(promotion), method: :delete, data: { confirm: t('settings.promotions.are_you_sure') }
|
||||
14
app/views/admin/promotions/edit.html.haml
Normal file
14
app/views/admin/promotions/edit.html.haml
Normal file
@@ -0,0 +1,14 @@
|
||||
- content_for :page_title do
|
||||
= t('promotions.title')
|
||||
|
||||
= simple_form_for @promotion, url: admin_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
|
||||
16
app/views/admin/promotions/index.html.haml
Normal file
16
app/views/admin/promotions/index.html.haml
Normal 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_admin_promotion_path, class: 'button'
|
||||
14
app/views/admin/promotions/new.html.haml
Normal file
14
app/views/admin/promotions/new.html.haml
Normal file
@@ -0,0 +1,14 @@
|
||||
- content_for :page_title do
|
||||
= t('.title')
|
||||
|
||||
= simple_form_for @promotion, url: admin_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
|
||||
6
app/views/admin/trending_hashtags/index.html.haml
Normal file
6
app/views/admin/trending_hashtags/index.html.haml
Normal file
@@ -0,0 +1,6 @@
|
||||
- content_for :page_title do
|
||||
= 'Trending Hashtags'
|
||||
|
||||
= form_tag admin_trending_hashtags_url, :method => :post do
|
||||
= text_field_tag "trending_hashtags", "", :style => 'width:400px', placeholder: "StopTheSteal, Trump2020, Election2020", :value => @trending_hashtags
|
||||
= submit_tag "Submit"
|
||||
Reference in New Issue
Block a user