Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
7e7da7e445
|
@ -99,6 +99,7 @@ class FilesController < ApplicationController
|
|||
end
|
||||
|
||||
def index
|
||||
@flag = params[:flag] || false
|
||||
#sort_init 'filename', 'asc'
|
||||
sort_init 'created_on', 'desc'
|
||||
sort_update 'created_on' => "#{Attachment.table_name}.created_on",
|
||||
|
|
|
@ -1198,6 +1198,17 @@ module ApplicationHelper
|
|||
html_safe
|
||||
end
|
||||
|
||||
def wiki_simple_format_without_paragraph(text)
|
||||
text.to_s.
|
||||
gsub(/\r\n?/, "\n"). # \r\n and \r -> \n
|
||||
gsub(/\n\n+/, "<br /><br />"). # 2+ newline -> 2 br
|
||||
gsub(/([^\n]\n)(?=[^\n])/, '\1<br />'). # 1 newline -> br
|
||||
gsub("&nbsp", " "). #gsub(/<\/?.*?>/,"").
|
||||
gsub(/<\/?.*?>/, "").
|
||||
gsub(""", "'").
|
||||
html_safe
|
||||
end
|
||||
|
||||
def lang_options_for_select(blank=true)
|
||||
{ 'Chinese简体中文 '=> 'zh', :English => :en}
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @project) %>
|
||||
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @project) %>
|
||||
<p></p>
|
||||
<div id="upload_file_div" class="relation_file_div hidden">
|
||||
<div id="upload_file_div" class="relation_file_div <%= !@flag.nil?&&@flag=="true" ? '' : 'hidden'%>">
|
||||
<%= render :partial => 'new', locals: {project: @project} %>
|
||||
</div>
|
||||
<div id="relation_file_div" class="relation_file_div hidden">
|
||||
|
|
|
@ -51,11 +51,21 @@
|
|||
}
|
||||
}
|
||||
|
||||
function submitSerch()
|
||||
{
|
||||
if(regexName()){$("#project_search_form").submit();}
|
||||
}
|
||||
// 项目描述超过展开
|
||||
$(function(){
|
||||
$(".subNav").click(function(){
|
||||
$(this).toggleClass("currentDd").siblings(".subNav").removeClass("currentDd")
|
||||
$(this).toggleClass("currentDt").siblings(".subNav").removeClass("currentDt")
|
||||
|
||||
// 修改数字控制速度, slideUp(500)控制卷起速度
|
||||
$(this).next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
|
||||
})
|
||||
})
|
||||
|
||||
function show_more_msg()
|
||||
{$("#course_description").toggleClass("course_description_none");}
|
||||
</script>
|
||||
|
||||
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form") do %>
|
||||
<%= text_field_tag 'name', params[:name], :size => 20, :onkeyup => "regexName();", :style => "float:left" %>
|
||||
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
||||
|
@ -77,17 +87,6 @@
|
|||
</div>
|
||||
<!-- 左边侧栏内容 -->
|
||||
<div id="sidebar">
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$(".subNav").click(function() {
|
||||
$(this).toggleClass("currentDd").siblings(".subNav").removeClass("currentDd")
|
||||
$(this).toggleClass("currentDt").siblings(".subNav").removeClass("currentDt")
|
||||
|
||||
// 修改数字控制速度, slideUp(500)控制卷起速度
|
||||
$(this).next(".navContent").slideToggle(500).siblings(".navContent").slideUp(500);
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<div class="project_left">
|
||||
<div class="project_info">
|
||||
<div class="pr_info_logo fl mr10 mb5">
|
||||
|
@ -141,19 +140,12 @@
|
|||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :style => "color:#3CA5C6" %><span class="subnav_num">(<%= @project.issues.count %>)</span>
|
||||
<span>
|
||||
<% if User.current.logged? && User.current.member_of?(@project) %>
|
||||
<%= link_to "+发布问题", new_project_issue_path(@project) , :style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :style => "color:#3CA5C6" %><span class="subnav_num">(<%= @project.issues.count %>)</span>
|
||||
<span>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :style => "color:#3CA5C6" %>
|
||||
<span class="subnav_num">(<%= @project.boards.first.topics.count %>)</span>
|
||||
|
@ -166,7 +158,7 @@
|
|||
<div class="subNav">
|
||||
<%= link_to l(:label_course_file), project_files_path(@project), :style => "color:#3CA5C6" %><span class="subnav_num">(<%= @project.attachments.count %>)</span>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_files), new_project_file_path(@project),:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %>
|
||||
<%= link_to "+"+l(:label_upload_files), project_files_path(@project,:flag => true),:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
|
@ -174,9 +166,9 @@
|
|||
<div class="subNav">
|
||||
<%= link_to l(:project_module_repository), {:controller => 'repositories', :action => 'show', :id => @project.id}, :style => "color:#3CA5C6" %>
|
||||
<span class="subnav_num">(<%= @project.repositories.count %>)</span>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_create_repository), new_project_repository_path(@project),:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %>
|
||||
<% end %>
|
||||
<%# if User.current.member_of?(@project) %>
|
||||
<%#= link_to "+"+l(:project_module_create_repository), new_project_repository_path(@project),:style => "font-size:12px;color:#fff; padding:1px 3px 3px 3px;height:18px;margin-top:3px;background:#28be6c;float:right;line-height:20px;" %>
|
||||
<%# end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
@ -186,12 +178,14 @@
|
|||
</ul>
|
||||
</div><!--项目侧导航 end-->
|
||||
<div class="cl"></div>
|
||||
<!-- 项目描述 -->
|
||||
<div class="project_intro">
|
||||
<h4 class="project_h4"><%= l(:label_project_overview)%></h4><%= @project.description %>
|
||||
<div class="lg-foot">
|
||||
<%= l(:label_expend_information)%> <span class="g-arr-down"><img src="/images/new_project/jiantou.jpg" width="12" height="6" /></span>
|
||||
<div id="course_description" class="course_description">
|
||||
<h4 ><%= l(:label_project_overview) %></h4><%= @project.description %>
|
||||
</div>
|
||||
</div><!--项目简介 end-->
|
||||
<div class="lg-foot" onclick="show_more_msg();"><%= l(:label_expend_information) %><span class="g-arr-down"><img src="/images/jiantou.jpg" width="12" height="6" /></span></div>
|
||||
</div>
|
||||
<!-- tag模块 -->
|
||||
<div class="project_Label">
|
||||
<h4 class="project_h4"><%= l(:label_tag)%>:</h4>
|
||||
<div class="tag_h" >
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
</li>
|
||||
<li>
|
||||
<% unless @project.enabled_modules.where("name = 'news'").empty? %>
|
||||
<%= link_to l(:field_user_active_news), project_news_index_path(@project) %>
|
||||
<% end%>
|
||||
<%= link_to l(:project_module_news), project_news_index_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% unless @project.enabled_modules.where("name = 'wiki'").empty? %>
|
||||
|
@ -33,6 +33,10 @@
|
|||
<%= link_to l(:project_module_documents), project_documents_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<%= link_to l(:label_roadmap) ,project_roadmap_path(@project) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%>
|
||||
</li>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<!--modified by young-->
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
|
||||
</div>
|
||||
<div class="content-title-top">
|
||||
<%= link_to l(:label_version_new), new_project_version_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<!--modified by young-->
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
|
||||
</div>
|
||||
<div class="contextual" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
|
||||
<%= link_to_if_authorized(l(:button_edit_associated_wikipage,
|
||||
|
|
|
@ -29,5 +29,5 @@
|
|||
</p>
|
||||
|
||||
<div class="text-diff" style="word-break: break-all;word-wrap: break-word;">
|
||||
<%= simple_format_without_paragraph @diff.to_html %>
|
||||
<%= wiki_simple_format_without_paragraph @diff.to_html %>
|
||||
</div>
|
||||
|
|
|
@ -200,7 +200,7 @@ en:
|
|||
button_cancel: Cancel
|
||||
label_submit: Submit
|
||||
button_project_tags_add: Add
|
||||
label_more: More
|
||||
label_more: "More>>"
|
||||
button_download: Download
|
||||
button_delete: Delete
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ zh:
|
|||
button_cancel: 取消
|
||||
label_submit: 提交
|
||||
button_project_tags_add: 增加
|
||||
label_more: 更多>>
|
||||
label_more: "更多>>"
|
||||
button_download: 下载
|
||||
button_more: 更多
|
||||
button_delete: 删除
|
||||
|
|
|
@ -56,6 +56,7 @@ en:
|
|||
label_expend_information: More Information
|
||||
|
||||
|
||||
|
||||
#
|
||||
# 项目托管平台
|
||||
#
|
||||
|
|
|
@ -60,8 +60,29 @@ zh:
|
|||
project_module_repository: 版本库
|
||||
project_module_create_repository: 创建版本库
|
||||
|
||||
label_settings: 配置
|
||||
project_module_news: 新闻
|
||||
project_module_wiki: Wiki
|
||||
project_module_code_review: 代码审查
|
||||
project_module_calendar: 日历
|
||||
project_module_gantt: 甘特图
|
||||
project_module_documents: 文档
|
||||
label_project_tool_response: 用户反馈
|
||||
label_module_share: DTS测试工具
|
||||
|
||||
label_project_overview: "项目简介:"
|
||||
label_expend_information: 展开更多信息
|
||||
|
||||
|
||||
#
|
||||
# 项目托管平台
|
||||
#
|
||||
# 项目配置
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
#
|
||||
# 项目托管平台
|
||||
#
|
||||
|
|
|
@ -520,16 +520,14 @@ zh:
|
|||
project_module_issue_tracking: 问题跟踪
|
||||
project_moule_boards_show: 项目论坛
|
||||
project_module_time_tracking: 时间跟踪
|
||||
project_module_news: 新闻
|
||||
project_module_documents: 文档
|
||||
|
||||
project_module_wiki: Wiki
|
||||
|
||||
project_module_calendar: 日历
|
||||
project_module_gantt: 甘特图
|
||||
|
||||
|
||||
|
||||
project_module_course: 课程
|
||||
label_module_share: DTS测试工具
|
||||
project_module_code_review: 代码审查
|
||||
|
||||
|
||||
label_user: 用户
|
||||
label_user_plural: 用户列表
|
||||
|
||||
|
@ -759,7 +757,7 @@ zh:
|
|||
label_news_latest: 最近的新闻
|
||||
label_news_view_all: 查看所有新闻
|
||||
label_news_added: 新闻已添加
|
||||
label_settings: 配置
|
||||
|
||||
label_overview: 近期动态
|
||||
label_course_overview: "课程动态"
|
||||
label_project_overview_new: "项目动态"
|
||||
|
@ -1629,7 +1627,6 @@ zh:
|
|||
label_issue_appraise_over: 只能评价一次哦!
|
||||
label_welcome_my_respond: 请在此留下你的意见和建议!
|
||||
|
||||
label_project_tool_response: 用户反馈
|
||||
label_course_feedback: 留言
|
||||
label_tags_search_result: 搜索结果
|
||||
label_tags_call: 需求
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
|
@ -63,6 +63,8 @@ a:hover.subnav_green{ background:#14ad5a;}
|
|||
|
||||
/*简介*/
|
||||
.project_intro{ width:220px; padding:10px; background:#fff; padding-top:5px; color:#6d6d6d;}
|
||||
.course_description{max-height: 105px;overflow:hidden;}
|
||||
.course_description_none{max-height: none;}
|
||||
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;}
|
||||
.lg-foot:hover{ color:#787b7e;}
|
||||
/*右侧内容--动态*/
|
||||
|
|
Loading…
Reference in New Issue