Removed approval from announcements
This commit is contained in:
parent
fd560935cd
commit
44cd8854a9
|
@ -64,7 +64,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
# GET /bulletins/1/edit
|
# GET /bulletins/1/edit
|
||||||
def edit
|
def edit
|
||||||
@bulletin = Bulletin.find(params[:id])
|
@bulletin = Bulletin.find(params[:id])
|
||||||
if !current_user.admin? && (@bulletin.is_rejected? || @bulletin.is_checked?)
|
if !(is_manager? || is_admin?)
|
||||||
redirect_to :action => :index
|
redirect_to :action => :index
|
||||||
else
|
else
|
||||||
# @summary_variable = @bulletin.summary_variable
|
# @summary_variable = @bulletin.summary_variable
|
||||||
|
@ -84,11 +84,11 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
|
|
||||||
@bulletin.create_user_id = current_user.id
|
@bulletin.create_user_id = current_user.id
|
||||||
@bulletin.update_user_id = current_user.id
|
@bulletin.update_user_id = current_user.id
|
||||||
if(is_manager? || is_admin?)
|
# if(is_manager? || is_admin?)
|
||||||
@bulletin.is_checked = true
|
# @bulletin.is_checked = true
|
||||||
@bulletin.is_rejected = false
|
# @bulletin.is_rejected = false
|
||||||
@bulletin.de_pending
|
# @bulletin.de_pending
|
||||||
end
|
# end
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @bulletin.save
|
if @bulletin.save
|
||||||
|
@ -132,11 +132,11 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
||||||
if @bulletin.update_attributes(params[:bulletin])
|
if @bulletin.update_attributes(params[:bulletin])
|
||||||
if(is_manager? || is_admin?)
|
# if(is_manager? || is_admin?)
|
||||||
@bulletin.is_checked = true
|
# @bulletin.is_checked = true
|
||||||
@bulletin.is_rejected = false
|
# @bulletin.is_rejected = false
|
||||||
@bulletin.de_pending!
|
# @bulletin.de_pending!
|
||||||
end
|
# end
|
||||||
# if (params[:bulletin][:is_checked] == "false")
|
# if (params[:bulletin][:is_checked] == "false")
|
||||||
# @bulletin.is_rejected = true
|
# @bulletin.is_rejected = true
|
||||||
# @bulletin.save!
|
# @bulletin.save!
|
||||||
|
|
|
@ -8,7 +8,7 @@ class Bulletin
|
||||||
|
|
||||||
include OrbitCategory::Categorizable
|
include OrbitCategory::Categorizable
|
||||||
include OrbitCoreLib::Preview
|
include OrbitCoreLib::Preview
|
||||||
include OrbitModel::Approval
|
# include OrbitModel::Approval
|
||||||
include OrbitModel::LanguageRestrict
|
include OrbitModel::LanguageRestrict
|
||||||
include OrbitModel::Status
|
include OrbitModel::Status
|
||||||
include OrbitModel::TimeFrame
|
include OrbitModel::TimeFrame
|
||||||
|
@ -56,7 +56,8 @@ class Bulletin
|
||||||
# a
|
# a
|
||||||
# end
|
# end
|
||||||
boolean :frontend_search do
|
boolean :frontend_search do
|
||||||
( !is_hidden && !is_pending && is_checked && !is_rejected )
|
# ( !is_hidden && !is_pending && is_checked && !is_rejected )
|
||||||
|
(!is_hidden)
|
||||||
end
|
end
|
||||||
|
|
||||||
integer :view_count
|
integer :view_count
|
||||||
|
|
|
@ -18,11 +18,6 @@
|
||||||
<div class="input-area">
|
<div class="input-area">
|
||||||
|
|
||||||
<!-- Module Tabs -->
|
<!-- Module Tabs -->
|
||||||
<% if @bulletin.is_rejected %>
|
|
||||||
<div class="alert alert-error">
|
|
||||||
<strong><%= t(:rejected_reason) %></strong> <%= @bulletin.not_checked_reason rescue t("rejected_reason_empty") %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<div class="nav-name"><strong><%= t(:module) %></strong></div>
|
<div class="nav-name"><strong><%= t(:module) %></strong></div>
|
||||||
<ul class="nav nav-pills module-nav">
|
<ul class="nav nav-pills module-nav">
|
||||||
<li class="active">
|
<li class="active">
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
quick_edit_link type: 'delete',
|
quick_edit_link type: 'delete',
|
||||||
link: 'panel_announcement_back_end_bulletin_path'
|
link: 'panel_announcement_back_end_bulletin_path'
|
||||||
# can have: title, warning, cancel and submit values
|
# can have: title, warning, cancel and submit values
|
||||||
quick_edit_link type: 'approval',
|
# quick_edit_link type: 'approval',
|
||||||
link: 'panel_announcement_back_end_bulletin_approval_preview_path'
|
# link: 'panel_announcement_back_end_bulletin_approval_preview_path'
|
||||||
quick_edit_link type: 'reject_reason'
|
# quick_edit_link type: 'reject_reason'
|
||||||
field type: 'status',
|
field type: 'status',
|
||||||
db_field: @statuses,
|
db_field: @statuses,
|
||||||
translation: 'status',
|
translation: 'status',
|
||||||
|
|
|
@ -26,7 +26,7 @@ module Announcement
|
||||||
data_count 1..10
|
data_count 1..10
|
||||||
|
|
||||||
authorizable
|
authorizable
|
||||||
approvable
|
# approvable
|
||||||
categorizable
|
categorizable
|
||||||
taggable
|
taggable
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue