From 2b063db0cc3b809ae8daf54c5df885d4e3f9c216 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 13 Apr 2015 21:08:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=20=E6=9C=AA=E5=AE=8C=E6=88=90=E9=83=A8=E5=88=86?= =?UTF-8?q?=EF=BC=8C=E9=9A=94=E8=A1=8C=E6=8D=A2=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/projects_helper.rb | 2 +- .../projects/settings/_new_versions.html.erb | 165 +++++------------- public/javascripts/project.js | 4 +- 3 files changed, 46 insertions(+), 125 deletions(-) diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index fc2afe0f7..1d47e8bcc 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -21,7 +21,7 @@ include AvatarHelper module ProjectsHelper def link_to_version(version, options = {}) return '' unless version && version.is_a?(Version) - link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, options + link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, :class => "c_blue02" end def project_settings_tabs diff --git a/app/views/projects/settings/_new_versions.html.erb b/app/views/projects/settings/_new_versions.html.erb index 28c3c42ef..06e704495 100644 --- a/app/views/projects/settings/_new_versions.html.erb +++ b/app/views/projects/settings/_new_versions.html.erb @@ -1,140 +1,59 @@ +<% if @project.shared_versions.any? %> - - - - - - + + + + + + - + <% for version in @project.shared_versions.sort %> + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - + <% end; reset_cycle %> + <% else %> +

+ <%= l(:label_no_data) %> +

+ <% end %>
版本 日期描述 状态共享Wiki 页面<%= l(:label_version) %> <%= l(:field_effective_date) %><%= l(:field_description) %> <%= l(:field_status) %><%= l(:field_sharing) %><%= l(:label_wiki_page) %>
- 暑期版(Summer Beta) V0.8 + <%= 'shared' if version.project != @project %> <%= link_to_version version %> 2013-08-30打开 - 编辑 - 删除 -
- 正式版(First Release) V1.0 - 2013-11-01正式对外提供服务的版本打开 - 编辑 - 删除 -
- 商业版(Second Release) V2.0 - 2013-08-30增加在线支付、实名认证等功能,界面更加美化,用户交互更加友好!打开 - 编辑 - 删除 -
- JACK SUMMER V0.8 - 2014-08-25试用人员的开发版本打开 - 编辑 - 删除 + <%= format_date(version.effective_date) %><%=h version.description %><%= l("version_status_#{version.status}") %> + <%= link_to_if_authorized(h(version.wiki_page_title), {: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? %>
- LongJun Contest - V1.0 - contest网站的开发分支打开 - 编辑 - 删除 -
- SZZH V1.1 (Supported by BJSZZH) - 神舟公司外包开发版本打开 - 编辑 - 删除 + <% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %> + <%= link_to l(:button_edit), edit_version_path(version), :class => 'c_purple' %> + <%= delete_link version_path(version) %> + <% end %>
-关闭已完成的版本 + <% if @project.versions.any? %> + <%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put, :class =>"c_orange fr" %> + <% end %> -新建版本 + <%= link_to l(:label_version_new), new_project_version_path(@project, :back_url => ''), :class => 'c_blue fl' if User.current.allowed_to?(:manage_versions, @project) %>
- -
\ No newline at end of file + + + + + + + + + diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 618268f41..98e808622 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -178,4 +178,6 @@ function project_setting(n) $("#pro_st_tbc_0"+i).removeClass().addClass("pro_st_undis"); } } -} \ No newline at end of file +} + +// 背景换色 \ No newline at end of file