approval fixed
This commit is contained in:
parent
f884511eef
commit
ef5c330146
|
@ -59,7 +59,7 @@ class Admin::NewsController < OrbitAdminController
|
||||||
news_bulletin = NewsBulletin.find(id)
|
news_bulletin = NewsBulletin.find(id)
|
||||||
news_bulletin.approved = true
|
news_bulletin.approved = true
|
||||||
news_bulletin.save
|
news_bulletin.save
|
||||||
redirect_to admin_news_path
|
redirect_to "/admin/news"
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<li><a href="/admin/news/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
|
<li><a href="/admin/news/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
|
||||||
<li><a href="#" class="delete text-error" rel="/admin/news/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
|
<li><a href="#" class="delete text-error" rel="/admin/news/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
|
||||||
<% if !b.approved && user_can_approve? %>
|
<% if !b.approved && user_can_approve? %>
|
||||||
<li><a href="<%= admin_news_approve_bulletin_path(:id => b.id.to_s) %>"><%= t("news.approve") %></a></li>
|
<li><a href="<%= admin_news_approve_news_bulletin_path(:id => b.id.to_s) %>"><%= t("news.approve") %></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -6,7 +6,7 @@ Rails.application.routes.draw do
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
post 'news/preview', to: 'news#preview'
|
post 'news/preview', to: 'news#preview'
|
||||||
get 'news/destroy_preview/:slug_title-:uid', to: 'news#destroy_preview'
|
get 'news/destroy_preview/:slug_title-:uid', to: 'news#destroy_preview'
|
||||||
get 'news/approve_bulletin', to: 'news#approve_bulletin'
|
get 'news/approve_news_bulletin', to: 'news#approve_news_bulletin'
|
||||||
get 'news_admins/get_departments' => "news_admins#get_departments"
|
get 'news_admins/get_departments' => "news_admins#get_departments"
|
||||||
resources :news
|
resources :news
|
||||||
resources :news_admins
|
resources :news_admins
|
||||||
|
|
Loading…
Reference in New Issue