Merge branch 'dev_newproject' of https://git.trustie.net/jacknudt/trustieforge into dev_newproject
This commit is contained in:
commit
4156815394
|
@ -34,43 +34,81 @@ class VersionsController < ApplicationController
|
|||
def index
|
||||
# 顶部导航
|
||||
@project_menu_type = 7
|
||||
|
||||
type = params[:type]
|
||||
version_all_count = Version.where(:project_id => @project.id)
|
||||
case type
|
||||
when nil,"1"
|
||||
@versions = @project.versions
|
||||
when "2"
|
||||
@versions = @project.versions.where(:status => 'open')
|
||||
when "3"
|
||||
@versions = @project.versions.where(:status => 'locked')
|
||||
when "4"
|
||||
@versions = @project.versions.where(:status => 'closed')
|
||||
end
|
||||
@versions_count = Version.where(:project_id => @project.id).count
|
||||
@versions_open_count = Version.where(:project_id => @project.id, :status => "open").count
|
||||
@versions_locked_count = Version.where(:project_id => @project.id, :status => "locked").count
|
||||
@versions_closed_count = Version.where(:project_id => @project.id, :status => "closed").count
|
||||
@versions_count = version_type_count(type, @versions_count, @versions_open_count, @versions_locked_count, @versions_closed_count)
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@version_pages = Paginator.new @versions_count, @limit, params['page'] || 1
|
||||
@offset ||= @version_pages.offset
|
||||
@versions = paginateHelper @versions, @limit
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
@trackers = @project.trackers.sorted.all
|
||||
retrieve_selected_tracker_ids(@trackers, @trackers.select {|t| t.is_in_roadmap?})
|
||||
@with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
|
||||
project_ids = @with_subprojects ? @project.self_and_descendants.collect(&:id) : [@project.id]
|
||||
format.html
|
||||
format.js
|
||||
format.api
|
||||
# format.html {
|
||||
# @trackers = @project.trackers.sorted.all
|
||||
# retrieve_selected_tracker_ids(@trackers, @trackers.select {|t| t.is_in_roadmap?})
|
||||
# @with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
|
||||
# project_ids = @with_subprojects ? @project.self_and_descendants.collect(&:id) : [@project.id]
|
||||
#
|
||||
# @versions = @project.shared_versions || []
|
||||
# @versions += @project.rolled_up_versions.visible if @with_subprojects
|
||||
# #added by young
|
||||
# @versions = @versions.uniq.reverse#Modified by young
|
||||
# unless params[:completed]
|
||||
# @completed_versions = @versions.select {|version| version.closed? || version.completed? }
|
||||
# @versions -= @completed_versions
|
||||
# end
|
||||
# @offset, @limit = api_offset_and_limit({:limit => 4})
|
||||
# @versions_count = @versions.count
|
||||
# @versions_pages = Paginator.new @versions_count, @limit, params['page']
|
||||
# @offset ||= @versions_pages.offset
|
||||
# @versions = @versions.slice(@offset, @limit)
|
||||
# #end by young
|
||||
#
|
||||
# @issues_by_version = {}
|
||||
# if @selected_tracker_ids.any? && @versions.any?
|
||||
# issues = Issue.visible.all(
|
||||
# :include => [:project, :status, :tracker, :priority, :fixed_version],
|
||||
# :conditions => {:tracker_id => @selected_tracker_ids, :project_id => project_ids, :fixed_version_id => @versions.map(&:id)},
|
||||
# :order => "#{Project.table_name}.lft, #{Tracker.table_name}.position, #{Issue.table_name}.id"
|
||||
# )
|
||||
# @issues_by_version = issues.group_by(&:fixed_version)
|
||||
# end
|
||||
# @versions.reject! {|version| !project_ids.include?(version.project_id) && @issues_by_version[version].blank?}
|
||||
# }
|
||||
# format.api {
|
||||
# @versions = @project.shared_versions.all
|
||||
# }
|
||||
end
|
||||
end
|
||||
|
||||
@versions = @project.shared_versions || []
|
||||
@versions += @project.rolled_up_versions.visible if @with_subprojects
|
||||
#added by young
|
||||
@versions = @versions.uniq.reverse#Modified by young
|
||||
unless params[:completed]
|
||||
@completed_versions = @versions.select {|version| version.closed? || version.completed? }
|
||||
@versions -= @completed_versions
|
||||
end
|
||||
@offset, @limit = api_offset_and_limit({:limit => 4})
|
||||
@versions_count = @versions.count
|
||||
@versions_pages = Paginator.new @versions_count, @limit, params['page']
|
||||
@offset ||= @versions_pages.offset
|
||||
@versions = @versions.slice(@offset, @limit)
|
||||
#end by young
|
||||
|
||||
@issues_by_version = {}
|
||||
if @selected_tracker_ids.any? && @versions.any?
|
||||
issues = Issue.visible.all(
|
||||
:include => [:project, :status, :tracker, :priority, :fixed_version],
|
||||
:conditions => {:tracker_id => @selected_tracker_ids, :project_id => project_ids, :fixed_version_id => @versions.map(&:id)},
|
||||
:order => "#{Project.table_name}.lft, #{Tracker.table_name}.position, #{Issue.table_name}.id"
|
||||
)
|
||||
@issues_by_version = issues.group_by(&:fixed_version)
|
||||
end
|
||||
@versions.reject! {|version| !project_ids.include?(version.project_id) && @issues_by_version[version].blank?}
|
||||
}
|
||||
format.api {
|
||||
@versions = @project.shared_versions.all
|
||||
}
|
||||
# 统计各种类型数量
|
||||
def version_type_count type, all_count, opened_count, locked_count, closed_count
|
||||
case type
|
||||
when nil, "1"
|
||||
all_count
|
||||
when "2"
|
||||
opened_count
|
||||
when "3"
|
||||
locked_count
|
||||
when "4"
|
||||
closed_count
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -37,6 +37,11 @@ module ApplicationHelper
|
|||
# super
|
||||
# end
|
||||
|
||||
# 超出1w后用k+形式显示
|
||||
def switch_integer_into_k number
|
||||
number > 10000 ? (number.to_f / 1000).round.to_s + "k" : number
|
||||
end
|
||||
|
||||
# 隐藏项目以外的信息
|
||||
# return: true 显示,false 不显示
|
||||
def hidden_unproject_infos
|
||||
|
@ -1906,7 +1911,7 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def check_all_links(form_name)
|
||||
link_to_function_none(l(:button_check_all), "checkAll('#{form_name}', true)") + " ".html_safe + " | "+ " ".html_safe +
|
||||
link_to_function_none(l(:button_check_all), "checkAll('#{form_name}', true)") + " ".html_safe + " | "+ " ".html_safe +
|
||||
link_to_function_none(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
|
||||
end
|
||||
|
||||
|
|
|
@ -54,4 +54,18 @@ module VersionsHelper
|
|||
def status_by_options_for_select(value)
|
||||
options_for_select(STATUS_BY_CRITERIAS.collect {|criteria| [l("field_#{criteria}".to_sym), criteria]}, value)
|
||||
end
|
||||
|
||||
# 通过类型显示不同的样式
|
||||
def get_version_type type
|
||||
case type
|
||||
when "open"
|
||||
"roadmap_blueicon"
|
||||
when "locked"
|
||||
"roadmap_greenicon"
|
||||
when "closed"
|
||||
"roadmap_greyicon"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
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"><%= 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"><%= 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"><%= 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"><%= 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"><%= 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"><%= 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">25</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? %>
|
||||
|
|
|
@ -35,12 +35,11 @@
|
|||
<%= render :partial => 'layouts/base_project_top' %>
|
||||
</div>
|
||||
|
||||
<div class="fl">
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
<div style="clear:both;"></div>
|
||||
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
$("#search_orgs_result_list").html("");
|
||||
$("#search_orgs_result_list").append('<ul class="sy_new_tchlist fl">');
|
||||
<% @orgs_not_in_project.each do |org|%>
|
||||
link = "<li class='clear'><input type='checkbox'class='mr5 fl' name='orgNames[]' value='<%=org.id%>'/><span class='fl pro_new_idname'> <%=org.name %> </span></li>";
|
||||
link = "<li class='clear'><input type='checkbox'class='mr5 fl' name='orgNames[]' style='height:28px' value='<%=org.id%>'/><span class='fl pro_new_idname' style='line-height: 28px'> <%=org.name %> </span></li>";
|
||||
$("#search_orgs_result_list").append(link );
|
||||
<%end %>
|
||||
$("#search_orgs_result_list").append('</ul>');
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
<a href="<%= new_organization_path %>" class="fr sy_btn_green ">新建组织</a>
|
||||
<div class="cl mb5"></div>
|
||||
<%= form_tag url_for(:controller => 'org_projects', :action => 'create', :project_id => @project.id), :id => 'join_orgs_for_project', :remote => true do %>
|
||||
<input type="text" name="orgs" class="sy_new_search" placeholder="请输入组织名称" />
|
||||
<div id="search_orgs_result_list"></div>
|
||||
<input type="text" name="orgs" class="sy_new_search" style="height:28px;" placeholder="请输入组织名称" />
|
||||
<div class="cl mb5"></div>
|
||||
<div id="search_orgs_result_list" ></div>
|
||||
<ul id="paginator" class="wlist ml20" style="float:none;"></ul>
|
||||
<a href="javascript:void(0);" class="fl sy_btn_blue mr5" onclick="join_org(<%= @project.id %>);">关联</a>
|
||||
<a href="javascript:void(0);" class="fl sy_btn_grey mr5" onclick="cancel_join_orgs();">取消</a>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="sy_new_tchbox">
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
</li>
|
||||
<li class="mb10">
|
||||
<label class="label"><span class="c_red f12">*</span> 项目名称 : </label>
|
||||
<input type="text" name="project[name]" id="project_name" class="ml5 w690" maxlength="100" onkeyup="regex_project_name();" value="<%= @project.name %>">
|
||||
<span class="c_red ml5 fl" id="project_name_notice" style="display: none;">项目名称不能为空!</span>
|
||||
<input type="text" name="project[name]" id="project_name" class="ml5 w690" maxlength="100" style="height: 28px;" onkeyup="regex_project_name();" value="<%= @project.name %>">
|
||||
<div></div>
|
||||
<span class="c_red ml5 w690" id="project_name_notice" style="padding-left:100px;display: none;">项目名称不能为空!</span>
|
||||
</li>
|
||||
<li class="clear mb10">
|
||||
<label class="label fl"> 项目描述 : </label>
|
||||
<textarea class="fl ml5 w690" style="height:192px; padding-top:5px;" id="project_description" name="project[description]" rows="8" placeholder="项目描述作为项目的简介,将始终显示在动态页的顶部
|
||||
最多3000个汉字(或6000个英文字符)"><%= @project.description%></textarea>
|
||||
<textarea class="fl ml5 w690" style="height:192px; padding-top:5px;" id="project_description" name="project[description]" rows="8" placeholder="项目描述作为项目的简介,将始终显示在动态页的顶部 最多3000个汉字(或6000个英文字符)"><%= @project.description%></textarea>
|
||||
</li>
|
||||
<% if !@project.gpid.nil? && !@gitlab_branches.blank? %>
|
||||
<li class="clear">
|
||||
|
@ -24,12 +24,12 @@
|
|||
<% end %>
|
||||
<li class="clear">
|
||||
<label class="fl">公开 :</label>
|
||||
<input class="fl ml5" id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
|
||||
<input class="fl mt8" id="project_is_public" name="project[is_public]" type="checkbox" <%= @project.is_public ? "checked" : ""%>>
|
||||
<span class="fl c_grey ">(打钩为公开项目,不打钩为私有项目;私有项目仅项目成员可见。)</span>
|
||||
</li>
|
||||
<li class="clear mb10">
|
||||
<label class="fl ">隐藏代码库 :</label>
|
||||
<input class="fl ml5" id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
|
||||
<input class="fl mt8" id="project_hidden_repo" name="project[hidden_repo]" type="checkbox" <%= @project.hidden_repo ? "checked" : ""%>>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<% if Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") %>
|
||||
|
|
|
@ -15,6 +15,45 @@
|
|||
%>
|
||||
|
||||
<div class=" clear ml15 mr15" >
|
||||
<% if roles.any? %>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_green mb10" onclick="add_member();">添加成员</a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div class=" sy_new_tchbox clear ml10 mr10 undis" id="add_members_id">
|
||||
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||
<div class="hw_search_box mb10">
|
||||
<input id="principal_search" class="sy_new_search" placeholder="支持姓名、邮箱、登录名搜索" type="text">
|
||||
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
|
||||
</div>
|
||||
<ul class="pro_new_idlist fl">
|
||||
<div class="clear mb10" id="principals_for_new_member">
|
||||
<%= render_project_members(@project) %>
|
||||
</div>
|
||||
</ul>
|
||||
<ul class="fl pro_new_idbox">
|
||||
<% roles.each do |role| %>
|
||||
<li class="clear ">
|
||||
<%= radio_button_tag 'membership[role_ids][]', role.id, role.name == "报告人员" || role.name == "Reporter", :class=>"fl" %>
|
||||
<% if User.current.language == "zh" %>
|
||||
<% if role.id == 3 %>
|
||||
<div class="fl ml5" style="height:30px">管理人员</div>
|
||||
<% elsif role.id == 4 %>
|
||||
<div class="fl ml5" style="height:30px">开发人员</div>
|
||||
<% else %>
|
||||
<div class="fl ml5" style="height:30px">报告人员</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="fl ml5" style="height:30px"><%= h role %></div>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="cl mb10"></div>
|
||||
|
||||
<a href="javascript:void(0);" class="fr sy_btn_grey " onclick="hidden_add_member();">取消</a>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_blue mr5" onclick="$(this).parent().submit();">保存</a>
|
||||
<%end%>
|
||||
</div>
|
||||
<% if members.any? %>
|
||||
<table class="sy_new_table clear mb15" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
|
@ -76,45 +115,8 @@
|
|||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% end %>
|
||||
<% if roles.any? %>
|
||||
<a href="javascript:void(0);" class="fl sy_btn_green mb10" onclick="add_member();">添加成员</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class=" sy_new_tchbox clear ml10 mr10 undis" id="add_members_id">
|
||||
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
||||
<div class="hw_search_box mb10">
|
||||
<input id="principal_search" class="sy_new_search" placeholder="支持姓名、邮箱、登录名搜索" type="text">
|
||||
<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_project_memberships_path(@project, :format => 'js') }')" %>
|
||||
</div>
|
||||
<ul class="pro_new_idlist fl">
|
||||
<div class="clear mb10" id="principals_for_new_member">
|
||||
<%= render_project_members(@project) %>
|
||||
</div>
|
||||
</ul>
|
||||
<ul class="fl pro_new_idbox">
|
||||
<% roles.each do |role| %>
|
||||
<li class="clear ">
|
||||
<%= radio_button_tag 'membership[role_ids][]', role.id, role.name == "报告人员" || role.name == "Reporter", :class=>"fl" %>
|
||||
<% if User.current.language == "zh" %>
|
||||
<% if role.id == 3 %>
|
||||
<div class="fl ml5" style="height:30px">管理人员</div>
|
||||
<% elsif role.id == 4 %>
|
||||
<div class="fl ml5" style="height:30px">开发人员</div>
|
||||
<% else %>
|
||||
<div class="fl ml5" style="height:30px">报告人员</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="fl ml5" style="height:30px"><%= h role %></div>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="cl mb10"></div>
|
||||
|
||||
<a href="javascript:void(0);" class="fr sy_btn_grey " onclick="hidden_add_member();">取消</a>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_blue mr5" onclick="$(this).parent().submit();">保存</a>
|
||||
<%end%>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
<%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %>
|
||||
<% Redmine::AccessControl.available_project_modules.each do |m| %>
|
||||
<li class="clear ">
|
||||
<%= check_box_tag('enabled_module_names[]', m, @project.module_enabled?(m), :class=>"fl").html_safe -%>
|
||||
<%= check_box_tag('enabled_module_names[]', m, @project.module_enabled?(m), :class=>"fl mt8").html_safe -%>
|
||||
<p class="fl ml5"><%= l_or_humanize(m, :prefix => "project_module_").html_safe %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="clear ">
|
||||
<input class="fl" type="checkbox">
|
||||
<p class="fl ml5"><%= check_all_links('modules-form').html_safe %></p>
|
||||
<input class="fl mt8" type="checkbox">
|
||||
<p class="fl ml5"><%= check_all_links('modules-form').html_safe %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="clear">
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label class=" fl"><span class="c_red f12">*</span> 版本库名称 : </label>
|
||||
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl" %>
|
||||
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style=>"height: 28px;" %>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<label class=" fl"> </label>
|
||||
|
|
|
@ -106,16 +106,16 @@
|
|||
</li>
|
||||
<li class="mb10 clear">
|
||||
<label class="fl"> <%= l(:label_version_description) %> : </label>
|
||||
<%= f.text_field :description, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;"%>
|
||||
<%= f.text_field :description, :maxlength => 60, :class=>"w650 fl", :style=>"height:28px;"%>
|
||||
</li>
|
||||
<li class="mb10 clear">
|
||||
<label class=" fl"> <%= l(:milestone_date_closed) %> : </label>
|
||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"issues_calendar_input fl", :placeholder=>"结束日期", :style=>"height: 28px;" %>
|
||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"issues_calendar_input fl", :placeholder=>"结束日期", :style=>"height:28px;" %>
|
||||
<%= calendar_for('version_effective_date') %>
|
||||
</li>
|
||||
<li class="mb10 clear">
|
||||
<label class="fl"> <%= l(:field_status) %> : </label>
|
||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :style=>"border:1px solid #e5e5e5 height:28px;" %>
|
||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]},{},{:style=>"height:28px"} %>
|
||||
</li>
|
||||
<div class="cl mb10"></div>
|
||||
</ul>
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<% @versions.each do |version| %>
|
||||
<div class="clear new_roadmap_listbox">
|
||||
<div class="clear">
|
||||
<h4 class="fl new_roadmap_listtitle"><%= link_to_version version, :name => version_anchor(version) %></h4><span class="fl <%= get_version_type(version.status) %> mt3 ml5"></span>
|
||||
<%= link_to "导出", version_path(version, :format => 'xls'), :class => "btn_newpro_grey fr" %>
|
||||
<a href="javascript:void(0);" class="roadmap_icons_del fr mt5 mr5" alt="删除"></a>
|
||||
<a href="javascript:void(0);" class="roadmap_icons_edit fr mt5 " alt="编辑"></a>
|
||||
</div>
|
||||
<ul class="new_roadmap_list_txt clear mb5">
|
||||
<li>完成 <span class="ml5 c_red" title="<%= version.closed_percent %>"><%= version.closed_percent.round %>% </span></li>
|
||||
<li>Issues<span class="ml5 "><%= version.issues_count %> </span></li>
|
||||
<li>已关闭<span class="ml5 "><%= version.closed_issues_count %> </span></li>
|
||||
<li>
|
||||
<% if version.completed? %>
|
||||
<span></span><%= format_date(version.effective_date) %>
|
||||
<% elsif version.effective_date %>
|
||||
<span class="muban-icons-clock"></span><%= due_date_distance_in_words(version.effective_date) %>(<%= format_date(version.effective_date) %>)
|
||||
<% end %>
|
||||
<!--<span ></span>截止日期剩余 5天(2016-10-31)</li>-->
|
||||
</ul>
|
||||
<div class="c_grey">
|
||||
<p><%= version.description %></p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @version_pages, @versions_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
|
@ -1,78 +1,34 @@
|
|||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
|
||||
</div>
|
||||
<div class="roadmap">
|
||||
<fieldset id="filters" class="collapsible collapsed" >
|
||||
<legend><%= l(:label_version_display_settings)%></legend>
|
||||
<%= form_tag({}, :method => :get) do %>
|
||||
<% @trackers.each do |tracker| %>
|
||||
<label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s), :id => nil %>
|
||||
<%=h tracker.name %></label>
|
||||
<% end %>
|
||||
<!--label for="completed"><%#= check_box_tag "completed", 1, params[:completed] %> <%#= l(:label_show_completed_versions) %></label-->
|
||||
<% if @project.descendants.active.any? %>
|
||||
<%= hidden_field_tag 'with_subprojects', 0 %>
|
||||
<label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
|
||||
<% end %>
|
||||
<%= submit_tag l(:button_apply), :class => 'sub_btn ml10', :name => nil %>
|
||||
<%= link_to l(:label_version_new), new_project_version_path(@project), :class => 'green_u_btn fr' if User.current.allowed_to?(:manage_versions, @project) %>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
|
||||
<% if @versions.empty? %>
|
||||
<p class="nodata mt10"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<% @versions.each do |version| %>
|
||||
|
||||
<div class="roadmap_box" style="width:710px;">
|
||||
<p><a class=" f16 fb c_dblue ">
|
||||
<a class=" f16 fb c_dblue " ><%= version_anchor(version)%></a>
|
||||
<%#= link_to_version_show version, :name => version_anchor(version) %>
|
||||
<% if version.completed? %>
|
||||
<span style="color: #E8770D;float:right;"><%= format_date(version.effective_date) %></span>
|
||||
<% elsif version.effective_date %>
|
||||
<span style="color: #E8770D;float:right;"><strong><%= due_date_distance_in_words(version.effective_date) %></strong> (<%= format_date(version.effective_date) %>)</span>
|
||||
<% end %>
|
||||
</a>
|
||||
</p>
|
||||
<div class="roadmap_pro mb10">
|
||||
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
|
||||
<%#= render(:partial => "wiki/content", :locals => {:content => version.wiki_page.content}) if version.wiki_page %>
|
||||
|
||||
</div><!--roadmap_pro end-->
|
||||
<% if (issues = @issues_by_version[version]) && issues.size > 0 %>
|
||||
<div class="roadmap_list">
|
||||
<%= form_tag({}) do -%>
|
||||
<p class="f14 mb5">»<%= l(:label_related_issues) %></p>
|
||||
<ul class="roadmap_list_ul">
|
||||
<% issues.each do |issue| -%>
|
||||
<li style="overflow:hidden">
|
||||
<%= link_to_issue_version(issue, :project => (@project != issue.project)) %>
|
||||
<span class="mr5 fr" >指派给:<%= link_to "#{User.find(issue.try(:assigned_to_id)).show_name}", user_path(issue.try(:assigned_to_id)), :class => "c_blue hidden fr", :style => "width:50px;" %></span>
|
||||
</li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %><!--roadmap_list end-->
|
||||
<div class="roadmap_list">
|
||||
<p class="f14 mb5">»<%= l(:label_versions_description)%></p>
|
||||
<p><%=h version.description %></p>
|
||||
<!--p class="f14 mb5">»<%#= link_to "导出:Excel", version_path(version, :format => 'xls') %></p-->
|
||||
</div><!--roadmap_list end-->
|
||||
</div><!--roadmap_box end-->
|
||||
<% end %>
|
||||
<ul class="wlist" >
|
||||
<%= pagination_links_full @versions_pages%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div><!--roadmap end-->
|
||||
<!--里程碑列表开始-->
|
||||
<div class="new_roadmap_conbox mb10" >
|
||||
<div class="new_roadmap_navbox clear">
|
||||
<ul class="new_roadmap_nav fl" >
|
||||
<li class="new_roadmap_nav_hover">
|
||||
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5'>#{@versions_count}</span>".html_safe, project_roadmap_path(@project, :type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "打开<span class='new_roadmap_nav_taghover ml5'>#{@versions_open_count}</span>".html_safe, project_roadmap_path(@project, :type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "锁定<span class='new_roadmap_nav_taghover ml5'>#{@versions_locked_count}</span>".html_safe, project_roadmap_path(@project, :type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "关闭<span class='new_roadmap_nav_taghover ml5'>#{@versions_closed_count}</span>".html_safe, project_roadmap_path(@project, :type => "4"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="javascript:void(0);" class="btn btn-green fr mr15 mt10"> 新建 </a>
|
||||
</div>
|
||||
<div id="version_list">
|
||||
<%= render :partial => "versions/list" %>
|
||||
</div>
|
||||
</div><!--new_roadmap end-->
|
||||
<!--里程碑列表结束-->
|
||||
|
||||
<% html_title(l(:label_roadmap)) %>
|
||||
|
||||
<%= context_menu issues_context_menu_path %>
|
||||
|
||||
<script>
|
||||
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
|
||||
</script>
|
||||
<script type="text/javascript" language="javascript">
|
||||
$(".new_roadmap_nav li").click(function(){
|
||||
$(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
|
||||
$(this).addClass("new_roadmap_nav_hover");
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,2 @@
|
|||
$("#version_list").html('<%= escape_javascript(render :partial => 'list') %>');
|
||||
$("#pages").html('<%= pagination_links_full @version_pages, @versions_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');
|
Binary file not shown.
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 201 KiB |
|
@ -924,3 +924,50 @@ p.pro_new_grey{ line-height: 1.9; }
|
|||
.reply-banner {width:968px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
|
||||
.reply-container {border-bottom:1px solid #e3e3e3; width:940px; margin-top:15px; min-height:50px;}
|
||||
.reply-content {float:left; width:892px;}
|
||||
|
||||
/* 新版里程碑 20161019byLB */
|
||||
.new_roadmap_conbox{border:1px solid #dbdbdb; background: #fff; }
|
||||
.new_roadmap_navbox{border-bottom:1px solid #dbdbdb;}
|
||||
.new_roadmap_nav {border:1px solid #dbdbdb;-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; margin:10px 15px; }
|
||||
.new_roadmap_nav li {float:left; padding:5px 15px; display: block; text-align:center;border-right:1px solid #dbdbdb; }
|
||||
.new_roadmap_nav li:last-child{ border-right: none;}
|
||||
.new_roadmap_nav li a{font-size:12px; color:#444;}
|
||||
.new_roadmap_nav_hover{ background: #3498db; }
|
||||
.new_roadmap_nav_nomal { }
|
||||
.new_roadmap_nav_hover a{color: #fff !important; }
|
||||
.new_roadmap_type_nomal{ color: red;}
|
||||
.new_roadmap_type_hover{color: #fff;}
|
||||
.new_roadmap_nav_tagnomal{ background-color:#eaeaea; padding:0px 5px;-webkit-border-radius:15px;-moz-border-radius:15px;-o-border-radius:15px;border-radius:15px; font-size:12px;}
|
||||
.new_roadmap_nav_taghover{ padding:0px 5px;-webkit-border-radius:15px;-moz-border-radius:15px;-o-border-radius:15px;border-radius:15px; font-size:12px;background: #6bb1e5; color: #fff;}
|
||||
.undis {display:none;}
|
||||
.dis {display:block;}
|
||||
.new_roadmap_listbox{ padding:15px;border-bottom:1px solid #dbdbdb;}
|
||||
.new_roadmap_listtitle a{ color: #333;display:block;max-width:840px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
.new_roadmap_listtitle a:hover{ color:#3498db;}
|
||||
.new_roadmap_list_txt{ color: #666;}
|
||||
.new_roadmap_list_txt li{ float: left; margin-right: 10px;}
|
||||
.roadmap_blueicon{ background: url(/images/new_project/icons_issue.png) 0 -149px no-repeat; display: inline-block; width: 32px; height: 16px;}
|
||||
.roadmap_greenicon{ background: url(/images/new_project/icons_issue.png) 0 -173px no-repeat; display: inline-block; width: 32px; height: 16px;}
|
||||
.roadmap_greyicon{ background: url(/images/new_project/icons_issue.png) 0 -198px no-repeat; display: inline-block; width: 32px; height: 16px;}
|
||||
.roadmap_icons_edit{ display: inline-block; padding:9px;}
|
||||
.roadmap_icons_del{ display: inline-block;padding:9px;}
|
||||
.roadmap_icons_edit:hover{ background:url(/images/new_project/icons_issue.png) -29px -227px no-repeat; }
|
||||
.roadmap_icons_del:hover{ background:url(/images/new_project/icons_issue.png) -29px -249px no-repeat;}
|
||||
select.new_roadmap_select{border:1px solid #dbdbdb; color: #666;}
|
||||
.roadmap_progressbar{ display: inline-block; width: 300px;border-radius:15px; background: #eaebec; height: 10px; position: relative;}
|
||||
.roadmap_progressbar_inner{ display: inline-block; position: absolute;width:100px;border-radius:15px; background: #80c57b; height: 10px; top:0 left:0;}
|
||||
.new_roadmap_info_top{border-bottom:1px solid #dbdbdb; padding:10px 15px;}
|
||||
.new_roadmap_icons_back{ background: url(/images/new_project/icons_issue.png) 0 -247px no-repeat; display: inline-block; width: 16px; height: 12px;}
|
||||
.pd15box{ padding:0 15px;}
|
||||
.new_roadmap_info_title{ display: block; margin-left: 10px; text-align: left;max-width:520px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
.new_roadmap_info_name{ display: block; margin-left: 10px; text-align: left;max-width:80px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||
.pages{margin:10px auto 10px;}
|
||||
/*表格*/
|
||||
.new_roadmap_table{ width:100%; background:#fff; border:1px solid #e5e5e5; border-bottom: none; text-align: center;}
|
||||
.new_roadmap_table thead tr,.sy_new_table tbody tr{ height:40px; line-height:40px; border-bottom:1px solid #e5e5e5;}
|
||||
.new_roadmap_table thead tr th{ border-bottom:1px solid #e5e5e5; font-weight: bold; background-image: linear-gradient(#fcfcfc, #eee);}
|
||||
.new_roadmap_table tbody tr:hover{ background:#f5f5f5;}
|
||||
.new_roadmap_table tbody tr td{ height:40px; line-height:40px; border-bottom:1px solid #e5e5e5; color:#888;}
|
||||
.new_roadmap_table td{ padding:0 5px;}
|
||||
/*模板图标20161020byLB*/
|
||||
.muban-icons-clock{ background: url("/images/new_project/icons_issue.png") 0 -224px no-repeat; display: inline-block; width: 19px; height: 13px;}
|
Loading…
Reference in New Issue