From 227965aafe2e7d7aee974314ac7402003fd762f4 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 11 Oct 2016 10:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E7=89=88base=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_project_file.html.erb | 10 ++ app/views/layouts/_base_project_top.html.erb | 54 +-------- app/views/layouts/base_projects.html.erb | 118 ------------------- 3 files changed, 13 insertions(+), 169 deletions(-) diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb index ebda40e6e..3533e3a9d 100644 --- a/app/views/files/_project_file.html.erb +++ b/app/views/files/_project_file.html.erb @@ -38,6 +38,16 @@ $('#incourse').attr("class", "re_schbtn b_lblue"); $('#insite').attr("class", "re_schbtn b_lblue"); } + + function project_files_upload() + { + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_project_files',:locals => {:project => @project, :project_attachment_type => 1}) %>'); + showModal('ajax-modal', '513px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before(""); + $('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9"); + $('#ajax-modal').parent().addClass("popbox_polls"); + }
diff --git a/app/views/layouts/_base_project_top.html.erb b/app/views/layouts/_base_project_top.html.erb index 7d03a42ea..2400219f9 100644 --- a/app/views/layouts/_base_project_top.html.erb +++ b/app/views/layouts/_base_project_top.html.erb @@ -2,6 +2,8 @@ <% project_issue_count = @project.issues.count %> <% project_acts = ForgeActivity.where("project_id = ?", @project.id).count %> <% raodmaps = Version.where("project_id = ?", @project.id).count %> +<%# 更新访问数,刷新的时候更新访问次数 %> +<% update_visiti_count @project %>
@@ -92,54 +94,4 @@ $("#navContentCourse").toggle(); } }) - - - - - -
- - <%# 更新访问数,刷新的时候更新访问次数 %> - <% update_visiti_count @project %> -

<%= l(:label_project_ivite_code)%>
<%= (User.current.member_of?(@project) || User.current.admin?) ? @project.invite_code : "******" %>

-
-
-

- <%= @project.creater %>/ - <%= @project.name %> -

- <%= @project.is_public? ? l(:label_public) : l(:label_private) %> -
-

- 项目评分: - <% if @project.project_type == 0 %> - <%# unless static_project_score(@project.project_score) == 0 %> - <%= link_to(format("%.2f" ,static_project_score(@project.project_score)).to_i, - {:controller => 'projects', - :action => 'show_projects_score', - :remote => true, - :id => @project.id}, :class => "sy_cblue" ) %> - <%# end %> - <% end %> - - 浏览:<%= @project.visits.to_i %> - 关注:<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'sy_corange' %> - 成员:<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'sy_corange', :id => 'project_members_number' %> -

-
- <%= render 'layouts/join_exit_project' %> -
-
-
-
\ No newline at end of file + \ No newline at end of file diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index ae28400aa..1395f975f 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -42,52 +42,11 @@ <% end%>
-
-
<%= render :partial => 'layouts/base_project_top' %> -
- - - - -
- -
-
-

<%= 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"}%> -
-
-
-
-
访问计数 <%= @project.visits.to_i %> (自2016年5月)
-
-
<%= render_flash_messages %> <%= yield %> @@ -101,83 +60,6 @@ <%= render :partial => 'layouts/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"/>
  • -
- 确定 -
- - -
<% if hidden_unproject_infos %> <%= render :partial => 'layouts/new_feedback' %> <% end %>