From 84efdb16c96c0ff27119dc661c8bc43f00716e79 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 14 May 2015 11:06:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3wiki500=E9=94=99=E8=AF=AF=20s?= =?UTF-8?q?how=5Fnew=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96=EF=BC=88=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=B8=AD=E5=AD=98=E5=9C=A8=E9=94=99=E8=AF=AF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/_form_project.html.erb | 10 +- app/views/projects/show.html.erb | 2 +- app/views/projects/show_new.html.erb | 115 +++++++++---------- 3 files changed, 61 insertions(+), 66 deletions(-) diff --git a/app/views/attachments/_form_project.html.erb b/app/views/attachments/_form_project.html.erb index a3d30bd45..9778d3242 100644 --- a/app/views/attachments/_form_project.html.erb +++ b/app/views/attachments/_form_project.html.erb @@ -1,4 +1,4 @@ - + <% if defined?(container) && container && container.saved_attachments %> <% if isReply %> <% container.saved_attachments.each_with_index do |attachment, i| %> @@ -38,12 +38,12 @@ <%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %> - <%= button_tag "文件浏览", :type=>"button", :onclick=>"file#{container.id}.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> + <%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %> <%= file_field_tag 'attachments[dummy][file]', - :id => "file#{container.id}", + :id => '_file', :class => 'file_selector', :multiple => true, - :onchange => "addInputFiles_board(this, '#{container.id}');", + :onchange => 'addInputFiles(this);', :style => 'display:none', :data => { :max_file_size => Setting.attachment_max_size.to_i.kilobytes, @@ -56,7 +56,7 @@ :file_count => l(:label_file_count), :delete_all_files => l(:text_are_you_sure_all) } %> - <%= l(:label_no_file_uploaded)%> + <%= l(:label_no_file_uploaded)%> (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index abc63601e..972606f31 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -40,7 +40,7 @@
- + <% elsif e.forge_act_type == "Journal" %>
<%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %> diff --git a/app/views/projects/show_new.html.erb b/app/views/projects/show_new.html.erb index caa8bf94a..b80bd0904 100644 --- a/app/views/projects/show_new.html.erb +++ b/app/views/projects/show_new.html.erb @@ -1,68 +1,63 @@
<% if User.current.allowed_to?(:add_subprojects, @project) %> - <%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %> + <%= link_to l(:label_subproject_new), new_project_path(:parent_id => @project), :class => 'icon icon-add' %> <% end %> <% if User.current.allowed_to?(:close_project, @project) %> - <% if @project.active? %> - <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %> - <% else %> - <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %> - <% end %> + <% if @project.active? %> + <%= link_to l(:button_close), close_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock' %> + <% else %> + <%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %> + <% end %> <% end %>

<%=l(:label_overview)%>

<% unless @project.active? %> -

<%= l(:text_project_closed) %>

+

<%= l(:text_project_closed) %>

<% end %>
<% if @project.description.present? %> -
- <%= textilizable @project.description %> -
+
+ <%= textilizable @project.description %> +
<% end %>
    - <% unless @project.homepage.blank? %> -
  • <%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %>
  • - <% end %> - <% if @subprojects.any? %> -
  • <%=l(:label_subproject_plural)%>: - <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %>
  • - <% end %> - <% @project.visible_custom_field_values.each do |custom_value| %> - <% if !custom_value.value.blank? %> -
  • <%=h custom_value.custom_field.name %>: <%=h show_value(custom_value) %>
  • - <% end %> - <% end %> + <% unless @project.homepage.blank? %> +
  • <%=l(:field_homepage)%>: <%= link_to h(@project.homepage), @project.homepage %>
  • + <% end %> + <% if @subprojects.any? %> +
  • <%=l(:label_subproject_plural)%>: + <%= @subprojects.collect{|p| link_to p, project_path(p)}.join(", ").html_safe %>
  • + <% end %> + <% @project.visible_custom_field_values.each do |custom_value| %> + <% if !custom_value.value.blank? %> +
  • <%=h custom_value.custom_field.name %>: <%=h show_value(custom_value) %>
  • + <% end %> + <% end %>
<% if User.current.allowed_to?(:view_issues, @project) %> -
-

<%=l(:label_issue_tracking)%>

-
    - <% for tracker in @trackers %> -
  • <%= link_to h(tracker.name), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>: - <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i, - :total => @total_issues_by_tracker[tr -
  • <%= l(:default_tracker_bug) %>
  • +
    +

    <%=l(:label_issue_tracking)%>

    +
      + <% for tracker in @trackers %> +
    • <%= link_to h(tracker.name), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %>: + <%= l(:label_x_open_issues_abbr_on_total, :count => @open_issues_by_tracker[tracker].to_i, + :total => @total_issues_by_tracker[tracker].to_i) %> +
    • <% end %> - <% if tracker.[4]%> -
    • <%= l(:default_tracker_mission) %>
    • - <% end %> - - <% end %> -
    -

    - <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %> - <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %> - | <%= link_to l(:label_calendar), project_calendar_path(@project) %> - <% end %> - <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %> - | <%= link_to l(:label_gantt), project_gantt_path(@project) %> - <% end %> -

    -
    +
+

+ <%= link_to l(:label_issue_view_all), project_issues_path(@project, :set_filter => 1) %> + <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %> + | <%= link_to l(:label_calendar), project_calendar_path(@project) %> + <% end %> + <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %> + | <%= link_to l(:label_gantt), project_gantt_path(@project) %> + <% end %> +

+
<% end %> <%= call_hook(:view_projects_show_left, :project => @project) %>
@@ -71,31 +66,31 @@ <%= render :partial => 'members_box' %> <% if @news.any? && authorize_for('news', 'index') %> -
-

<%=l(:label_news_latest)%>

- <%= render :partial => 'news/news', :collection => @news %> -

<%= link_to l(:label_news_view_all), project_news_index_path(@project) %>

-
+
+

<%=l(:label_news_latest)%>

+ <%= render :partial => 'news/news', :collection => @news %> +

<%= link_to l(:label_news_view_all), project_news_index_path(@project) %>

+
<% end %> <%= call_hook(:view_projects_show_right, :project => @project) %>
<% content_for :sidebar do %> <% if @total_hours.present? %> -

<%= l(:label_spent_time) %>

-

<%= l_hours(@total_hours) %>

-

- <% if User.current.allowed_to?(:log_time, @project) %> - <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> | - <% end %> - <%= link_to(l(:label_details), project_time_entries_path(@project)) %> | - <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %>

+

<%= l(:label_spent_time) %>

+

<%= l_hours(@total_hours) %>

+

+ <% if User.current.allowed_to?(:log_time, @project) %> + <%= link_to l(:button_log_time), new_project_time_entry_path(@project) %> | + <% end %> + <%= link_to(l(:label_details), project_time_entries_path(@project)) %> | + <%= link_to(l(:label_report), report_project_time_entries_path(@project)) %>

<% end %> <%= call_hook(:view_projects_show_sidebar_bottom, :project => @project) %> <% end %> <% content_for :header_tags do %> -<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %> + <%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %> <% end %> <% html_title(l(:label_overview)) -%>