fix and hide for visitors,except for album

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-11-21 11:46:06 +08:00
1 parent 96fe482d50
commit ee053cd8ac
16 files changed
+67 -39

No files matched your search

@@ -1,7 +1,7 @@
class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
before_filter :authenticate_user!
before_filter :is_admin?
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
@@ -10,12 +10,14 @@
<% if post.is_hidden? %>
<span class="label"><%= t(:hidden) %></span>
<% end %>
<% if is_manager?%>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<li><%= link_to t('archive_file.edit'), edit_panel_archive_back_end_archive_file_path(post) %></li>
<li><%= link_to t('archive_file.delete'), panel_archive_back_end_archive_file_path(post), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
</ul>
</div>
<%end%>
</td>
<td><%= post.archive_file_category.title %></td>
<td>
@@ -1,7 +1,11 @@
class Panel::Calendar::BackEnd::CalsController < OrbitBackendController
include AdminHelper
include Panel::Calendar::BackEnd::CalsHelper
before_filter :force_order_for_user
before_filter :force_order_for_visitor,:except=>[:new,:edit,:update,:create,:destroy]
before_filter :force_order_for_user,:only => [:new,:edit,:update,:create,:destroy]
before_filter :for_app_sub_manager,:only => [:new,:edit,:update,:create,:destroy]
def index
@calendars = Cal.all
end
@@ -58,6 +58,7 @@
</div>
<div id="view_holder"></div>
</div>
<% if is_manager? %>
<div class="form-actions form-fixed">
<div class="row-fluid">
<div class="span8">
@@ -67,6 +68,7 @@
</div>
</div>
</div>
<%end%>
<div id="event_create" class="modal" style="right: 8px; bottom: 50px; left: auto; top: auto; width: 380px; margin: 0;display:none;"></div>
<div id="event_quick_view" class="modal" style="width: 300px; display:none; margin:0 0 0 0;"></div>
@@ -3,7 +3,7 @@ class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
#before_filter :clean_values, :only => [:create, :update]
before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete]
before_filter :force_order_for_user,:except => :get_locations
before_filter :force_order_for_user,:except => [:get_locations,:index]
#before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations]
def index
@@ -6,8 +6,10 @@
<th class="span1"><%= t('location.longitude') %></th>
<th class="span1"><%= t('location.latitude') %></th>
<th class="span3"><%= t('location.description') %></th>
<th class="span1"><%= t('location.edit') %></th>
<th class="span1"><%= t('location.delete') %></th>
<%if is_manager? %>
<th class="span1"><%= t('location.edit') %></th>
<th class="span1"><%= t('location.delete') %></th>
<% end %>
</tr>
</thead>
<tbody id="tbody_locations" class="sort-holder">
@@ -18,11 +20,15 @@
<td><%= location.longitude%></td>
<td><%= location.latitude%></td>
<td><%= location.description%></td>
<td><%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %></td>
<td><%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %></td>
<%if is_manager? %>
<td><%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %></td>
<td><%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %></td>
<%end%>
</tr>
<% end %>
</tbody>
</table>
<%if is_manager? %>
<td><%= link_to 'New', new_panel_gprs_back_end_location_path %></td>
<% end %>