From a7aa83be8c978bb86ce5fa24d78a49e911a57cd4 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 26 May 2015 16:50:10 +0800 Subject: [PATCH] =?UTF-8?q?module=E9=85=8D=E7=BD=AE=E6=9C=AA=E9=80=89?= =?UTF-8?q?=E6=97=B6=E5=80=99=EF=BC=8C=E7=A6=81=E6=AD=A2=E5=85=B6=E5=AE=83?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E7=9A=84=E8=AE=BF=E9=97=AE=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E6=97=A0=E7=94=A8=E6=96=87=E4=BB=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_projects.html.erb | 10 +++-- app/views/layouts/project_base.html.erb | 47 ------------------------ 2 files changed, 6 insertions(+), 51 deletions(-) delete mode 100644 app/views/layouts/project_base.html.erb diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index beade0a7a..43861d99a 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -144,10 +144,12 @@ <%= 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' %>) + <% unless @project.enabled_modules.where("name = 'files'").empty? %> + + <%= 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' %>) + <% end %>
diff --git a/app/views/layouts/project_base.html.erb b/app/views/layouts/project_base.html.erb deleted file mode 100644 index af376b1f5..000000000 --- a/app/views/layouts/project_base.html.erb +++ /dev/null @@ -1,47 +0,0 @@ -<% @nav_dispaly_project_label = 1 - @nav_dispaly_forum_label = 1 %> - - - - - <%=h html_title %> - - - <%= csrf_meta_tag %> - <%= favicon %> - <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %> - <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> - <%= javascript_heads %> - <%= javascript_include_tag "jquery.leanModal.min" %> - <%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%> - <%= heads_for_theme %> - <%= call_hook :view_layouts_base_html_head %> - - <%= yield :header_tags -%> - - -
-
-
- <%=render :partial => 'layouts/base_header'%> -
-
- <%= render_flash_messages %> - <%= yield %> - <%= call_hook :view_layouts_base_content %> -
- <%=render :partial => 'layouts/base_footer'%> -
- -
-
- - - - - -
-
-<%= call_hook :view_layouts_base_body_bottom %> - -