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:
@@ -1,6 +1,6 @@
|
||||
- content_for :page_title do
|
||||
= t('monthly_funding.title')
|
||||
|
||||
= form_tag settings_expenses_url, :method => :post do
|
||||
= 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
|
||||
@@ -1,7 +1,7 @@
|
||||
- content_for :page_title do
|
||||
= t('group_categories.title')
|
||||
|
||||
= form_tag settings_group_categories_url, method: 'POST', class: 'simple_form' do
|
||||
= 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")
|
||||
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') }
|
||||
@@ -1,7 +1,7 @@
|
||||
- content_for :page_title do
|
||||
= t('promotions.title')
|
||||
|
||||
= simple_form_for @promotion, url: settings_promotion_path(@promotion) do |f|
|
||||
= simple_form_for @promotion, url: admin_promotion_path(@promotion) do |f|
|
||||
= render 'shared/error_messages', object: @promotion
|
||||
|
||||
.fields-group
|
||||
@@ -13,4 +13,4 @@
|
||||
%tbody
|
||||
= render @promotions
|
||||
|
||||
= link_to t('promotions.create'), new_settings_promotion_path, class: 'button'
|
||||
= link_to t('promotions.create'), new_admin_promotion_path, class: 'button'
|
||||
@@ -1,7 +1,7 @@
|
||||
- content_for :page_title do
|
||||
= t('.title')
|
||||
|
||||
= simple_form_for @promotion, url: settings_promotions_path do |f|
|
||||
= simple_form_for @promotion, url: admin_promotions_path do |f|
|
||||
= render 'shared/error_messages', object: @promotion
|
||||
|
||||
.fields-group
|
||||
@@ -1,6 +1,6 @@
|
||||
- content_for :page_title do
|
||||
= 'Trending Hashtags'
|
||||
|
||||
= form_tag settings_trending_hashtags_url, :method => :post do
|
||||
= 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"
|
||||
@@ -1,7 +1,7 @@
|
||||
- content_for :page_title do
|
||||
= t('filters.edit.title')
|
||||
|
||||
= simple_form_for @filter, url: filter_path(@filter), method: :put do |f|
|
||||
= simple_form_for @filter, url: settings_filter_path(@filter), method: :put do |f|
|
||||
= render 'fields', f: f
|
||||
|
||||
.actions
|
||||
@@ -14,7 +14,7 @@
|
||||
%td= filter.phrase
|
||||
%td= filter.context.map { |context| I18n.t("filters.contexts.#{context}") }.join(', ')
|
||||
%td
|
||||
= table_link_to 'pencil', t('filters.edit.title'), edit_filter_path(filter)
|
||||
= table_link_to 'times', t('filters.index.delete'), filter_path(filter), method: :delete
|
||||
= table_link_to 'pencil', t('filters.edit.title'), edit_settings_filter_path(filter)
|
||||
= table_link_to 'times', t('filters.index.delete'), settings_filter_path(filter), method: :delete
|
||||
|
||||
= link_to t('filters.new.title'), new_filter_path, class: 'button'
|
||||
= link_to t('filters.new.title'), new_settings_filter_path, class: 'button'
|
||||
@@ -1,7 +1,7 @@
|
||||
- content_for :page_title do
|
||||
= t('filters.new.title')
|
||||
|
||||
= simple_form_for @filter, url: filters_path do |f|
|
||||
= simple_form_for @filter, url: settings_filters_path do |f|
|
||||
= render 'fields', f: f
|
||||
|
||||
.actions
|
||||
@@ -1,5 +0,0 @@
|
||||
%tr
|
||||
%td= group_categories.created_at
|
||||
%td= group_categories.text
|
||||
%td
|
||||
= table_link_to 'trash', t('group_categories.delete'), settings_group_categories_path(group_categories), method: :delete
|
||||
@@ -1,8 +0,0 @@
|
||||
%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') }
|
||||
Reference in New Issue
Block a user