Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq
This commit is contained in:
commit
51e0217eb8
|
@ -136,7 +136,7 @@ class VersionsController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html {
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_back_or_default settings_project_path(@project, :tab => 'versions')
|
||||
redirect_to settings_project_path(@project, :tab => 'versions')
|
||||
}
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
|
|
|
@ -49,6 +49,16 @@ module ApplicationHelper
|
|||
end
|
||||
end
|
||||
|
||||
def get_project_type_css(value)
|
||||
if value == 1
|
||||
"pr_friend"
|
||||
elsif value == 1
|
||||
"pr_keyan"
|
||||
else
|
||||
"pr_kafa"
|
||||
end
|
||||
end
|
||||
|
||||
# Time 2015-03-24 16:38:05
|
||||
# Author lizanle
|
||||
# Description after save后需要进行资源记录的更新
|
||||
|
@ -384,9 +394,9 @@ module ApplicationHelper
|
|||
|
||||
def format_version_name(version)
|
||||
if version.project == @project
|
||||
h(version)
|
||||
h(truncate(version.name,:length=>20))
|
||||
else
|
||||
h("#{version.project} - #{version}")
|
||||
h("#{version.project} - #{truncate(version.name,:length=>20)}")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<% end %>
|
||||
<% if options[:author] %>
|
||||
<span class="author" title="<%= attachment.author%>">
|
||||
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange ml20" %>,
|
||||
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>,
|
||||
<%= format_time(attachment.created_on) %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!--added by huang-->
|
||||
<%= watcher_link_issue(@issue, User.current) %>
|
||||
<%#= watcher_link_issue(@issue, User.current) %>
|
||||
<%#= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %>
|
||||
<%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %>
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
<li>
|
||||
<% if @issue.safe_attribute? 'description' %>
|
||||
<label class="label"><span class="c_red f12">*</span> 描述 : </label>
|
||||
<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", :style => (@issue.new_record? ? nil : 'display:none') do %>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<div class="cl"></div>
|
||||
<li>
|
||||
<br>
|
||||
<label class="label"><span class="c_red f12">*</span><%= l(:label_attachment_plural) %>:</label>
|
||||
<label class="label"><%= l(:label_attachment_plural) %>:</label>
|
||||
<%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
@ -95,22 +95,22 @@
|
|||
<%= render :partial => 'issues/attributes' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="newpro_box02 ">
|
||||
<label class="label"> <%= l(:label_issue_watchers) %>:</label>
|
||||
<!--<div class="newpro_box02 ">-->
|
||||
<!--<label class="label"> <%#= l(:label_issue_watchers) %>:</label>-->
|
||||
<!--<input id="" name="" size="22" class="fl mb10 h26" type="text" placeholder="搜索添加跟踪者">-->
|
||||
<span class="search_for_watchers">
|
||||
<%= link_to "",
|
||||
{:controller => 'watchers', :action => 'new', :project_id => @issue.project},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
<!--<span class="search_for_watchers">-->
|
||||
<%#= link_to "",
|
||||
# {:controller => 'watchers', :action => 'new', :project_id => @issue.project},
|
||||
# :remote => true,
|
||||
# :method => 'get',
|
||||
:class => "pic_sch mt5 ml5" %>
|
||||
</span>
|
||||
<%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript watchers_autocomplete_for_user_path(:user => @available_watchers, :format => 'js', :flag => 'ture') }')" %>
|
||||
<div class="cl"></div>
|
||||
<span id="watchers_inputs">
|
||||
<%= watchers_checkboxes(@issue, @available_watchers) %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<!--</span>-->
|
||||
<%#= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript watchers_autocomplete_for_user_path(:user => @available_watchers, :format => 'js', :flag => 'ture') }')" %>
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--<span id="watchers_inputs">-->
|
||||
<!--<%#= watchers_checkboxes(@issue, @available_watchers) %>-->
|
||||
<!--</span>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</div>-->
|
||||
<%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %>
|
||||
<% end %>
|
|
@ -10,6 +10,6 @@
|
|||
<!--退出项目-->
|
||||
<% if ((User.current.member_of? @project) && User.current.login? && User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) %>
|
||||
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
|
||||
<%= link_to "<span class='pr_friend'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
|
||||
<%= link_to "<span class='#{get_project_type_css(@project_type_new)}'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
<div class="project_intro">
|
||||
<div id="course_description" class="course_description">
|
||||
<h4 ><%= l(:label_project_overview)%>:</h4>
|
||||
<div id="course_description_content break_word">
|
||||
<div id="course_description_content break_word">
|
||||
<%= textilizable(@project.description) if @project.description && !@project.description.blank? %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -205,7 +205,7 @@
|
|||
<div class="cl"></div>
|
||||
</div><!--项目标签 end-->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="RSide" class="fl">
|
||||
<%= render_flash_messages %>
|
||||
|
@ -213,7 +213,6 @@
|
|||
<%= call_hook :view_layouts_base_content %>
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/new_footer'%>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<label class="fl" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||||
<label class="fl" > <%= l(:field_description) %> :</label>
|
||||
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -67,15 +67,16 @@
|
|||
</div>
|
||||
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get') do %>
|
||||
<span id="valid_email" style="color: #FF0000;"></span>
|
||||
<div class="lin1_2">
|
||||
<ul>
|
||||
<li>
|
||||
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<a href="#" class="btn_free" onclick="senderEmail($(this));">
|
||||
<%= l(:label_send_email)%>
|
||||
</a>
|
||||
<%#= submit_tag '免费发送', :style => "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -21,15 +21,14 @@
|
|||
<% @project.repositories.sort.each do |repository| %>
|
||||
<tr class="pro_table_on">
|
||||
<td><a href="javascript:viod(0)" title="<%= repository.identifier %>">
|
||||
<%= link_to repository.identifier, ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?), :class =>"c_blue" %></a></td>
|
||||
<%= link_to truncate(repository.identifier), ({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => repository.identifier_param} if repository.identifier.present?), :class =>"c_blue" %></a></td>
|
||||
<td> <%= checked_image repository.is_default? %></td>
|
||||
<td><%=h repository.scm_name %></td>
|
||||
<%if repository.scm_name=="Git"%>
|
||||
<td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" class="c_blue" title="http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %>
|
||||
<%=h repository.url.slice(project_path_cut, repository.url.length) %>">http://<%= repository.login.to_s %>_<%= repository.identifier.to_s%>@<%= ip %>
|
||||
<%=h repository.url.slice(project_path_cut, repository.url.length) %></td><!--Modified by tanxianbo-->
|
||||
<%=h repository.url.slice(project_path_cut, repository.url.length) %>"> <%=truncate( 'http://' << repository.login.to_s << '_'<< repository.identifier.to_s << '@'<< ip.to_s << h( repository.url.slice(project_path_cut, repository.url.length)),:length=>20)%></td><!--Modified by tanxianbo-->
|
||||
<%else %>
|
||||
<td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ><%=h repository.url %></td>
|
||||
<td style="white-space:nowrap;overflow:hidden;text-overflow:ellipsis;" ><%=h truncate(repository.url,:length=>10) %></td>
|
||||
<% end %>
|
||||
<td><a href="javascript:viod(0)" class="c_blue" >
|
||||
<% if repository.scm_name=="Git"%>
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
<table class="pro_table">
|
||||
<tbody>
|
||||
<tr class="pro_table_tit">
|
||||
<td class="w150"><%= l(:label_version) %></td>
|
||||
<td class="w1150"> <%= l(:field_effective_date) %></td>
|
||||
<td class="w210"><%= l(:field_description) %> </td>
|
||||
<td class="w1150"><%= l(:field_status) %></td>
|
||||
<td class="w190"><%= l(:field_sharing) %></td>
|
||||
<td class="w190"><%= l(:label_wiki_page) %></td>
|
||||
<td class="w1150"></td>
|
||||
<td class="w90"><%= l(:label_version) %></td>
|
||||
<td> <%= l(:field_effective_date) %></td>
|
||||
<td class="w90"><%= l(:field_description) %> </td>
|
||||
<td class=""><%= l(:field_status) %></td>
|
||||
<td class=""><%= l(:field_sharing) %></td>
|
||||
<td class=""><%= l(:label_wiki_page) %></td>
|
||||
<td class=""></td>
|
||||
</tr>
|
||||
<% for version in @project.shared_versions.sort %>
|
||||
<tr class="pro_table_on">
|
||||
|
@ -23,11 +23,11 @@
|
|||
<a class="c_blue02"><%= 'shared' if version.project != @project %> <%= link_to_version version %></a>
|
||||
</td>
|
||||
<td class="c_grey"><%= format_date(version.effective_date) %></td>
|
||||
<td class="description" style="word-break:break-all"><%=h version.description %></td>
|
||||
<td class="description" style="word-break:break-all;"><%=h version.description %></td>
|
||||
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
||||
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
|
||||
<td style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="">
|
||||
<%= link_to_if_authorized(h(version.wiki_page_title), {:controller => 'wiki',
|
||||
<%= link_to_if_authorized(h(truncate(version.wiki_page_title,:length=>20)), {:controller => 'wiki',
|
||||
:action => 'show',
|
||||
:project_id => version.project,
|
||||
:id => Wiki.titleize(version.wiki_page_title)}) || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
|
||||
|
@ -57,29 +57,29 @@
|
|||
<div id="pro_st_edit_ban" class="pro_st_edit_ban">
|
||||
<ul>
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span> 名称 :</label>
|
||||
<label class="label02"><span class="c_red">*</span>名称:</label>
|
||||
<%= f.text_field :name, :maxlength => 60, :required => true %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> 描述 :</label>
|
||||
<label class="label02">描述:</label>
|
||||
<%= f.text_field :description, :maxlength => 60 %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> 状态 :</label>
|
||||
<label class="label02">状态:</label>
|
||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> Wiki 页面 :</label>
|
||||
<label class="label02">Wiki 页面:</label>
|
||||
<%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> 日期 :</label>
|
||||
<label class="label02">日期:</label>
|
||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %>
|
||||
<%= calendar_for('version_effective_date') %>
|
||||
</li>
|
||||
<div class="cl mb10"></div>
|
||||
<li >
|
||||
<label class="label02"> 共享 :</label>
|
||||
<label class="label02">共享:</label>
|
||||
<%= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>
|
||||
</li>
|
||||
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110">保存</a>
|
||||
|
|
|
@ -3,29 +3,29 @@
|
|||
<div id="pro_st_edit_ban" class="pro_st_edit_ban_display">
|
||||
<ul>
|
||||
<li >
|
||||
<label class="label02"><span class="c_red">*</span> 名称 :</label>
|
||||
<label class="label02"><span class="c_red">*</span>名称:</label>
|
||||
<%= f.text_field :name, :maxlength => 60,:class=>" w280", :label => ""%>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> 描述 :</label>
|
||||
<label class="label02">描述:</label>
|
||||
<%= f.text_field :description, :maxlength => 60,:class=>" w280", :label => "" %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> 状态 :</label>
|
||||
<label class="label02">状态:</label>
|
||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> Wiki 页面 :</label>
|
||||
<label class="label02">Wiki 页面:</label>
|
||||
<%= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>
|
||||
</li>
|
||||
<li >
|
||||
<label class="label02"> 日期 :</label>
|
||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>'f1',:label => "" %>
|
||||
<label class="label02">日期:</label>
|
||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"fl" ,:style=>"margin-left:7px;",:label=>""%>
|
||||
<%= calendar_for('version_effective_date') %>
|
||||
</li>
|
||||
<div class="cl mb10"></div>
|
||||
<li >
|
||||
<label class="label02"> 共享 :</label>
|
||||
<label class="label02">共享:</label>
|
||||
<%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -42,7 +42,7 @@ a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
|||
.box_main02{ width:390px; margin:15px auto;}
|
||||
.box_h3{ color:#15bccf; font-size:16px;}
|
||||
.box_p{ color:#404040; margin-bottom:5px;}
|
||||
.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:10px; padding-left:5px; width:290px;}
|
||||
.fb_item{ color:#919191; border:1px solid #919191; height:28px; margin-bottom:5px; padding-left:5px; width:290px;}
|
||||
a.icon_addm{ background:url(../images/img_floatbox.png) 0 -33px no-repeat; width:16px; height:16px; display:block; margin:5px 0 0 5px;}
|
||||
a:hover.icon_addm{background:url(../images/img_floatbox.png) 0 -61px no-repeat; }
|
||||
a.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repeat;width:16px; height:16px; display:block; margin:5px 0 0 5px}
|
||||
|
|
Loading…
Reference in New Issue