1.modify show of data

2.modify tool bar show when differ user login
This commit is contained in:
xianbo 2013-10-15 09:39:44 +08:00
parent 6e10f16c68
commit 13e7280245
4 changed files with 26 additions and 9 deletions

View File

@ -15,16 +15,23 @@
<tr>
<td> <% if bid.reward_type.nil? or bid.reward_type == 1%> <strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: 微软雅黑"><%= l(:label_call_bonus) %>&nbsp;<%= l(:label_RMB_sign) %><%= bid.budget%></span></strong> <% elsif bid.reward_type == 2%> <strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= bid.budget%></span></strong> <% else %> <!-- <strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: 微软雅黑"><%= l(:label_bids_credit) %>&nbsp;<%= bid.budget%>&nbsp;<%= l(:label_bids_credit_number) %></span></strong> --> <% end %> <!-- <td style="color: rgb(255, 0, 0);"><strong><%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%></strong></td> --></td>
</tr>
<% if bid.reward_type == 3 %>
<% if bid.reward_type == 3 %>
<tr>
<td><span class="font_lighter"><% if bid.homework_type == 1%>
<%= l(:label_x_homework_project, :count => bid.homeworks.count) %>(<strong><%= link_to bid.homeworks.count, project_for_bid_path(bid.id) %></strong>)
<% else %><%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<strong><%= link_to bid.biding_projects.count, project_for_bid_path(bid.id) %></strong>)<% end %>
</span><span class="font_lighter"><%= l(:label_x_bids_responses, :count => bid.commit) %>(<strong><%= link_to bid.commit, respond_path(bid) %></strong>)</span><span class="font_lighter"> <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><%= link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span></td>
<%= l(:label_x_homework_project, :count => bid.homeworks.count) %>(<strong><span style="font-size: 17px"><%= link_to bid.homeworks.count, project_for_bid_path(bid.id) %></span></strong>)
<% else %>
<%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to bid.biding_projects.count, project_for_bid_path(bid.id) %></span></strong>)</span>
<% end %>
<span class="font_lighter"><%= l(:label_x_bids_responses, :count => bid.commit) %>(<strong><span style="font-size: 17px"><%= link_to bid.commit, respond_path(bid) %></span></strong>)</span>
<span class="font_lighter"> <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><span style="font-size: 17px"><%= link_to bid.watcher_users.count, respond_path(bid) %></span></strong>)</span>
</td>
</tr>
<% else %>
<tr>
<td><span class="font_lighter"><%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<strong><%= link_to bid.biding_projects.count, project_for_bid_path(bid) %></strong>) </span><span class="font_lighter"><%= l(:label_x_responses, :count => bid.commit) %>(<strong><%= link_to bid.commit, respond_path(bid) %></strong>)</span><span class="font_lighter"> <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><%= link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span></td>
<td><span class="font_lighter"><%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to bid.biding_projects.count, project_for_bid_path(bid) %></span></strong>) </span>
<span class="font_lighter"><%= l(:label_x_responses, :count => bid.commit) %>(<strong><span style="font-size: 17px"><%= link_to bid.commit, respond_path(bid) %></span></strong>)</span>
<span class="font_lighter"><%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><span style="font-size: 17px"><%= link_to bid.watcher_users.count, respond_path(bid) %></span></strong>)</span>
</td>
</tr>
<% unless bid.courses.empty? %>
<% teacher = Course.find_by_extra(bid.courses.first.identifier).teacher %>

View File

@ -16,7 +16,10 @@
</tr>
<tr>
<td><span class="font_lighter"><%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<strong><%= link_to bid.biding_projects.count, project_for_bid_path(bid) %></strong>)</span><span class="font_lighter"><%= l(:label_x_bids_responses, :count => bid.commit) %>(<strong><%= link_to bid.commit, respond_path(bid) %></strong>)</span><span class="font_lighter"> <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><%= link_to bid.watcher_users.count, respond_path(bid) %></strong>)</span></td>
<td><span class="font_lighter"><%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<strong><span style="font-size: 17px"><%= link_to bid.biding_projects.count, project_for_bid_path(bid) %></span></strong>)</span>
<span class="font_lighter"><%= l(:label_x_bids_responses, :count => bid.commit) %>(<strong><span style="font-size: 17px"><%= link_to bid.commit, respond_path(bid) %></span></strong>)</span>
<span class="font_lighter"><%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<strong><span style="font-size: 17px"><%= link_to bid.watcher_users.count, respond_path(bid) %></span></strong>)</span>
</td>
</tr>
</table></td>

View File

@ -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) %>

View File

@ -7,8 +7,16 @@
</div>
<%= 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 %>
<!-- <div style="float: right; margin-top: 13px;">
<%= content_tag('div', "#{link_to(image_tag('/images/mes.png'), feedback_path(User.current))}".html_safe, :title => "留言") if User.current.logged? %>
</div> -->