Merge branch 'dev_newproject' of https://git.trustie.net/jacknudt/trustieforge into dev_newproject
This commit is contained in:
commit
cf4d908c5e
|
@ -39,7 +39,7 @@ module ApplicationHelper
|
|||
|
||||
# 超出1w后用k+形式显示
|
||||
def switch_integer_into_k number
|
||||
number > 10000 ? (number / 1000).to_s + "k+" : number
|
||||
number > 10000 ? (number.to_f / 1000).round.to_s + "k" : number
|
||||
end
|
||||
|
||||
# 隐藏项目以外的信息
|
||||
|
|
|
@ -23,55 +23,39 @@
|
|||
<div class="pro_new_topnav mt15">
|
||||
<ul>
|
||||
<li id="project_menu_01">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "pro_new_proname" %>
|
||||
<% if project_acts > 0 %>
|
||||
<span class="issues_nav_tag ml5"><%= switch_integer_into_k(project_acts) %></span>
|
||||
<% end %>
|
||||
<%= link_to "#{l(:label_activity)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k(project_acts)}</span>".html_safe, {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "pro_new_proname", :title => "#{project_acts}" %>
|
||||
</li>
|
||||
<!--问题跟踪-->
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<li id="project_menu_02">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project, :remote => true), :class => "pro_new_proname" %>
|
||||
<% if project_issue_count > 0 %>
|
||||
<span class="issues_nav_tag ml5"><%= switch_integer_into_k project_issue_count %></span>
|
||||
<% end %>
|
||||
<%= link_to project_issue_count > 0 ? "#{l(:label_issue_tracking)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_issue_count}</span>".html_safe : "#{l(:label_issue_tracking)}", project_issues_path(@project, :remote => true), :class => "pro_new_proname", :title => "#{project_issue_count}" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<!--讨论区-->
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<li id="project_menu_03">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "pro_new_proname" %>
|
||||
<% unless project_score.board_num == 0 %>
|
||||
<span class="issues_nav_tag ml5"><%= switch_integer_into_k project_score.board_num %></span>
|
||||
<% end %>
|
||||
<%= link_to project_score.board_num > 0 ? "#{l(:project_module_boards)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.board_num}</span>".html_safe : "#{l(:project_module_boards)}", project_boards_path(@project), :class => "pro_new_proname", :title => "#{project_score.board_num}" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<!--资源库-->
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<li id="project_menu_04">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "pro_new_proname" %>
|
||||
<% unless project_file_num == 0 %>
|
||||
<span class="issues_nav_tag ml5"><%= switch_integer_into_k project_file_num %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
<%= link_to project_file_num > 0 ? "#{l(:project_module_files)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_file_num}</span>".html_safe : l(:project_module_files), project_files_path(@project), :class => "pro_new_proname", :title => "#{project_file_num}" %>
|
||||
<% end %>
|
||||
<!--版本库-->
|
||||
<% if visible_repository?(@project) %>
|
||||
<li id="project_menu_05"><%= link_to l(:project_module_repository),({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}), :class => "pro_new_proname" %>
|
||||
<% unless @project.project_score.changeset_num == 0 %>
|
||||
<span class="issues_nav_tag ml5"><%= switch_integer_into_k project_score.changeset_num %></span>
|
||||
<% end %>
|
||||
<li id="project_menu_05"><%= link_to @project.project_score.changeset_num > 0 ? "#{l(:project_module_repository)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.changeset_num}</span>".html_safe : "#{l(:project_module_repository)}",({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}), :class => "pro_new_proname", :title => "#{project_score.changeset_num}" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<!--Pull Request-->
|
||||
<li id="project_menu_06">
|
||||
<%= link_to "Pull Requests", project_pull_requests_path(@project), :class => "pro_new_proname" %>
|
||||
<span class="issues_nav_tag ml5"><%= switch_integer_into_k project_score.pull_request_num %></span>
|
||||
<%= link_to project_score.pull_request_num >0 ? "Pull Requests <span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.pull_request_num}</span>".html_safe : "Pull Requests", project_pull_requests_path(@project), :class => "pro_new_proname", :title => "#{project_score.pull_request_num}" %>
|
||||
<% if project_score.pull_request_num >0 %>
|
||||
<% end %>
|
||||
</li>
|
||||
<!--里程碑-->
|
||||
<li id="project_menu_07">
|
||||
<%= link_to l(:label_roadmap) ,project_roadmap_path(@project), :class => "pro_new_proname" %>
|
||||
<span class="issues_nav_tag ml5"><%= switch_integer_into_k @project.versions.count %></span>
|
||||
<%= link_to @project.versions.count >0 ? "#{l(:label_roadmap)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k @project.versions.count}</span>".html_safe : l(:label_roadmap) ,project_roadmap_path(@project), :class => "pro_new_proname" %>
|
||||
</li>
|
||||
<!--日历-->
|
||||
<% unless @project.enabled_modules.where("name = 'calendar'").empty? %>
|
||||
|
|
|
@ -888,7 +888,7 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
|
|||
.pro_new_setting_leftnav ul li a{ display: block; height: 40px; line-height: 40px; border-bottom:3px solid #fff; text-align: center; width:162px;}
|
||||
.pro_new_setting_leftnav ul li a:hover,.pro_new_setting_leftnav .active{ color: #3b94d6; background: #f3faff; }
|
||||
.pro_new_setting_conbox{ background: #fff; width: 818px; border:1px solid #ddd; padding-top: 15px;}
|
||||
.pro_new_setting_conbox input,.pro_new_setting_conbox select{ border:1px solid #c8c8c8; color: #888;}
|
||||
.pro_new_setting_conbox input,.pro_new_setting_conbox select{ border:1px solid #c8c8c8; color: #888;height: 28px;}
|
||||
.pro_new_setting_conbox label{width: 100px; text-align: right; display: inline-block;}
|
||||
.w690{width: 690px; }
|
||||
.pro_new_upimg{ width: 60px; height: 58px; border:1px solid #ddd; padding:1px;}
|
||||
|
|
Loading…
Reference in New Issue