diff --git a/app/views/bids/_bid_show.html.erb b/app/views/bids/_bid_show.html.erb index af7edea87..6702c3174 100644 --- a/app/views/bids/_bid_show.html.erb +++ b/app/views/bids/_bid_show.html.erb @@ -15,16 +15,23 @@ <% if bid.reward_type.nil? or bid.reward_type == 1%> <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%> <% elsif bid.reward_type == 2%> <%= l(:label_bids_reward_method) %><%= bid.budget%> <% else %> <% end %> - <% if bid.reward_type == 3 %> + <% if bid.reward_type == 3 %> <% if bid.homework_type == 1%> - <%= l(:label_x_homework_project, :count => bid.homeworks.count) %>(<%= link_to bid.homeworks.count, project_for_bid_path(bid.id) %>) - <% else %><%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid.id) %>)<% end %> - <%= l(:label_x_bids_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + <%= l(:label_x_homework_project, :count => bid.homeworks.count) %>(<%= link_to bid.homeworks.count, project_for_bid_path(bid.id) %>) + <% else %> + <%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid.id) %>) + <% end %> + <%= l(:label_x_bids_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) + <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + <% else %> - <%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>) <%= l(:label_x_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + <%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>) + <%= l(:label_x_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) + <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + <% unless bid.courses.empty? %> <% teacher = Course.find_by_extra(bid.courses.first.identifier).teacher %> diff --git a/app/views/bids/_contest_show.html.erb b/app/views/bids/_contest_show.html.erb index 96c3d1f42..9cc701781 100644 --- a/app/views/bids/_contest_show.html.erb +++ b/app/views/bids/_contest_show.html.erb @@ -16,7 +16,10 @@ - <%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>)<%= l(:label_x_bids_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + <%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>) + <%= l(:label_x_bids_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) + <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>) + diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index 688bb0a81..3f87eaabd 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -12,7 +12,6 @@ <% end %> -<%= link_to l(:button_log_time), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %> <%= watcher_link(@issue, User.current) %> <%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %> <%= link_to l(:button_delete), issue_path(@issue), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %> diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index edcdb772e..e9aeea165 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -7,8 +7,16 @@ <%= content_tag('div', "#{link_to(l(:label_layouts_feedback)+'(' + User.current.count_new_jour.to_s + ')', feedback_path(User.current))}".html_safe, :id => 'loggedas') if User.current.logged? %> <%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %> - <%= content_tag('li', "#{link_to(l(:label_enter_college), :controller =>'projects', :action => 'course_enterprise', :project_type => 1 )}".html_safe, :id=> 'account-enterprise') %> - <%= content_tag('li', "#{link_to(l(:lable_enter_enterprise), :controller => 'projects', :action =>'enterprise_course', :project_type => 0)}".html_safe, :id=> 'account-college') %> + <%if User.current.logged?%> + <%if [2,3].include?(User.current.user_extensions.identity) %> + <%= render_menu :top_enterprise_menu -%> + <% else %> + <%= render_menu :top_college_menu -%> + <% end %> + <% else %> + <%= content_tag('li', "#{link_to(l(:label_enter_college), :controller =>'projects', :action => 'course_enterprise', :project_type => 1 )}".html_safe, :id=> 'account-enterprise') %> + <%= content_tag('li', "#{link_to(l(:lable_enter_enterprise), :controller => 'projects', :action =>'enterprise_course', :project_type => 0)}".html_safe, :id=> 'account-college') %> + <% end %>