Introduced invoices and deliveries. Integration (especially of deliveries) isn't finished yet.
This commit is contained in:
parent
1894f27fe0
commit
30f3d199d3
65 changed files with 1193 additions and 209 deletions
61
app/views/layouts/_main_tabnav.html.erb
Normal file
61
app/views/layouts/_main_tabnav.html.erb
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<%
|
||||
u = @current_user
|
||||
tabs = [
|
||||
{ :name => "Start", :url => root_path, :active => ["index", "messages", "tasks"],
|
||||
:subnav => [
|
||||
{ :name => "Members", :url => "/index/foodcoop_members"},
|
||||
{ :name => "Workgroups", :url => "/index/workgroups"},
|
||||
{ :name => "Tasks", :url => "/tasks"},
|
||||
{ :name => "Messages", :url => "/messages/inbox"},
|
||||
{ :name => "My Ordergroup", :url => my_order_group_path},
|
||||
{ :name => "My Ordergroup", :url => my_profile_path}
|
||||
]
|
||||
},
|
||||
{ :name => "Orders", :url => "/ordering", :active => ["orders", "ordering"],
|
||||
:subnav => [
|
||||
{ :name => "Order", :url => "/ordering" },
|
||||
{ :name => "My orders", :url => "/ordering/myOrders" },
|
||||
{ :name => "Manage orders", :url => "/orders", :access? => (u.role_orders?) }
|
||||
]
|
||||
},
|
||||
{ :name => "Articles", :url => "/articles", :active => ["articles", "suppliers"],
|
||||
:access? => (u.role_article_meta? || u.role_suppliers?),
|
||||
:subnav => [
|
||||
{ :name => "Show articles", :url => "/articles/list" },
|
||||
{ :name => "Categories", :url => "/articles" },
|
||||
{ :name => "Suppliers", :url => suppliers_path, :access? => (u.role_suppliers?) }
|
||||
]
|
||||
},
|
||||
{ :name => "Finance", :url => "/finance", :active => ["finance", "invoices"],
|
||||
:access? => (u.role_finance?),
|
||||
:subnav => [
|
||||
{ :name => "Ordergroups", :url => "/finance/listOrdergroups" },
|
||||
{ :name => "Balance orders", :url => "/finance/listOrders" },
|
||||
{ :name => "Invoices", :url => invoices_path }
|
||||
]
|
||||
},
|
||||
{ :name => "Administration", :url => "/admin", :active => ["admin"],
|
||||
:access? => (u.role_admin?),
|
||||
:subnav => [
|
||||
{ :name => "Users", :url => "/admin/listUsers" },
|
||||
{ :name => "Groups", :url => "/admin/listGroups" }
|
||||
]
|
||||
}
|
||||
]
|
||||
-%>
|
||||
<ul>
|
||||
<% for tab in tabs -%>
|
||||
<% unless tab[:access?] and tab[:access?] == false %>
|
||||
<li class="<%= 'current' if tab_is_active?(tab) %>">
|
||||
<%= link_to tab[:name], tab[:url] %>
|
||||
<ul>
|
||||
<% for subtab in tab[:subnav] -%>
|
||||
<% unless subtab[:access?] and subtab[:access?] == false %>
|
||||
<li><%= link_to subtab[:name], subtab[:url] %></li>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</li>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</ul>
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
%a{:href => "/"}
|
||||
<span>food</span>soft
|
||||
%span{:style => "color:white; font-size:45%; letter-spacing: -1px;"}= APP_CONFIG[:name]
|
||||
#nav= render :partial => 'shared/nav'
|
||||
#nav= render :partial => 'layouts/main_tabnav'
|
||||
|
||||
#main
|
||||
#content
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue