Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove pages roles tab from memberships page

  • Loading branch information...
commit 62e669534651e4898feaa134afdff5119d307a27 1 parent bdacb97
Angelo Grossini authored
2  app/controllers/admin/page_roles_controller.rb
... ... @@ -1,2 +0,0 @@
1   -class Admin::PageRolesController < Admin::MembershipsController
2   -end
19 app/views/admin/memberships/_page_roles.html.erb
... ... @@ -1,19 +0,0 @@
1   -<div id="content" class="clearfix"></div>
2   -<table id="page-roles-table" cellpadding="5" cellspacing="5">
3   - <thead>
4   - <tr><th><Page><%= t('.page')%></th><th><%= t('.members_only')%></th></tr>
5   - </thead>
6   - <tbody>
7   - <% pages.each do |page|%>
8   - <tr class="<%= cycle("even", "odd") %>">
9   - <td><%= page.title %></td>
10   - <% roles.each do |role| %>
11   - <td align="center">
12   - <%= check_box_tag "page[role_ids][]", "page_#{page.id}_role_#{role.id}",
13   - page.role_ids.include?(role.id) %>
14   - </td>
15   - <% end %>
16   - </tr>
17   - <% end %>
18   - </tbody>
19   -</table>
12 app/views/admin/memberships/index.html.erb
@@ -5,21 +5,15 @@ end%>
5 5 <div id="page-tabs" class="clearfix ui-tabs ui-widget ui-widget-content ui-corner-all">
6 6 <ul id="page_parts" class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
7 7 <li><a href="#user_roles"><span><%= t('.members') %></span></a></li>
8   - <li><a href="#page_roles"><span><%= t('.pages') %></span></a></li>
  8 + <li><a href="#roles"><span><%= t('.roles') %></span></a></li>
9 9 </ul>
10 10
11 11 <div id="page_part_editors">
12 12 <div id="user_roles" class="page_part ui-tabs-panel ui-widget-content ui-corner-bottom wym_box wym_skin_refinery">
13 13 <%= render :partial => 'user_roles', :locals => {:members => @members} %>
14 14 </div>
15   - <div id="page_roles" class="page_part ui-tabs-panel ui-widget-content ui-corner-bottom wym_box wym_skin_refinery">
16   - <%= render :partial => 'page_roles',
17   - :layout => false,
18   - :locals => {
19   - :pages => @pages,
20   - :roles => @roles
21   - }
22   - %>
  15 + <div id="roles" class="page_part ui-tabs-panel ui-widget-content ui-corner-bottom wym_box wym_skin_refinery">
  16 + <%= render :partial => 'roles' %>
23 17 </div>
24 18 </div>
25 19 </div>

0 comments on commit 62e6695

Please sign in to comment.
Something went wrong with that request. Please try again.