guest user
This commit is contained in:
1 parent
9333503545
commit
01d278d688
26 files changed
+159
-72
No files matched your search
+6
-2
@@ -1,9 +1,13 @@
|
||||
class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||
|
||||
before_filter :authenticate_user!
|
||||
#before_filter :authenticate_user!, :except => [:index]
|
||||
# before_filter :for_admin_only,:only => [:]
|
||||
# before_filter :for_app_manager,:only => [:index,:show,]
|
||||
before_filter :force_order_for_visitor,:only=>[:index,:show,:get_sorted_and_filtered_bulletins]
|
||||
before_filter :force_order_for_user,:except => [:index,:show,:get_sorted_and_filtered_bulletins]
|
||||
before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_bulletins]
|
||||
|
||||
|
||||
|
||||
def index
|
||||
# @bulletins = Bulletin.all
|
||||
# @bulletins = Bulletin.desc("postdate desc")
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<tr id="<%= dom_id bulletin %>" class="with_action">
|
||||
<td>
|
||||
<% if (bulletin.create_user_id == current_user.id) || is_manager? %>
|
||||
<% if (bulletin.create_user_id == current_or_guest_user.id) || is_manager? %>
|
||||
<%= check_box_tag 'to_delete[]', bulletin.id, false, :class => "checkbox_in_list" %>
|
||||
<% end -%>
|
||||
</td>
|
||||
@@ -34,9 +34,9 @@
|
||||
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<% if (bulletin.create_user_id == current_user.id) || is_manager? %>
|
||||
<% if (bulletin.create_user_id == current_or_guest_user.id) || is_manager? %>
|
||||
|
||||
<% if current_user.admin? || (!bulletin.is_rejected? && !bulletin.is_checked?) %>
|
||||
<% if current_or_guest_user.admin? || (!bulletin.is_rejected? && !bulletin.is_checked?) %>
|
||||
<li><%= link_to t('bulletin.edit'), edit_panel_announcement_back_end_bulletin_path(bulletin) %></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" data-toggle="dropdown" class="dropdown-toggle"><%= t(:quick_edit) %><b class="caret"></b></a>
|
||||
|
||||
+3
-3
@@ -2,8 +2,8 @@
|
||||
<%= link_to t(:top), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_top'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_top')}" %>
|
||||
<%= link_to t(:hot), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hot')}" %>
|
||||
<%= link_to t(:hidden), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hidden'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hidden')}" %>
|
||||
<%= link_to t(:pending), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_pending'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_pending')}" %>
|
||||
<%= link_to t(:passed), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_checked'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_checked')}" %>
|
||||
<%= link_to t(:rejected), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_rejected'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_rejected')}" %>
|
||||
<%= link_to t(:pending), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_pending'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_pending')}" if(is_manager?)%>
|
||||
<%= link_to t(:passed), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_checked'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_checked')}" if(is_manager?)%>
|
||||
<%= link_to t(:rejected), panel_announcement_back_end_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_rejected'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_rejected')}" if(is_manager?)%>
|
||||
</div>
|
||||
<%= render :partial => 'clear_filters', :locals => {:type => 'status'} %>
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
||||
<% end %>
|
||||
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('admin.add'), new_panel_announcement_back_end_bulletin_path, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to(content_tag(:i, nil, :class => 'icon-plus icon-white') + t('admin.add'), new_panel_announcement_back_end_bulletin_path, :class => 'btn btn-primary pull-right' )if (is_manager? rescue nil)%>
|
||||
<div id="bulletin_pagination" class="paginationFixed">
|
||||
<%= paginate @bulletins, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil, :sort_options => params[:sort_options]} %>
|
||||
</div>
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
class Panel::News::BackEnd::NewsBulletinCategorysController < OrbitBackendController
|
||||
before_filter :force_order_for_visitor,:only=>[:index]
|
||||
before_filter :force_order_for_user,:except => [:index]
|
||||
before_filter :for_app_sub_manager,:except => [:index]
|
||||
|
||||
before_filter :for_app_manager,:except => [:index]
|
||||
|
||||
|
||||
def index
|
||||
|
||||
Vendored
+4
-3
@@ -1,9 +1,10 @@
|
||||
class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
||||
|
||||
before_filter :authenticate_user!
|
||||
class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
||||
#before_filter :authenticate_user!
|
||||
|
||||
# before_filter :for_admin_only,:only => [:]
|
||||
# before_filter :for_app_manager,:only => [:index,:show,]
|
||||
before_filter :force_order_for_visitor,:only=>[:index,:show,:get_sorted_and_filtered_news_bulletins]
|
||||
before_filter :force_order_for_user,:except => [:index,:show,:get_sorted_and_filtered_news_bulletins]
|
||||
before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_news_bulletins]
|
||||
|
||||
def index
|
||||
|
||||
Vendored
+3
-3
@@ -2,8 +2,8 @@
|
||||
<%= link_to t(:top), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_top'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_top')}" %>
|
||||
<%= link_to t(:hot), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hot'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hot')}" %>
|
||||
<%= link_to t(:hidden), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_hidden'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_hidden')}" %>
|
||||
<%= link_to t(:pending), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_pending'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_pending')}" %>
|
||||
<%= link_to t(:passed), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_checked'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_checked')}" %>
|
||||
<%= link_to t(:rejected), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_rejected'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_rejected')}" %>
|
||||
<%= link_to t(:pending), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_pending'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_pending')}" if(is_manager?) %>
|
||||
<%= link_to t(:passed), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_checked'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_checked')}" if(is_manager?)%>
|
||||
<%= link_to t(:rejected), panel_news_back_end_news_bulletins_path(:filter => @filter, :new_filter => {:type => 'status', :id => 'is_rejected'}, :sort => params[:sort], :direction => params[:direction], :sort_options => params[:sort_options]), :class => "btn js_history#{is_filter_active?('status', 'is_rejected')}" if(is_manager?)%>
|
||||
</div>
|
||||
<%= render :partial => 'clear_filters', :locals => {:type => 'status'} %>
|
||||
Vendored
+3
-3
@@ -1,6 +1,6 @@
|
||||
<tr id="<%= dom_id news_bulletin %>" class="with_action">
|
||||
<td>
|
||||
<% if (news_bulletin.create_user_id == current_user.id) || is_manager? %>
|
||||
<% if (news_bulletin.create_user_id == current_or_guest_user.id) || is_manager? %>
|
||||
<%= check_box_tag 'to_delete[]', news_bulletin.id, false, :class => "checkbox_in_list" %>
|
||||
<% end -%>
|
||||
</td>
|
||||
@@ -34,9 +34,9 @@
|
||||
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<% if (news_bulletin.create_user_id == current_user.id) || is_manager? %>
|
||||
<% if (news_bulletin.create_user_id == current_or_guest_user.id) || is_manager? %>
|
||||
|
||||
<% if current_user.admin? || (!news_bulletin.is_rejected? && !news_bulletin.is_checked?) %>
|
||||
<% if current_or_guest_user.admin? || (!news_bulletin.is_rejected? && !news_bulletin.is_checked?) %>
|
||||
<li><%= link_to t('news_bulletin.edit'), edit_panel_news_back_end_news_bulletin_path(news_bulletin) %></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" data-toggle="dropdown" class="dropdown-toggle"><%= t(:quick_edit) %><b class="caret"></b></a>
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
<% end %>
|
||||
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('admin.add'), new_panel_news_back_end_news_bulletin_path, :class => 'btn btn-primary' %>
|
||||
<%= link_to(content_tag(:i, nil, :class => 'icon-plus icon-white') + t('admin.add'), new_panel_news_back_end_news_bulletin_path, :class => 'btn btn-primary' )if (is_manager? rescue nil)%>
|
||||
<div id="news_bulletin_pagination" class="paginationFixed">
|
||||
<%= paginate @news_bulletins, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil, :sort_options => params[:sort_options]} %>
|
||||
</div>
|
||||
|
||||
+6
-3
@@ -1,7 +1,10 @@
|
||||
class Panel::PageContent::BackEnd::PageContextsController < OrbitBackendController
|
||||
before_filter :for_app_manager,:except => [:index,:edit,:update,:view,:show]
|
||||
before_filter :for_app_sub_manager,:only => [:edit,:update,:view,:show]
|
||||
:authenticate_user!
|
||||
before_filter :force_order_for_visitor,:only=>[:index]
|
||||
before_filter :force_order_for_user,:except => [:index]
|
||||
|
||||
before_filter :for_app_manager,:except => [:index]
|
||||
before_filter :for_app_sub_manager,:except => [:index]
|
||||
|
||||
#before_filter :is_admin?
|
||||
|
||||
def index
|
||||
|
||||
+5
-1
@@ -1,6 +1,10 @@
|
||||
class Panel::WebResource::BackEnd::WebLinksController < OrbitBackendController
|
||||
before_filter :authenticate_user!
|
||||
#before_filter :authenticate_user!
|
||||
# before_filter :for_app_manager,:except => [:index,:show]
|
||||
|
||||
before_filter :force_order_for_visitor,:only=>[:index]
|
||||
before_filter :force_order_for_user,:except => [:index]
|
||||
|
||||
before_filter :for_app_sub_manager,:except => [:index]
|
||||
|
||||
def index
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<tr id="<%= dom_id web_link %>" class="with_action">
|
||||
<td>
|
||||
<% if (web_link.create_user_id == current_user.id) || is_manager? %>
|
||||
<% if (web_link.create_user_id == current_or_guest_user.id) || is_manager? %>
|
||||
<%= check_box_tag 'to_delete[]', web_link.id, false, :class => "checkbox_in_list" %>
|
||||
<% end -%>
|
||||
</td>
|
||||
|
||||
Vendored
+1
-1
@@ -17,7 +17,7 @@
|
||||
<% end %>
|
||||
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_web_resource_back_end_web_link_path, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_web_resource_back_end_web_link_path, :class => 'btn btn-primary pull-right' if (is_manager? rescue nil) %>
|
||||
<div id="web_link_pagination" class="paginationFixed">
|
||||
<%= paginate @web_links, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user