Merge branch 'dev_newproject' of https://git.trustie.net/jacknudt/trustieforge into dev_newproject
This commit is contained in:
commit
4bb13a0d3c
|
@ -1067,6 +1067,24 @@ module ApplicationHelper
|
|||
s.html_safe
|
||||
end
|
||||
|
||||
def assigned_options_for_select(collection, selected=nil)
|
||||
s = ''
|
||||
s << content_tag('option', "#{l(:label_assiged_tip)}", :value => 0)
|
||||
if collection.include?(User.current)
|
||||
s << content_tag('option', "<< #{l(:label_me)} >>", :value => User.current.id)
|
||||
end
|
||||
groups = ''
|
||||
collection.sort.each do |element|
|
||||
selected_attribute = ' selected="selected"' if option_value_selected?(element, selected)
|
||||
(element.is_a?(Group) ? groups : s) << %(<option value="#{element.id}"#{selected_attribute}>#{h element.show_name}</option>)
|
||||
end
|
||||
unless groups.empty?
|
||||
s << %(<optgroup label="#{h(l(:label_group_plural))}">#{groups}</optgroup>)
|
||||
end
|
||||
s.html_safe
|
||||
end
|
||||
|
||||
|
||||
# Options for the new membership projects combo-box
|
||||
def options_for_membership_project_select(principal, projects)
|
||||
options = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---")
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#RSide").removeAttr("id");
|
||||
$("#Container").css("width","1000px");
|
||||
$("#message_subject").focus();
|
||||
});
|
||||
</script>
|
||||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">
|
||||
编辑帖子
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => 'boards/project_new_topic',
|
||||
:locals => {:f => f, :edit_mode => edit_mode, :topic => topic, :project => project} %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#RSide").removeAttr("id");
|
||||
$("#Container").css("width","1000px");
|
||||
$("#message_subject").focus();
|
||||
});
|
||||
</script>
|
||||
<div class="mt10 mb10">
|
||||
<div class="banner-big">
|
||||
<div class="f16 fontGrey3">
|
||||
编辑帖子
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => 'boards/project_new_topic',
|
||||
:locals => {:f => f, :edit_mode => edit_mode, :topic => topic, :project => project} %>
|
||||
</div>
|
|
@ -3,11 +3,11 @@
|
|||
<% end %>
|
||||
|
||||
<%= error_messages_for 'message' %>
|
||||
<div class="resources mt10">
|
||||
<div class="container-big mt10">
|
||||
<div id="new_course_topic">
|
||||
<div class="homepagePostBrief c_grey">
|
||||
<div class="c_grey">
|
||||
<div>
|
||||
<input type="text" name="message[subject]" id="message_subject" class="InputBox w713" maxlength="128" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布帖子,请先输入帖子标题" value="<%= topic.subject%>" >
|
||||
<input type="text" name="message[subject]" id="message_subject" class="InputBox" style="width:963px;" maxlength="128" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布帖子,请先输入帖子标题" value="<%= topic.subject%>" >
|
||||
<p id="subjectmsg"></p>
|
||||
</div>
|
||||
<div id="topic_editor" style="display: none;">
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
<% end %>
|
||||
|
||||
<%= error_messages_for 'message' %>
|
||||
<div class="resources mt10">
|
||||
<div class="container-big mt10">
|
||||
<div id="new_course_topic">
|
||||
<div class="homepagePostBrief c_grey">
|
||||
<div class="pr c_grey">
|
||||
<div>
|
||||
<input type="text" name="message[subject]" id="message_subject" class="InputBox w713" maxlength="128" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布帖子,请先输入帖子标题" value="<%= topic.subject%>" >
|
||||
<input type="text" name="message[subject]" id="message_subject" class="InputBox" style="width:963px;" maxlength="128" onfocus="$('#topic_editor').show()" onkeyup="regexTopicSubject();" placeholder="发布帖子,请先输入帖子标题" value="<%= topic.subject%>" >
|
||||
<p id="subjectmsg"></p>
|
||||
</div>
|
||||
<div id="topic_editor" style="display: none;">
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
<%end%>
|
||||
</script>
|
||||
|
||||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName"><%= l(:label_borad_project) %></div>
|
||||
<div class="mt10 mb10">
|
||||
<div class="banner-big">
|
||||
<div class="f16 fontGrey3"><%= l(:label_borad_project) %></div>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<%= labelled_form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'},
|
||||
|
|
|
@ -1,40 +1,38 @@
|
|||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><%= @query.new_record? ? l(:label_calendar) : h(@query.name) %></h2>
|
||||
</div>
|
||||
<div class="container-big mb10">
|
||||
<div class="project_r_h" style="width:970px;">
|
||||
<h2 class="project_h2"><%= @query.new_record? ? l(:label_calendar) : h(@query.name) %></h2>
|
||||
</div>
|
||||
|
||||
<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
|
||||
:method => :get, :id => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<p style="float:right;">
|
||||
<%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %>
|
||||
</p>
|
||||
<p class="buttons">
|
||||
<%= label_tag('month', l(:label_month)) %>
|
||||
<%= select_month(@month, :prefix => "month", :discard_type => true) %>
|
||||
<%= label_tag('year', l(:label_year)) %>
|
||||
<%= select_year(@year, :prefix => "year", :discard_type => true) %>
|
||||
<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
|
||||
:method => :get, :id => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<p style="float:right;">
|
||||
<%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %>
|
||||
</p>
|
||||
<p class="buttons">
|
||||
<%= label_tag('month', l(:label_month)) %>
|
||||
<%= select_month(@month, :prefix => "month", :discard_type => true) %>
|
||||
<%= label_tag('year', l(:label_year)) %>
|
||||
<%= select_year(@year, :prefix => "year", :discard_type => true) %>
|
||||
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
<% if @query.valid? %>
|
||||
<%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
|
||||
<p class="legend cal">
|
||||
<span class="starting"><%= l(:text_tip_issue_begin_day) %></span>
|
||||
<span class="ending"><%= l(:text_tip_issue_end_day) %></span>
|
||||
<span class="starting ending"><%= l(:text_tip_issue_begin_end_day) %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= error_messages_for 'query' %>
|
||||
<% if @query.valid? %>
|
||||
<%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
|
||||
<p class="legend cal">
|
||||
<span class="starting"><%= l(:text_tip_issue_begin_day) %></span>
|
||||
<span class="ending"><%= l(:text_tip_issue_end_day) %></span>
|
||||
<span class="starting ending"><%= l(:text_tip_issue_begin_end_day) %></span>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_calendar)) -%>
|
||||
|
||||
<script>
|
||||
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
|
||||
</script>
|
||||
<% html_title(l(:label_calendar)) -%>
|
||||
</div>
|
|
@ -50,9 +50,9 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">资源库</div>
|
||||
<div class="mt10 mb10">
|
||||
<div class="banner-big">
|
||||
<div class="f16 fontGrey3 fl">资源库</div>
|
||||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="resourcesType">
|
||||
|
@ -66,8 +66,8 @@
|
|||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% unless User.current.logged? %>
|
||||
<div class="syllabusbox_tishi mt10">
|
||||
<p style="text-align: center;">您尚未登录,<a href='<%= signin_url_without_domain %>' class='syllabusbox_a_blue' target='_Blank' >登录</a>
|
||||
|
@ -75,8 +75,8 @@
|
|||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="resources mt10 pr" style="padding-bottom:5px;">
|
||||
<div class="reTop mb5">
|
||||
<div class="container-big mt10 pr" style="padding-bottom:5px;">
|
||||
<div class="reTop mb5" style="width:960px;">
|
||||
<%= form_tag( search_project_project_files_path(@project), method: 'get',:class => "re_search",:remote=>true) do %>
|
||||
<%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%>
|
||||
<%= submit_tag "项目内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()", :style =>"width:72px;" %>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<% delete_allowed = User.current.allowed_to?(:manage_files, project) %>
|
||||
<% project_attachments.each do |file| %>
|
||||
<% if file.is_public? || User.current.member_of?(project) || User.current.admin? %>
|
||||
<div class="resources mt10"><!--资源库内容开始--->
|
||||
<div class="homepagePostBrief">
|
||||
<div class="container-big mt10"><!--资源库内容开始--->
|
||||
<div class="pr">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(file.author), :width => 50, :height => 50), user_path(file.author) %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="content-big">
|
||||
<div class="homepagePostTitle break_word">
|
||||
<%# 如果有历史版本则提供历史版本下载 %>
|
||||
<% if file.attachment_histories.count == 0 %>
|
||||
|
|
|
@ -1,307 +1,309 @@
|
|||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><% @gantt.view = self %>
|
||||
<%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2>
|
||||
</div>
|
||||
<div class="container-big mb10">
|
||||
<div class="project_r_h" style="width:970px;">
|
||||
<h2 class="project_h2"><% @gantt.view = self %>
|
||||
<%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2>
|
||||
</div>
|
||||
|
||||
<%= form_tag({:controller => 'gantts', :action => 'show',
|
||||
:project_id => @project, :month => params[:month],
|
||||
:year => params[:year], :months => params[:months]},
|
||||
:method => :get, :id => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<!--<fieldset id="filters" class="collapsible <%#= @query.new_record? ? "" : "collapsed" %>">-->
|
||||
<!--<legend onclick="toggleFieldset(this);"><%#= l(:label_filter_plural) %></legend>-->
|
||||
<!--<div style="<%#= @query.new_record? ? "" : "display: none;" %>">-->
|
||||
<!--<%#= render :partial => 'queries/filters', :locals => {:query => @query} %>-->
|
||||
<!--</div>-->
|
||||
<!--</fieldset>-->
|
||||
<fieldset class="collapsible collapsed">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
|
||||
<div style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_related_issues) %></legend>
|
||||
<label style="padding:10px;">
|
||||
<%= check_box_tag "draw_rels", params["draw_rels"], params[:set_filter].blank? || params[:draw_rels] %>
|
||||
<% rels = [IssueRelation::TYPE_BLOCKS, IssueRelation::TYPE_PRECEDES] %>
|
||||
<% rels.each do |rel| %>
|
||||
<% color = Redmine::Helpers::Gantt::DRAW_TYPES[rel][:color] %>
|
||||
<%= content_tag(:span, ' '.html_safe,
|
||||
:style => "background-color: #{color}") %>
|
||||
<%= l(IssueRelation::TYPES[rel][:name]) %>
|
||||
<% end %>
|
||||
</label>
|
||||
</fieldset>
|
||||
</td>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_gantt_progress_line) %></legend>
|
||||
<label style="padding:10px;">
|
||||
<%= check_box_tag "draw_progress_line", params[:draw_progress_line], params[:draw_progress_line] %>
|
||||
<%= l(:label_display) %>
|
||||
</label>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
<%= form_tag({:controller => 'gantts', :action => 'show',
|
||||
:project_id => @project, :month => params[:month],
|
||||
:year => params[:year], :months => params[:months]},
|
||||
:method => :get, :id => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<!--<fieldset id="filters" class="collapsible <%#= @query.new_record? ? "" : "collapsed" %>">-->
|
||||
<!--<legend onclick="toggleFieldset(this);"><%#= l(:label_filter_plural) %></legend>-->
|
||||
<!--<div style="<%#= @query.new_record? ? "" : "display: none;" %>">-->
|
||||
<!--<%#= render :partial => 'queries/filters', :locals => {:query => @query} %>-->
|
||||
<!--</div>-->
|
||||
<!--</fieldset>-->
|
||||
<fieldset class="collapsible collapsed">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
|
||||
<div style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_related_issues) %></legend>
|
||||
<label style="padding:10px;">
|
||||
<%= check_box_tag "draw_rels", params["draw_rels"], params[:set_filter].blank? || params[:draw_rels] %>
|
||||
<% rels = [IssueRelation::TYPE_BLOCKS, IssueRelation::TYPE_PRECEDES] %>
|
||||
<% rels.each do |rel| %>
|
||||
<% color = Redmine::Helpers::Gantt::DRAW_TYPES[rel][:color] %>
|
||||
<%= content_tag(:span, ' '.html_safe,
|
||||
:style => "background-color: #{color}") %>
|
||||
<%= l(IssueRelation::TYPES[rel][:name]) %>
|
||||
<% end %>
|
||||
</label>
|
||||
</fieldset>
|
||||
</td>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_gantt_progress_line) %></legend>
|
||||
<label style="padding:10px;">
|
||||
<%= check_box_tag "draw_progress_line", params[:draw_progress_line], params[:draw_progress_line] %>
|
||||
<%= l(:label_display) %>
|
||||
</label>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<!--<p class="contextual">-->
|
||||
<!--<%#= gantt_zoom_link(@gantt, :in) %>-->
|
||||
<!--<%#= gantt_zoom_link(@gantt, :out) %>-->
|
||||
<!--</p>-->
|
||||
<!--<p class="contextual">-->
|
||||
<!--<%#= gantt_zoom_link(@gantt, :in) %>-->
|
||||
<!--<%#= gantt_zoom_link(@gantt, :out) %>-->
|
||||
<!--</p>-->
|
||||
|
||||
<p class="buttons">
|
||||
<%= text_field_tag 'months', @gantt.months, :size => 2 %>
|
||||
<%= l(:label_months_from) %>
|
||||
<%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %>
|
||||
<%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
|
||||
<%= hidden_field_tag 'zoom', @gantt.zoom %>
|
||||
<p class="buttons">
|
||||
<%= text_field_tag 'months', @gantt.months, :size => 2 %>
|
||||
<%= l(:label_months_from) %>
|
||||
<%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %>
|
||||
<%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
|
||||
<%= hidden_field_tag 'zoom', @gantt.zoom %>
|
||||
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()',
|
||||
:class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
|
||||
:class => 'icon icon-reload' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()',
|
||||
:class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
|
||||
:class => 'icon icon-reload' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
<% if @query.valid? %>
|
||||
<%
|
||||
zoom = 1
|
||||
@gantt.zoom.times { zoom = zoom * 2 }
|
||||
<%= error_messages_for 'query' %>
|
||||
<% if @query.valid? %>
|
||||
<%
|
||||
zoom = 1
|
||||
@gantt.zoom.times { zoom = zoom * 2 }
|
||||
|
||||
subject_width = 330
|
||||
header_height = 18
|
||||
subject_width = 330
|
||||
header_height = 18
|
||||
|
||||
headers_height = header_height
|
||||
show_weeks = false
|
||||
show_days = false
|
||||
headers_height = header_height
|
||||
show_weeks = false
|
||||
show_days = false
|
||||
|
||||
if @gantt.zoom > 1
|
||||
show_weeks = true
|
||||
headers_height = 2 * header_height
|
||||
if @gantt.zoom > 2
|
||||
show_days = true
|
||||
headers_height = 3 * header_height
|
||||
end
|
||||
end
|
||||
if @gantt.zoom > 1
|
||||
show_weeks = true
|
||||
headers_height = 2 * header_height
|
||||
if @gantt.zoom > 2
|
||||
show_days = true
|
||||
headers_height = 3 * header_height
|
||||
end
|
||||
end
|
||||
|
||||
# Width of the entire chart
|
||||
g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i
|
||||
@gantt.render(:top => headers_height + 8,
|
||||
:zoom => zoom,
|
||||
:g_width => g_width,
|
||||
:subject_width => subject_width)
|
||||
g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max
|
||||
t_height = g_height + headers_height
|
||||
%>
|
||||
# Width of the entire chart
|
||||
g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i
|
||||
@gantt.render(:top => headers_height + 8,
|
||||
:zoom => zoom,
|
||||
:g_width => g_width,
|
||||
:subject_width => subject_width)
|
||||
g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max
|
||||
t_height = g_height + headers_height
|
||||
%>
|
||||
|
||||
<%# if @gantt.truncated %>
|
||||
<!--<p class="warning"><%#= l(:notice_gantt_chart_truncated, :max => @gantt.max_rows) %></p>-->
|
||||
<%# end %>
|
||||
<%# if @gantt.truncated %>
|
||||
<!--<p class="warning"><%#= l(:notice_gantt_chart_truncated, :max => @gantt.max_rows) %></p>-->
|
||||
<%# end %>
|
||||
|
||||
<table style="width:100%; border:0; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td style="width:<%= subject_width %>px; padding:0px;">
|
||||
<%
|
||||
style = ""
|
||||
style += "position:relative;"
|
||||
style += "height: #{t_height + 24}px;"
|
||||
style += "width: #{subject_width + 1}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style) do %>
|
||||
<table style="width:100%; border:0; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td style="width:<%= subject_width %>px; padding:0px;">
|
||||
<%
|
||||
style = ""
|
||||
style += "position:relative;"
|
||||
style += "height: #{t_height + 24}px;"
|
||||
style += "width: #{subject_width + 1}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style) do %>
|
||||
<%
|
||||
style = ""
|
||||
style += "right:-2px;"
|
||||
style += "width: #{subject_width}px;"
|
||||
style += "height: #{headers_height}px;"
|
||||
style += 'background: #eee;'
|
||||
style += 'z-index: 1;'
|
||||
%>
|
||||
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
|
||||
<%
|
||||
style = ""
|
||||
style += "right:-2px;"
|
||||
style += "width: #{subject_width}px;"
|
||||
style += "height: #{t_height}px;"
|
||||
style += 'border-left: 1px solid #c0c0c0;'
|
||||
style += 'overflow: hidden;'
|
||||
%>
|
||||
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
|
||||
<%= content_tag(:div, :class => "gantt_subjects") do %>
|
||||
<%= @gantt.subjects.html_safe %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;" id="gantt_area">
|
||||
<%
|
||||
style = ""
|
||||
style += "right:-2px;"
|
||||
style += "width: #{subject_width}px;"
|
||||
style += "width: #{g_width - 1}px;"
|
||||
style += "height: #{headers_height}px;"
|
||||
style += 'background: #eee;'
|
||||
style += 'z-index: 1;'
|
||||
%>
|
||||
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
|
||||
<%= content_tag(:div, ' '.html_safe, :style => style, :class => "gantt_hdr") %>
|
||||
|
||||
<% ###### Months headers ###### %>
|
||||
<%
|
||||
style = ""
|
||||
style += "right:-2px;"
|
||||
style += "width: #{subject_width}px;"
|
||||
style += "height: #{t_height}px;"
|
||||
style += 'border-left: 1px solid #c0c0c0;'
|
||||
style += 'overflow: hidden;'
|
||||
month_f = @gantt.date_from
|
||||
left = 0
|
||||
height = (show_weeks ? header_height : header_height + g_height)
|
||||
%>
|
||||
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
|
||||
<%= content_tag(:div, :class => "gantt_subjects") do %>
|
||||
<%= @gantt.subjects.html_safe %>
|
||||
<% @gantt.months.times do %>
|
||||
<%
|
||||
width = (((month_f >> 1) - month_f) * zoom - 1).to_i
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
|
||||
<%= link_to h("#{month_f.year}-#{month_f.month}"),
|
||||
@gantt.params.merge(:year => month_f.year, :month => month_f.month),
|
||||
:title => "#{month_name(month_f.month)} #{month_f.year}" %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
month_f = month_f >> 1
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;" id="gantt_area">
|
||||
<%
|
||||
style = ""
|
||||
style += "width: #{g_width - 1}px;"
|
||||
style += "height: #{headers_height}px;"
|
||||
style += 'background: #eee;'
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe, :style => style, :class => "gantt_hdr") %>
|
||||
|
||||
<% ###### Months headers ###### %>
|
||||
<%
|
||||
month_f = @gantt.date_from
|
||||
left = 0
|
||||
height = (show_weeks ? header_height : header_height + g_height)
|
||||
%>
|
||||
<% @gantt.months.times do %>
|
||||
<%
|
||||
width = (((month_f >> 1) - month_f) * zoom - 1).to_i
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
|
||||
<%= link_to h("#{month_f.year}-#{month_f.month}"),
|
||||
@gantt.params.merge(:year => month_f.year, :month => month_f.month),
|
||||
:title => "#{month_name(month_f.month)} #{month_f.year}" %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
month_f = month_f >> 1
|
||||
%>
|
||||
<% end %>
|
||||
|
||||
<% ###### Weeks headers ###### %>
|
||||
<% if show_weeks %>
|
||||
<%
|
||||
left = 0
|
||||
height = (show_days ? header_height - 1 : header_height - 1 + g_height)
|
||||
%>
|
||||
<% if @gantt.date_from.cwday == 1 %>
|
||||
<%
|
||||
# @date_from is monday
|
||||
week_f = @gantt.date_from
|
||||
%>
|
||||
<% else %>
|
||||
<%
|
||||
# find next monday after @date_from
|
||||
week_f = @gantt.date_from + (7 - @gantt.date_from.cwday + 1)
|
||||
width = (7 - @gantt.date_from.cwday + 1) * zoom - 1
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top: 19px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe,
|
||||
:style => style, :class => "gantt_hdr") %>
|
||||
<% left = left + width + 1 %>
|
||||
<% end %>
|
||||
<% while week_f <= @gantt.date_to %>
|
||||
<%
|
||||
width = ((week_f + 6 <= @gantt.date_to) ?
|
||||
7 * zoom - 1 :
|
||||
(@gantt.date_to - week_f + 1) * zoom - 1).to_i
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top: 19px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
|
||||
<%= content_tag(:small) do %>
|
||||
<%= week_f.cweek if width >= 16 %>
|
||||
<% ###### Weeks headers ###### %>
|
||||
<% if show_weeks %>
|
||||
<%
|
||||
left = 0
|
||||
height = (show_days ? header_height - 1 : header_height - 1 + g_height)
|
||||
%>
|
||||
<% if @gantt.date_from.cwday == 1 %>
|
||||
<%
|
||||
# @date_from is monday
|
||||
week_f = @gantt.date_from
|
||||
%>
|
||||
<% else %>
|
||||
<%
|
||||
# find next monday after @date_from
|
||||
week_f = @gantt.date_from + (7 - @gantt.date_from.cwday + 1)
|
||||
width = (7 - @gantt.date_from.cwday + 1) * zoom - 1
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top: 19px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe,
|
||||
:style => style, :class => "gantt_hdr") %>
|
||||
<% left = left + width + 1 %>
|
||||
<% end %>
|
||||
<% while week_f <= @gantt.date_to %>
|
||||
<%
|
||||
width = ((week_f + 6 <= @gantt.date_to) ?
|
||||
7 * zoom - 1 :
|
||||
(@gantt.date_to - week_f + 1) * zoom - 1).to_i
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top: 19px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
|
||||
<%= content_tag(:small) do %>
|
||||
<%= week_f.cweek if width >= 16 %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
week_f = week_f + 7
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
week_f = week_f + 7
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% ###### Days headers ####### %>
|
||||
<% if show_days %>
|
||||
<%
|
||||
left = 0
|
||||
height = g_height + header_height - 1
|
||||
wday = @gantt.date_from.cwday
|
||||
%>
|
||||
<% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
|
||||
<%
|
||||
width = zoom - 1
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top:37px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
style += "font-size:0.7em;"
|
||||
clss = "gantt_hdr"
|
||||
clss << " nwday" if @gantt.non_working_week_days.include?(wday)
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => clss) do %>
|
||||
<%= day_letter(wday) %>
|
||||
<% ###### Days headers ####### %>
|
||||
<% if show_days %>
|
||||
<%
|
||||
left = 0
|
||||
height = g_height + header_height - 1
|
||||
wday = @gantt.date_from.cwday
|
||||
%>
|
||||
<% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
|
||||
<%
|
||||
width = zoom - 1
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top:37px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
style += "font-size:0.7em;"
|
||||
clss = "gantt_hdr"
|
||||
clss << " nwday" if @gantt.non_working_week_days.include?(wday)
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => clss) do %>
|
||||
<%= day_letter(wday) %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
wday = wday + 1
|
||||
wday = 1 if wday > 7
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= @gantt.lines.html_safe %>
|
||||
|
||||
<% ###### Today red line (excluded from cache) ###### %>
|
||||
<% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
|
||||
<%
|
||||
today_left = (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i
|
||||
style = ""
|
||||
style += "position: absolute;"
|
||||
style += "height: #{g_height}px;"
|
||||
style += "top: #{headers_height + 1}px;"
|
||||
style += "left: #{today_left}px;"
|
||||
style += "width:10px;"
|
||||
style += "border-left: 1px dashed red;"
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe, :style => style, :id => 'today_line') %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
wday = wday + 1
|
||||
wday = 1 if wday > 7
|
||||
style = ""
|
||||
style += "position: absolute;"
|
||||
style += "height: #{g_height}px;"
|
||||
style += "top: #{headers_height + 1}px;"
|
||||
style += "left: 0px;"
|
||||
style += "width: #{g_width - 1}px;"
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= content_tag(:div, '', :style => style, :id => "gantt_draw_area") %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<%= @gantt.lines.html_safe %>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<%= link_to_content_update("\xc2\xab " + l(:label_previous),
|
||||
params.merge(@gantt.params_previous)) %>
|
||||
</td>
|
||||
<td align="right">
|
||||
<%= link_to_content_update(l(:label_next) + " \xc2\xbb",
|
||||
params.merge(@gantt.params_next)) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<% ###### Today red line (excluded from cache) ###### %>
|
||||
<% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
|
||||
<%
|
||||
today_left = (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i
|
||||
style = ""
|
||||
style += "position: absolute;"
|
||||
style += "height: #{g_height}px;"
|
||||
style += "top: #{headers_height + 1}px;"
|
||||
style += "left: #{today_left}px;"
|
||||
style += "width:10px;"
|
||||
style += "border-left: 1px dashed red;"
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe, :style => style, :id => 'today_line') %>
|
||||
<% end %>
|
||||
<%
|
||||
style = ""
|
||||
style += "position: absolute;"
|
||||
style += "height: #{g_height}px;"
|
||||
style += "top: #{headers_height + 1}px;"
|
||||
style += "left: 0px;"
|
||||
style += "width: #{g_width - 1}px;"
|
||||
%>
|
||||
<%= content_tag(:div, '', :style => style, :id => "gantt_draw_area") %>
|
||||
|
||||
<% end # query.valid? %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_gantt)) -%>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<%= link_to_content_update("\xc2\xab " + l(:label_previous),
|
||||
params.merge(@gantt.params_previous)) %>
|
||||
</td>
|
||||
<td align="right">
|
||||
<%= link_to_content_update(l(:label_next) + " \xc2\xbb",
|
||||
params.merge(@gantt.params_next)) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<% end # query.valid? %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_gantt)) -%>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'raphael' %>
|
||||
|
@ -317,7 +319,3 @@
|
|||
$("#draw_progress_line").change(drawGanttHandler);
|
||||
});
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(".project_r_h").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
|
||||
</script>
|
||||
|
|
|
@ -1,34 +1,14 @@
|
|||
<%= labelled_fields_for :issue, @issue do |f| %>
|
||||
<%#= call_hook(:view_issues_form_details_top, {:issue => @issue, :form => f}) %>
|
||||
<div class="newpro_box">
|
||||
<ul>
|
||||
<ul class="fl pro_new_conbox_left">
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'tracker_id' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 类型 : </label>
|
||||
<%= f.select :tracker_id, @issue.project.trackers.collect { |t| [t.name, t.id] },
|
||||
{:required => true, :no_label => true},
|
||||
#:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
|
||||
:class => "w90" %>
|
||||
{:required => true, :no_label => true},
|
||||
#:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
|
||||
:class => "w90" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'is_private' %>
|
||||
<%= f.check_box :is_private, :no_label => true, :class => "ml30" %>
|
||||
<label class="fl ml5 mt3" for="issue_is_private" id="issue_is_private_label"><%= l(:field_is_private) %></label>
|
||||
<label class="fl ml5 mt3" for="issue_is_private" id="issue_is_private_tips"><%= l(:field_is_private_tips)%></label>
|
||||
<% end %>
|
||||
</li>
|
||||
<!--<li>-->
|
||||
<!--<input type="checkbox" class="ml30">-->
|
||||
<!--<label class="fl ml5 mt3">不需要评审</label>-->
|
||||
<!--</li>-->
|
||||
<div class="cl"></div>
|
||||
<!--<li>-->
|
||||
<!--<%# if @issue.safe_attribute? 'project_id' %>-->
|
||||
<%#= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %>
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'subject' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 主题 : </label>
|
||||
|
@ -42,52 +22,133 @@
|
|||
}
|
||||
});
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<span ></span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
||||
<li>
|
||||
<li class="clear">
|
||||
<% if @issue.safe_attribute? 'description' %>
|
||||
<label class="label"> 描述 : </label>
|
||||
<%= f.label_for_field :description, :required => @issue.required_attribute?('description'), :no_label => true, :class => "label" %>
|
||||
<%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||
<%#= content_tag 'span', :id => "issue_description_and_toolbar" do %>
|
||||
<%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'85%', :height =>170, :resizeType => 0, :no_label => true,at_id: @project.id, at_type: @project.class.to_s %>
|
||||
<%= f.kindeditor :description,:editor_id => "issue_desc_editor", :width=>'85%', :height =>159, :resizeType => 0, :no_label => true, at_id: @project.id, at_type: @project.class.to_s %>
|
||||
<%# end %>
|
||||
<%#= wikitoolbar_for 'issue_description' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label"><span class="c_red f12">*</span><%= l(:field_status) %>:</label>
|
||||
<%# if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
|
||||
<%= f.select :status_id, (@allowed_statuses.collect { |p| [p.name, p.id] }),
|
||||
{:no_label => true},
|
||||
# ajax 刷新
|
||||
#:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')",
|
||||
:class => "w150" %>
|
||||
<%# else %>
|
||||
<%#= h(@issue.status.name) %>
|
||||
<%# end %>
|
||||
</li>
|
||||
<li>
|
||||
<label class="label"><span class="c_red f12">*</span><%= l(:field_priority) %>:</label>
|
||||
<% if @issue.safe_attribute? 'priority_id' %>
|
||||
<%= f.select :priority_id, (@priorities.collect { |p| [p.name, p.id] }),
|
||||
{:required => true, :no_label => true}, :disabled => !@issue.leaf?,
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<label class="label"><%= l(:label_attachment_plural) %>:</label>
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<a href="<%= project_issues_path(@project, :remote => true) %>" class="sy_btn_grey mr5 fr"> 取消</a>
|
||||
<a href="javascript:void(0);" class="sy_btn_blue mr5 fr"> 保存并继续</a>
|
||||
<a href="javascript:void(0);" onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="sy_btn_blue mr5 fr" id="issue_confirm"> 保存</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="fl pro_new_conbox_right ml10 mb10">
|
||||
<li class="clear">
|
||||
<% if @issue.safe_attribute? 'is_private' %>
|
||||
<%= f.check_box :is_private, :no_label => true, :class => "fl pro_newissue_con_check" %>
|
||||
<label class="fl ml5" for="issue_is_private" id="issue_is_private_label"><%= l(:field_is_private) %></label>
|
||||
<label class="fl ml5" for="issue_is_private" id="issue_is_private_tips"><%= l(:field_set_private_tips)%></label>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class=" clear">
|
||||
<% if @issue.safe_attribute? 'assigned_to_id' %>
|
||||
<%= f.select :assigned_to_id, assigned_options_for_select(@issue.assignable_users, @issue.assigned_to),
|
||||
{:required => @issue.required_attribute?('assigned_to_id'), :no_label => true},
|
||||
{:onchange => "change_assigned_tip();",:class => "w150"} %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class=" clear" id="assigned_to_tips">未指派</li>
|
||||
<li class=" clear">
|
||||
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
|
||||
<%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
|
||||
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
|
||||
{:onchange => "change_milestone_tip();",:class => "w150"} %>
|
||||
<%#= link_to(image_tag('add.png', :style => 'vertical-align: middle;'),
|
||||
new_project_version_path(@issue.project),
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:label_version_new),
|
||||
:tabindex => 200) if User.current.allowed_to?(:manage_versions, @issue.project) %>
|
||||
<!--<a href="javascript:viod(0)" class="pic_add mt5 ml5"></a>-->
|
||||
<% end %>
|
||||
</li>
|
||||
<li class=" clear" id="milestone_option_tips">
|
||||
无里程碑
|
||||
<%= link_to "", new_project_version_path(@issue.project), :class => "pic_add mt5 ml5 fr", :target => "_blank" %>
|
||||
</li>
|
||||
<li class=" clear" style="border:1px solid #c8c8c8;">
|
||||
<% if @issue.safe_attribute? 'start_date' %>
|
||||
<%= f.text_field :start_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
||||
:required => @issue.required_attribute?('start_date'), :onchange=>"issue_start_date_change();", :class=>"fl calendar_input", :style=>"width:170px;" %>
|
||||
<%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class=" clear" id="option_start_date_tips">
|
||||
未选择开始日期
|
||||
</li>
|
||||
<li class=" clear" style="border:1px solid #c8c8c8;">
|
||||
<label class="label02" ></label>
|
||||
<% if @issue.safe_attribute? 'due_date' %>
|
||||
<%= f.text_field :due_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
||||
:required => @issue.required_attribute?('due_date'), :onchange=>"issue_end_date_change();", :class=>"fl calendar_input",:style=>"width: 170px;" %>
|
||||
<%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class=" clear " id="option_end_date_tips">
|
||||
未选择结束日期
|
||||
</li>
|
||||
<li class=" clear"><%= l(:field_estimated_hours) %></li>
|
||||
<li class=" clear">
|
||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||
<%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('estimated_hours') %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class=" clear">完成度</li>
|
||||
<li class=" clear">
|
||||
<% if @issue.safe_attribute?('done_ratio') && @issue.leaf? && Issue.use_field_for_done_ratio? %>
|
||||
<%= f.select :done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
||||
{:required => @issue.required_attribute?('done_ratio'), :no_label => true},
|
||||
:onchange => "PrecentChange(this.value)",
|
||||
:class => "w150" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<li>
|
||||
<% if @copy_from && !@copy_from.leaf? %>
|
||||
<p>
|
||||
<label for="copy_subtasks"><%= l(:label_copy_subtasks) %></label>
|
||||
<%= check_box_tag 'copy_subtasks', '1', @copy_subtasks %>
|
||||
</p>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<br>
|
||||
<label class="label"><%= l(:label_attachment_plural) %>:</label>
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<div id="attributes">
|
||||
<%= render :partial => 'issues/attributes' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %>
|
||||
<% end %>
|
||||
<a href="javascript:void(0);" onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="blue_btn fl ml80" id="issue_confirm"> 确定</a>
|
||||
<% if params[:action] == "new" %>
|
||||
<% if @copy_from %>
|
||||
<%= link_to "取消", issue_path(@copy_from), :class => "grey_btn fl mr50 ml10" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<a href="javascript:void(0);" onclick="issueDetailShow();" class="grey_btn fl mr50 ml10" > 取消 </a>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
function change_assigned_tip() {
|
||||
$('#assigned_to_tips').html("已指派");
|
||||
}
|
||||
function change_milestone_tip(){
|
||||
$('#milestone_option_tips').html("已指派里程碑");
|
||||
}
|
||||
function issue_start_date_change(){
|
||||
$('#option_start_date_tips').html("已选择开始日期");
|
||||
}
|
||||
function issue_end_date_change() {
|
||||
$('#option_end_date_tips').html("已选择结束日期");
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@issue.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
|
||||
<div class="ReplyToMessageInputContainer mb10" style="width:845px;">
|
||||
<div class="ReplyToMessageInputContainer mb10" style="width:840px;">
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= @jour.id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
|
||||
|
|
|
@ -7,6 +7,31 @@
|
|||
$("#Container").css("width","1000px");
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--新建缺陷开始-->
|
||||
<div class="pro_new_con ">
|
||||
<div class="pro_newissue_con clear">
|
||||
<%= call_hook(:view_issues_new_top, {:issue => @issue}) %>
|
||||
<%= labelled_form_for @issue, :url => project_issues_path(@project),
|
||||
:html => {:id => 'issue-form', :multipart => true} do |f| %>
|
||||
<%= error_messages_for 'issue' %>
|
||||
<%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
|
||||
<div>
|
||||
<%= render :partial => 'issues/form', :locals => {:f => f} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<!--新建缺陷结束-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="homepageRight mt0 ml10" >
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">新建问题</div>
|
||||
|
@ -18,7 +43,7 @@
|
|||
<%= error_messages_for 'issue' %>
|
||||
<%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
|
||||
<div>
|
||||
<%= render :partial => 'issues/form', :locals => {:f => f} %>
|
||||
<%#= render :partial => 'issues/form', :locals => {:f => f} %>
|
||||
</div>
|
||||
<!--<%#= javascript_tag "$('#issue_subject').focus();" %>-->
|
||||
<!--<a href="#" class="blue_btn fl ml80" onclick="issue_desc_editor.sync();$('#issue-form').submit();">-->
|
||||
|
|
|
@ -92,64 +92,61 @@
|
|||
showNormalImage('message_description_<%= @topic.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepageRight mt0">
|
||||
<div class="postRightContainer ml10" onmouseover="$('#message_setting_<%= @topic.id%>').show();" onmouseout="$('#message_setting_<%= @topic.id%>').hide();">
|
||||
<div class="postThemeContainer">
|
||||
<div class="postDetailPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(@topic.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@topic.author) %>
|
||||
</div>
|
||||
<div class="postThemeWrap">
|
||||
<% if User.current.logged? %>
|
||||
<div class="homepagePostSetting" id="message_setting_<%= @topic.id%>" style="display: none">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'postOptionLink') if @message.editable_by?(User.current) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic},:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if @message.destroyable_by?(User.current) %>
|
||||
</li>
|
||||
<% if hidden_unproject_infos %>
|
||||
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %></li>
|
||||
<% else %>
|
||||
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send_hidden(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="mt10 mb10">
|
||||
<div class="container-big" onmouseover="$('#message_setting_<%= @topic.id%>').show();" onmouseout="$('#message_setting_<%= @topic.id%>').hide();">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(@topic.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@topic.author) %>
|
||||
</div>
|
||||
<div class="content-big pr">
|
||||
<% if User.current.logged? %>
|
||||
<div class="homepagePostSetting" id="message_setting_<%= @topic.id%>" style="display: none">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'postOptionLink') if @message.editable_by?(User.current) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic},:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if @message.destroyable_by?(User.current) %>
|
||||
</li>
|
||||
<% if hidden_unproject_infos %>
|
||||
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %></li>
|
||||
<% else %>
|
||||
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send_hidden(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<%end%>
|
||||
<div class="postDetailTitle fl">
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @topic.subject%></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="postDetailCreater">
|
||||
<% if @topic.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @topic.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%end%>
|
||||
<div class="fl mb5" style="width:877px;">
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @topic.subject%></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
|
||||
<div class="postDetailCreater">
|
||||
<% if @topic.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @topic.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @topic} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="container-big-grey">
|
||||
<div class="reply-banner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= @reply_count>0 ? "(#{@reply_count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=@topic.id %>">
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
autoUrl('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
<div class="reply-container ml15" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
<div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>">
|
||||
<div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>" style="width:895px;">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="ReplyToMessageInputContainer mb10">
|
||||
<div class="ReplyToMessageInputContainer mb10" style="width:840px;">
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :method => "post", :id => 'new_form' do |f| %>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
<%#= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="ontent-big">
|
||||
<div class="content-big">
|
||||
<div class="homepagePostTo break_word">
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class = "cl"> </div>
|
||||
<div id="project-boardlist">
|
||||
<div class="listbox mt10" >
|
||||
<div class="container-big mt10" >
|
||||
<h2 class="list-h2">讨论区列表</h2>
|
||||
<div class="category">
|
||||
<span class="grayTxt ">排序:</span>
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<% @version_issue_assigned_name.each do | assigned | %>
|
||||
<tr>
|
||||
<td><%= User.find(assigned[0]).show_name %></td>
|
||||
<td><%= Issue.where(:fixed_version_id => @version.id,:assigned_to_id => assigned[0]).count %></td>
|
||||
<td><%= Issue.where(:fixed_version_id => @version.id,:assigned_to_id => assigned[0], :status_id => 3).count %></td>
|
||||
<td><%= Issue.where(:fixed_version_id => @version.id,:assigned_to_id => assigned[0], :status_id => 5).count %></td>
|
||||
<td><%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0]).count %></td>
|
||||
<td><%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 3).count %></td>
|
||||
<td><%= Issue.where(:fixed_version_id => @version.id, :assigned_to_id => assigned[0], :status_id => 5).count %></td>
|
||||
<td><%= Issue.where(fixed_version_id: @version.id, assigned_to_id: assigned[0], status_id: [1,2,4]).count %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
|
|
@ -253,6 +253,7 @@ zh:
|
|||
field_done_ratio: "% 完成"
|
||||
field_is_private: 私有
|
||||
field_is_private_tips: (设置为“私有”后本问题将仅对项目成员可见)
|
||||
field_set_private_tips: (仅对项目成员可见)
|
||||
field_watcher: 跟踪者
|
||||
label_relates_to: 关联到
|
||||
label_duplicates: 重复
|
||||
|
|
|
@ -763,6 +763,7 @@ zh:
|
|||
label_disabled: 禁用
|
||||
label_show_completed_versions: 显示已完成的版本
|
||||
label_me: 我
|
||||
label_assiged_tip: 指派给:未指派
|
||||
label_board: 讨论区
|
||||
label_board_new: 新建讨论区
|
||||
label_board_plural: 讨论区
|
||||
|
|
|
@ -743,7 +743,7 @@ a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;}
|
|||
.issues_form_filter select:focus,.issues_form_filter input:focus{border:1px solid #c8c8c8; border-right:none;}
|
||||
.issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("../images/project/arrow.png") no-repeat scroll right center transparent;}
|
||||
input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
||||
.issues_data_img{ display:block; width:25px; height:33px; border:1px solid #c8c8c8; border-left:none; background:url("../images/public_icon.png") -29px 9px no-repeat; }
|
||||
.issues_data_img{ display:block; width:25px; height:33px; border:1px solid #c8c8c8; border-left:none; background:url("/images/public_icon.png") -29px 9px no-repeat; }
|
||||
/* 缺陷Tab */
|
||||
.issues_con_list{border:1px solid #dbdbdb; }
|
||||
#issues_list_nav {border-bottom:1px solid #d0d0d0;}
|
||||
|
@ -761,7 +761,7 @@ input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
|||
.issues_filter_data input{height:28px;width:91px; border:1px solid #c8c8c8;background-color:#fff;}
|
||||
.issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("../images/project/arrow.png") no-repeat scroll right center transparent;}
|
||||
input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
||||
.issues_data_img{ display:block; width:25px; height:28px; border:1px solid #c8c8c8; border-left:none; background: url("../images/public_icon.png") -27px 7px no-repeat; }
|
||||
.issues_data_img{ display:block; width:25px; height:28px; border:1px solid #c8c8c8; border-left:none; background: url("/images/public_icon.png") -27px 7px no-repeat; }
|
||||
|
||||
.issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8;}
|
||||
.issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;}
|
||||
|
|
Loading…
Reference in New Issue