Removed approval from announcements

This commit is contained in:
saurabhbhatia 2013-12-10 10:31:14 +08:00
parent fd560935cd
commit 44cd8854a9
5 changed files with 18 additions and 22 deletions

View File

@ -64,7 +64,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
# GET /bulletins/1/edit
def edit
@bulletin = Bulletin.find(params[:id])
if !current_user.admin? && (@bulletin.is_rejected? || @bulletin.is_checked?)
if !(is_manager? || is_admin?)
redirect_to :action => :index
else
# @summary_variable = @bulletin.summary_variable
@ -84,11 +84,11 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
@bulletin.create_user_id = current_user.id
@bulletin.update_user_id = current_user.id
if(is_manager? || is_admin?)
@bulletin.is_checked = true
@bulletin.is_rejected = false
@bulletin.de_pending
end
# if(is_manager? || is_admin?)
# @bulletin.is_checked = true
# @bulletin.is_rejected = false
# @bulletin.de_pending
# end
respond_to do |format|
if @bulletin.save
@ -132,11 +132,11 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
respond_to do |format|
if @bulletin.update_attributes(params[:bulletin])
if(is_manager? || is_admin?)
@bulletin.is_checked = true
@bulletin.is_rejected = false
@bulletin.de_pending!
end
# if(is_manager? || is_admin?)
# @bulletin.is_checked = true
# @bulletin.is_rejected = false
# @bulletin.de_pending!
# end
# if (params[:bulletin][:is_checked] == "false")
# @bulletin.is_rejected = true
# @bulletin.save!

View File

@ -8,7 +8,7 @@ class Bulletin
include OrbitCategory::Categorizable
include OrbitCoreLib::Preview
include OrbitModel::Approval
# include OrbitModel::Approval
include OrbitModel::LanguageRestrict
include OrbitModel::Status
include OrbitModel::TimeFrame
@ -56,7 +56,8 @@ class Bulletin
# a
# end
boolean :frontend_search do
( !is_hidden && !is_pending && is_checked && !is_rejected )
# ( !is_hidden && !is_pending && is_checked && !is_rejected )
(!is_hidden)
end
integer :view_count

View File

@ -18,11 +18,6 @@
<div class="input-area">
<!-- 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>
<ul class="nav nav-pills module-nav">
<li class="active">

View File

@ -6,9 +6,9 @@
quick_edit_link type: 'delete',
link: 'panel_announcement_back_end_bulletin_path'
# can have: title, warning, cancel and submit values
quick_edit_link type: 'approval',
link: 'panel_announcement_back_end_bulletin_approval_preview_path'
quick_edit_link type: 'reject_reason'
# quick_edit_link type: 'approval',
# link: 'panel_announcement_back_end_bulletin_approval_preview_path'
# quick_edit_link type: 'reject_reason'
field type: 'status',
db_field: @statuses,
translation: 'status',

View File

@ -26,7 +26,7 @@ module Announcement
data_count 1..10
authorizable
approvable
# approvable
categorizable
taggable