Fix authorized problem.
This commit is contained in:
parent
a2d34148b2
commit
dcaa9f0ef1
|
@ -27,7 +27,7 @@
|
|||
<%= link_to contractors, (@venue_management_page_url.blank? ? "#" : "/#{I18n.locale}"+@venue_management_page_url+"/#{contractors.to_s.strip}-#{bill.id}?method=show_bill"), :target => '_self' %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<% if can_edit_or_delete?(bill) %>
|
||||
<% if can_edit_or_delete?(@venue_management || bill.venue_management_main) %>
|
||||
<li><%= link_to t(:edit), edit_admin_venue_management_bill_path(bill.id) %></li>
|
||||
<li><%= link_to t(:copy), copy_admin_venue_management_bills_path(:id=>bill.id) %></li>
|
||||
<li><a href="#" class="delete text-error" rel="/admin/venue_management_bills/<%=bill.id.to_s%>"><%= t(:delete_) %></a></li>
|
||||
|
@ -60,7 +60,9 @@
|
|||
<%= paginate(@bills) %>
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_bills_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank' %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_bill_path(id: @venue_management.id), class: "btn btn-primary" %>
|
||||
<% if can_edit_or_delete?(@venue_management) %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_bill_path(id: @venue_management.id), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<% if can_edit_or_delete?(contract) %>
|
||||
<% if can_edit_or_delete?(@venue_management || contract.venue_management_main) %>
|
||||
<li><%= link_to t(:edit), edit_admin_venue_management_contract_path(contract.id) %></li>
|
||||
<li><a href="#" class="delete text-error" rel="/admin/venue_management_contracts/<%=contract.id.to_s%>"><%= t(:delete_) %></a></li>
|
||||
<% end %>
|
||||
|
@ -57,7 +57,9 @@
|
|||
<%= paginate(@contracts) %>
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_contracts_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank' %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_contract_path(id: @venue_management.id), class: "btn btn-primary" %>
|
||||
<% if can_edit_or_delete?(@venue_management) %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_contract_path(id: @venue_management.id), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<% if can_edit_or_delete?(inviting) %>
|
||||
<% if can_edit_or_delete?(@venue_management || inviting.venue_management_main) %>
|
||||
<li><%= link_to t(:edit), edit_admin_venue_management_inviting_path(inviting.id) %></li>
|
||||
<li><a href="#" class="delete text-error" rel="/admin/venue_management_invitings/<%=inviting.id.to_s%>"><%= t(:delete_) %></a></li>
|
||||
<% end %>
|
||||
|
@ -52,7 +52,9 @@
|
|||
<%= paginate(@invitings) %>
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, class: "fa fa-download") + " " + t('venue_management.export'), export_admin_venue_management_invitings_path(:format=>'xlsx')+"#{(filter_url.blank? ? '' : ('?'+filter_url))}", class: "btn btn-primary", target: '_blank' %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_inviting_path(id: @venue_management.id), class: "btn btn-primary" %>
|
||||
<% if can_edit_or_delete?(@venue_management) %>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_inviting_path(id: @venue_management.id), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<%= link_to (memorabilia.case_no.blank? ? t("empty") : @venue_management_page_url.blank? ? "" : memorabilia.case_no), ("/#{I18n.locale}"+@venue_management_page_url+"/#{memorabilia.case_no.to_s.strip}-#{memorabilia.id}?method=show_memorabilia") , :target => '_blank' %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<% if can_edit_or_delete?(memorabilia) %>
|
||||
<% if can_edit_or_delete?(@venue_management || memorabilia.venue_management_main) %>
|
||||
<li><%= link_to t(:edit), edit_admin_venue_management_memorabilia_path(memorabilia.id) %></li>
|
||||
<li><a href="#" class="delete text-error" rel="/admin/venue_management_memorabilias/<%=memorabilia.id.to_s%>"><%= t(:delete_) %></a></li>
|
||||
<% end %>
|
||||
|
@ -46,9 +46,11 @@
|
|||
<div class="bottomnav clearfix">
|
||||
<%= content_tag :div, class: "pagination pagination-centered" do %>
|
||||
<%= paginate(@memorabilias) %>
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_memorabilia_path(id: @venue_management.id), class: "btn btn-primary" %>
|
||||
</div>
|
||||
<% if can_edit_or_delete?(@venue_management) %>
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), new_admin_venue_management_memorabilia_path(id: @venue_management.id), class: "btn btn-primary" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<!-- footer:end -->
|
||||
|
|
|
@ -12,7 +12,7 @@ module VenueManagement
|
|||
|
||||
side_bar do
|
||||
head_label_i18n 'venue_management.venue_management', icon_class: "icon-globe"
|
||||
available_for "managers"
|
||||
available_for "sub_managers"
|
||||
active_for_controllers (['admin/venue_managements'])
|
||||
head_link_path "admin_venue_managements_path"
|
||||
|
||||
|
@ -20,56 +20,56 @@ module VenueManagement
|
|||
:link_path=>"admin_venue_managements_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{'admin/venue_managements'=>'index'},
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
context_link 'new_',
|
||||
:link_path=>"new_admin_venue_management_path" ,
|
||||
:priority=>2,
|
||||
:active_for_action=>{'admin/venue_managements'=>'new'},
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
context_link 'categories',
|
||||
:link_path=>"admin_module_app_categories_path" ,
|
||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'venue_management').id}",
|
||||
:priority=>3,
|
||||
:active_for_action=>{'admin/venue_managements'=>'categories'},
|
||||
:active_for_category => 'VenueManagement',
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
context_link 'tags',
|
||||
:link_path=>"admin_module_app_tags_path" ,
|
||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'venue_management').id}",
|
||||
:priority=>4,
|
||||
:active_for_action=>{'admin/venue_managements'=>'tags'},
|
||||
:active_for_tag => 'VenueManagement',
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
context_link 'venue_management.set_venue_management_items',
|
||||
:link_path=>"admin_venue_management_items_path" ,
|
||||
:priority=>5,
|
||||
:active_for_action=>{'admin/venue_managements'=>'venue_management_items'},
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
context_link 'venue_management.set_venue_management_agreements',
|
||||
:link_path=>"admin_venue_management_agreements_path" ,
|
||||
:priority=>6,
|
||||
:active_for_action=>{'admin/venue_managements'=>'venue_management_agreements'},
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
context_link 'venue_management.set_venue_management_invitings',
|
||||
:link_path => 'admin_venue_management_invitings_path',
|
||||
:priority => 7,
|
||||
:active_for_action => { 'admin/venue_managements' => 'venue_management_invitings' },
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
context_link 'venue_management.set_venue_management_memorabilias',
|
||||
:link_path => 'admin_venue_management_memorabilias_path',
|
||||
:priority => 8,
|
||||
:active_for_action => { 'admin/venue_managements' => 'venue_management_memorabilias' },
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
context_link 'venue_management.set_venue_management_bills',
|
||||
:link_path => 'admin_venue_management_bills_path',
|
||||
:priority => 8,
|
||||
:active_for_action => { 'admin/venue_managements' => 'venue_management_bills' },
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
context_link 'venue_management.set_venue_management_contracts',
|
||||
:link_path => 'admin_venue_management_contracts_path',
|
||||
:priority => 9,
|
||||
:active_for_action => { 'admin/venue_managements' => 'venue_management_contracts' },
|
||||
:available_for => 'managers'
|
||||
:available_for => 'sub_managers'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue