From d42fd98dffe9249cb54c8366c6e2581e29413bba Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 19 May 2015 10:10:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B9=E7=9B=AE=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layouts/_base_development_group.html.erb | 52 -- app/views/layouts/_base_friend_group.html.erb | 29 -- .../layouts/_base_research_team.html.erb | 40 -- app/views/layouts/_join_exit_project.html.erb | 1 - app/views/layouts/base_projects.html.erb | 470 +++++++++--------- .../projects/_development_group.html.erb | 52 ++ app/views/projects/_friend_group.html.erb | 29 ++ app/views/projects/_research_team.html.erb | 40 ++ 8 files changed, 355 insertions(+), 358 deletions(-) delete mode 100644 app/views/layouts/_base_development_group.html.erb delete mode 100644 app/views/layouts/_base_friend_group.html.erb delete mode 100644 app/views/layouts/_base_research_team.html.erb create mode 100644 app/views/projects/_development_group.html.erb create mode 100644 app/views/projects/_friend_group.html.erb create mode 100644 app/views/projects/_research_team.html.erb diff --git a/app/views/layouts/_base_development_group.html.erb b/app/views/layouts/_base_development_group.html.erb deleted file mode 100644 index 218fc186d..000000000 --- a/app/views/layouts/_base_development_group.html.erb +++ /dev/null @@ -1,52 +0,0 @@ -<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> - - <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> - - <% end %> - <% unless @project.enabled_modules.where("name = 'boards'").empty? %> - - <% end%> - <% unless @project.enabled_modules.where("name = 'files'").empty? %> - - <% end %> - <%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %> - <% if visible_repository?(@project) %> - - <% end %> - - - \ No newline at end of file diff --git a/app/views/layouts/_base_friend_group.html.erb b/app/views/layouts/_base_friend_group.html.erb deleted file mode 100644 index d1d7c530a..000000000 --- a/app/views/layouts/_base_friend_group.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> - - <% unless @project.enabled_modules.where("name = 'boards'").empty? %> - - <% end%> - <% unless @project.enabled_modules.where("name = 'files'").empty? %> - - <% end %> \ No newline at end of file diff --git a/app/views/layouts/_base_research_team.html.erb b/app/views/layouts/_base_research_team.html.erb deleted file mode 100644 index 83f6a78bb..000000000 --- a/app/views/layouts/_base_research_team.html.erb +++ /dev/null @@ -1,40 +0,0 @@ -<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> - - <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> - - <% end %> - <% unless @project.enabled_modules.where("name = 'boards'").empty? %> - - <% end%> - <% unless @project.enabled_modules.where("name = 'files'").empty? %> - - <% end%> \ No newline at end of file diff --git a/app/views/layouts/_join_exit_project.html.erb b/app/views/layouts/_join_exit_project.html.erb index 83352de9d..35d8f87ef 100644 --- a/app/views/layouts/_join_exit_project.html.erb +++ b/app/views/layouts/_join_exit_project.html.erb @@ -20,5 +20,4 @@ !Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") %> <%= exit_project_link(@project) %> <% end %> - diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 71975c5c3..beade0a7a 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -1,247 +1,245 @@ <% @nav_dispaly_project_label = 1 -@nav_dispaly_forum_label = 1 %> + @nav_dispaly_forum_label = 1 %> <%#@nav_dispaly_project_label = 1 %> - - - <%= h html_title %> - - - <%= csrf_meta_tag %> - <%= favicon %> - <%= javascript_heads %> - <%= heads_for_theme %> - <%= stylesheet_link_tag 'public', 'pleft', 'project','jquery/jquery-ui-1.9.2' %> - <%= javascript_include_tag 'cookie','project', 'header','select_list_move' %> - <%= call_hook :view_layouts_base_html_head %> - - <%= yield :header_tags -%> + + + <%= h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= javascript_heads %> + <%= heads_for_theme %> + <%= stylesheet_link_tag 'public', 'pleft', 'project','jquery/jquery-ui-1.9.2' %> + <%= javascript_include_tag 'cookie','project', 'header','select_list_move' %> + <%= call_hook :view_layouts_base_html_head %> + + <%= yield :header_tags -%> - - - - - -
- <%= render :partial => 'layouts/new_header'%> -
+ else if($("#research_group").attr("checked") == "checked"){ + project_type = 2; - -
-
-

- - <%= l(:label_projects_community) %> - -

- -
- -
-
-
- -
- <%= l(:label_project_id)%><%= @project.id %> -
- -
- <% text = @project.project_new_type == 1 ? l(:label_development_team) : (@project.project_new_type == 2 ? l(:label_research_group) : l(:label_friend_organization))%> - <% typeclass = @project.project_new_type == 1 ? "pr_kafa" : (@project.project_new_type == 2 ? "pr_keyan" : "pr_friend")%> - <%= render 'layouts/join_exit_project',{:text => text, :typeclass => typeclass} %> -
- -
-
- <%= link_to l(:label_project_name)+"#{@project.name}", project_path(@project.id), :class=>"pr_info_name fl c_dark fb break_word" %> - <% if @project.is_public? %> - <%= l(:label_public)%> - <% else %> - <%= l(:label_private)%> - <% end %> -
-
-
- <% if @project.project_type == 0 %> - <%= l(:label_project_score)%> : - <%= link_to(format("%.2f" ,project_scores(@project) ).to_i, {:controller => 'projects', - :action => 'show_projects_score', - :remote => true, - :id => @project.id - }, :class => "c_orange f14" ) %> - <% end %> -
- - -
- <%= l(:label_member) %>(<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue' %>) - - <%= l(:label_user_watcher) %>(<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'info_foot_num c_blue' %>) - - <%= l(:project_module_attachments) %>( - <% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> - <%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue' %>) -
-
-
- - - -
- - -
-
-

<%= l(:label_project_overview)%>:

-
- <%= textilizable(@project.description) if @project.description && !@project.description.blank? %> -
-
-
- - - - -
-
- - -
-

<%= l(:label_tag)%>:

-
-
- <%= render :partial => 'tags/project_tag', :locals => {:obj => @project,:object_flag => "2"}%> -
-
-
-
-
-
- -
- <%= render_flash_messages %> - <%= yield %> - <%= call_hook :view_layouts_base_content %> -
-
-
-
- <%= render :partial => 'layouts/new_footer'%> -
-
-
- - <% text = @project.project_new_type == 1 ? "development_group" : (@project.project_new_type == 2 ? "research_group" : "friend_organization")%> -
-
-

请选择项目类型:

-
    -
  • id="development_group"/>
  • -
  • id="research_group"/>
  • -
  • id="friend_organization"/>
  • -
- 确定 - -
+ +
+
+

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

+
-
123
- <%= render :partial => 'layouts/new_feedback' %> - - - <%= call_hook :view_layouts_base_body_bottom %> - + +
+
+
+
+ +
+ <%= l(:label_project_id)%><%= @project.id %> +
+ +
+ <% text = @project.project_new_type == 1 ? l(:label_development_team) : (@project.project_new_type == 2 ? l(:label_research_group) : l(:label_friend_organization))%> + <% typeclass = @project.project_new_type == 1 ? "pr_kafa" : (@project.project_new_type == 2 ? "pr_keyan" : "pr_friend")%> + <%= render 'layouts/join_exit_project',{:text => text, :typeclass => typeclass} %> +
+ +
+
+ <%= link_to l(:label_project_name)+"#{@project.name}", project_path(@project.id), :class=>"pr_info_name fl c_dark fb break_word" %> + <% if @project.is_public? %> + <%= l(:label_public)%> + <% else %> + <%= l(:label_private)%> + <% end %> +
+
+
+ <% if @project.project_type == 0 %> + <%= l(:label_project_score)%> : + <%= link_to(format("%.2f" ,project_scores(@project) ).to_i, {:controller => 'projects', + :action => 'show_projects_score', + :remote => true, + :id => @project.id}, :class => "c_orange f14" ) %> + <% end %> +
+ + +
+ <%= l(:label_member) %>(<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue' %>) + + <%= l(:label_user_watcher) %>(<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'info_foot_num c_blue' %>) + + <%= l(:project_module_attachments) %>( + <% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> + <%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue' %>) +
+
+
+ + + +
+ + +
+
+

<%= l(:label_project_overview)%>:

+
+ <%= textilizable(@project.description) if @project.description && !@project.description.blank? %> +
+
+
+ + + + +
+
+ + +
+

<%= l(:label_tag)%>:

+
+
+ <%= render :partial => 'tags/project_tag', :locals => {:obj => @project,:object_flag => "2"}%> +
+
+
+
+
+
+ +
+ <%= render_flash_messages %> + <%= yield %> + <%= call_hook :view_layouts_base_content %> +
+
+
+
+ <%= render :partial => 'layouts/new_footer'%> +
+
+
+ + <% text = @project.project_new_type == 1 ? "development_group" : (@project.project_new_type == 2 ? "research_group" : "friend_organization")%> +
+
+

请选择项目类型:

+
    +
  • id="development_group"/>
  • +
  • id="research_group"/>
  • +
  • id="friend_organization"/>
  • +
+ 确定 + +
+
+
123
+<%= render :partial => 'layouts/new_feedback' %> + + +<%= call_hook :view_layouts_base_body_bottom %> + diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb new file mode 100644 index 000000000..7f79fc5f1 --- /dev/null +++ b/app/views/projects/_development_group.html.erb @@ -0,0 +1,52 @@ +<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> + +<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> + +<% end %> +<% unless @project.enabled_modules.where("name = 'boards'").empty? %> + +<% end%> +<% unless @project.enabled_modules.where("name = 'files'").empty? %> + +<% end %> +<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %> +<% if visible_repository?(@project) %> + +<% end %> + + + \ No newline at end of file diff --git a/app/views/projects/_friend_group.html.erb b/app/views/projects/_friend_group.html.erb new file mode 100644 index 000000000..dca5473f7 --- /dev/null +++ b/app/views/projects/_friend_group.html.erb @@ -0,0 +1,29 @@ +<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> + +<% unless @project.enabled_modules.where("name = 'boards'").empty? %> + +<% end%> +<% unless @project.enabled_modules.where("name = 'files'").empty? %> + +<% end %> \ No newline at end of file diff --git a/app/views/projects/_research_team.html.erb b/app/views/projects/_research_team.html.erb new file mode 100644 index 000000000..2a0ad1ef3 --- /dev/null +++ b/app/views/projects/_research_team.html.erb @@ -0,0 +1,40 @@ +<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> + +<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> + +<% end %> +<% unless @project.enabled_modules.where("name = 'boards'").empty? %> + +<% end%> +<% unless @project.enabled_modules.where("name = 'files'").empty? %> + +<% end%> \ No newline at end of file