From efc247f2e76f47ea21d43592f47ca00141112601 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 23 Oct 2014 17:05:36 +0800 Subject: [PATCH 1/9] =?UTF-8?q?1=E3=80=81=E5=90=84=E4=B8=AA=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=9C=A8=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E7=9A=84=E6=98=BE=E7=A4=BA=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E3=80=822=E3=80=81=E7=82=B9=E5=87=BB=E7=AB=9E?= =?UTF-8?q?=E8=B5=9B=E5=88=97=E8=A1=A8=EF=BC=8C=E5=9C=A8=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=9A=84=E6=98=AF=E6=97=A0=E6=90=9C=E7=B4=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E7=95=8C=E9=9D=A2=E4=BF=AE=E6=AD=A3=E4=B8=BA=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/contests_controller.rb | 1 + app/views/contests/index.html.erb | 9 +++++++-- app/views/courses/index.html.erb | 2 +- app/views/projects/index.html.erb | 2 +- app/views/school/index.html.erb | 2 +- public/stylesheets/application.css | 3 +++ public/stylesheets/nyan.css | 2 +- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index 5cdbda5a7..d7a79457a 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -42,6 +42,7 @@ class ContestsController < ApplicationController @offset, @limit = api_offset_and_limit(:limit => 10) #@contests = Contest.visible #@contests = @contests.like(params[:name]) if params[:name].present? + @is_search = params[:name] ? true:false @contests = Contest.visible.where("name like '%#{params[:name]}%'") if params[:contests_search] (redirect_to contests_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank? diff --git a/app/views/contests/index.html.erb b/app/views/contests/index.html.erb index 115b154e6..b8033f89f 100644 --- a/app/views/contests/index.html.erb +++ b/app/views/contests/index.html.erb @@ -38,11 +38,16 @@ <% if @contests.size > 0%> <%= sort_contest(@s_state)%> -
+
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
-<% else %> +<% elsif @is_search%> <%= render :partial => "layouts/no_content"%> +<% else %> + <%= sort_contest(@s_state)%> +
+ <%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %> +
<% end %> <% html_title l(:label_contest_list)%> diff --git a/app/views/courses/index.html.erb b/app/views/courses/index.html.erb index f781ab5c4..6b75bee67 100644 --- a/app/views/courses/index.html.erb +++ b/app/views/courses/index.html.erb @@ -36,7 +36,7 @@
<%= sort_course(@s_type, @school_id)%> -
+
<%if @courses%> <%= render_course_hierarchy(@courses)%> <%end%> diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 5d479bced..721fa5eaf 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -31,7 +31,7 @@ <% end %>
<%= sort_project(@s_type, @project_type) %> -
+
<%= render_project_hierarchy(@projects)%>
diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb index 37febe309..15a76a3d4 100644 --- a/app/views/school/index.html.erb +++ b/app/views/school/index.html.erb @@ -93,7 +93,7 @@
-
+
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1f53d9903..aed928ebe 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2832,3 +2832,6 @@ div.repos_explain{ } .list .tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;} + +.projects-index{min-height: 350px} +.school-index{min-height: 400px} \ No newline at end of file diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index 7b35559e6..71b739ad8 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -864,7 +864,7 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -box-sizing: border-box; - min-height: 200px; + min-height: 180px; } From ab42f918ad2ad129299df7bd2c98f11a63031426 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 23 Oct 2014 17:14:35 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=90=8E=E5=BC=B9=E5=87=BA=E7=9A=84=E5=A4=B4?= =?UTF-8?q?=E5=83=8F=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/activities/index.html.erb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index d03a05477..8b3d5153f 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -1,9 +1,7 @@

<%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %>

<%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %> -

- - +

<% @events_by_day.keys.sort.reverse.each do |day| %>

@@ -13,7 +11,8 @@
- + + <%= image_tag(url_to_avatar(e.event_author), :class => "avatar") %> From 06256a530211afb6af8a615f975dd7649e088476 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 23 Oct 2014 17:19:27 +0800 Subject: [PATCH 3/9] =?UTF-8?q?#1202=E4=BF=AE=E5=A4=8D=E9=A1=B9=E7=9B=AE--?= =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=EF=BC=9A=E7=82=B9=E5=87=BB=E6=9F=90?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E6=B7=BB=E5=8A=A0=E7=9A=84=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=EF=BC=8C=E5=BC=B9=E5=87=BA=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=94=99=E8=AF=AF=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/activities/index.html.erb | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/views/activities/index.html.erb b/app/views/activities/index.html.erb index 8b3d5153f..ef52a164d 100644 --- a/app/views/activities/index.html.erb +++ b/app/views/activities/index.html.erb @@ -62,16 +62,6 @@ <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %> -
- <%= link_to_content_update("\xc2\xab " + l(:label_previous), - params.merge(:from => @date_to - @days - 1), - :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1))) %> -
-
- <%= link_to_content_update(l(:label_next) + " \xc2\xbb", - params.merge(:from => @date_to + @days - 1), - :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1))) unless @date_to >= Date.today %> -
<% other_formats_links do |f| %> <%= f.link_to 'Atom', :url => params.merge(:from => nil, :key => User.current.rss_key) %> <% end %> From 6d6b2c6b38f8fa6b851bcf1c4cf708b89b2ce968 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 23 Oct 2014 17:29:31 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E8=B0=83=E6=95=B4HTML=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wiki/diff.html.erb | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/app/views/wiki/diff.html.erb b/app/views/wiki/diff.html.erb index c50051d20..0bdbc88dc 100644 --- a/app/views/wiki/diff.html.erb +++ b/app/views/wiki/diff.html.erb @@ -1,27 +1,33 @@
-<%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, - :class => 'icon icon-history') %> + <%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
<%= wiki_page_breadcrumb(@page) %> -

<%= h(@page.pretty_title) %>

+

+ <%= h(@page.pretty_title) %> +

-<%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => @diff.content_from.version %> -(<%= @diff.content_from.author ? - @diff.content_from.author.name : l(:label_user_anonymous) - %>, <%= format_time(@diff.content_from.updated_on) %>) + <%= l(:label_version) %> + <%= link_to @diff.content_from.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => @diff.content_from.version %> + + (<%= @diff.content_from.author ? @diff.content_from.author.name : l(:label_user_anonymous)%>, + <%= format_time(@diff.content_from.updated_on) %>) + → -<%= l(:label_version) %> <%= link_to @diff.content_to.version, :action => 'show', - :id => @page.title, :project_id => @page.project, - :version => @diff.content_to.version - %>/<%= @page.content.version %> -(<%= @diff.content_to.author ? - link_to_user(@diff.content_to.author.name) : l(:label_user_anonymous) - %>, <%= format_time(@diff.content_to.updated_on) %>) + <%= l(:label_version) %> + <%= link_to @diff.content_to.version, :action => 'show', + :id => @page.title, :project_id => @page.project, + :version => @diff.content_to.version %> + / + <%= @page.content.version %> + + (<%= @diff.content_to.author ? link_to_user(@diff.content_to.author.name) : l(:label_user_anonymous)%>, + <%= format_time(@diff.content_to.updated_on) %>) +

-<%= simple_format_without_paragraph @diff.to_html %> + <%= simple_format_without_paragraph @diff.to_html %>
From 4991f2b5493c77acf6f86c5bab482d96ee1e9464 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 23 Oct 2014 17:39:26 +0800 Subject: [PATCH 5/9] =?UTF-8?q?#1180=E5=8F=96=E6=B6=88=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=AD=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=B5=8B=E4=BA=88=E8=A7=92=E8=89=B2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/settings/_projects.html.erb | 32 ++++++++++++++++----------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/app/views/settings/_projects.html.erb b/app/views/settings/_projects.html.erb index 28fd9b578..f9ac36d4e 100644 --- a/app/views/settings/_projects.html.erb +++ b/app/views/settings/_projects.html.erb @@ -1,20 +1,26 @@ <%= form_tag({:action => 'edit', :tab => 'projects'}) do %> +
+

+ <%= setting_check_box :default_projects_public %> +

-
-

<%= setting_check_box :default_projects_public %>

+

+ <%= setting_multiselect(:default_projects_modules, + Redmine::AccessControl.available_project_modules.collect {|m| [l_or_humanize(m, :prefix => "project_module_"), m.to_s]}) %> +

-

<%= setting_multiselect(:default_projects_modules, - Redmine::AccessControl.available_project_modules.collect {|m| [l_or_humanize(m, :prefix => "project_module_"), m.to_s]}) %>

+

+ <%= setting_multiselect(:default_projects_tracker_ids, Tracker.sorted.all.collect {|t| [t.name, t.id.to_s]}) %> +

-

<%= setting_multiselect(:default_projects_tracker_ids, - Tracker.sorted.all.collect {|t| [t.name, t.id.to_s]}) %>

+

+ <%= setting_check_box :sequential_project_identifiers %> +

-

<%= setting_check_box :sequential_project_identifiers %>

+

<%= setting_select :new_project_user_role_id, Role.find_all_givable.collect {|r| [r.name, r.id.to_s]}, + :blank => "--- #{l(:actionview_instancetag_blank_option)} ---" %> +

+
-

<%= setting_select :new_project_user_role_id, - Role.find_all_givable.collect {|r| [r.name, r.id.to_s]}, - :blank => "--- #{l(:actionview_instancetag_blank_option)} ---" %>

-
- -<%= submit_tag l(:button_save) %> + <%= submit_tag l(:button_save) %> <% end %> From da35ee123bb1ebf9ebc6afb4c46007f1044bd8f3 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 23 Oct 2014 17:50:03 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E7=BE=8E=E5=8C=96=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contestnotifications/index.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/contestnotifications/index.html.erb b/app/views/contestnotifications/index.html.erb index 5c4f2cef0..a4dacd523 100644 --- a/app/views/contestnotifications/index.html.erb +++ b/app/views/contestnotifications/index.html.erb @@ -28,6 +28,7 @@ <% end if @contest %>
+
<% end %>
From c8c57b3f76851d15c444a0e9140f0d6175e17309 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Oct 2014 09:26:53 +0800 Subject: [PATCH 7/9] =?UTF-8?q?#1404=E4=BF=AE=E5=A4=8D=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=E4=B8=BA=E8=A1=A8=E6=A0=BC=EF=BC=8C=E5=88=87?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E8=AE=BE=E7=BD=AE=E5=A4=A7=E4=BA=8E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=AE=BD=E5=BA=A6=E7=9A=84=E5=AE=BD=E5=BA=A6=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=98=BE=E7=A4=BA=E8=B6=85=E5=87=BA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=9A=84BUG=20=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=88=EF=BC=9A?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0js=E6=94=B9=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index e121098f4..017a9a03c 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -51,7 +51,7 @@ style="word-break: break-all;word-wrap: break-word;"> <%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
-
+
<%= textAreailizable(@memo,:content) %>

<% if @memo.attachments.any?%> @@ -149,8 +149,17 @@ \ No newline at end of file From 1f9c6b66ca6dff14379876b4b5d26833ec2dfe63 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Oct 2014 09:32:47 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dwiki=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E8=B6=85=E5=87=BA=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wiki/_content.html.erb | 2 +- app/views/wiki/show.html.erb | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/views/wiki/_content.html.erb b/app/views/wiki/_content.html.erb index 96d358381..2554f5f2a 100644 --- a/app/views/wiki/_content.html.erb +++ b/app/views/wiki/_content.html.erb @@ -1,4 +1,4 @@ -

+
<%= textAreailizable content, :text, :attachments => content.page.attachments, :edit_section_links => (@sections_editable && {:controller => 'wiki', :action => 'edit', :project_id => @page.project, :id => @page.title}) %> <%#= content.text.html_safe %> diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index b81091b7e..8ade60282 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -68,3 +68,15 @@ <%= render :partial => 'sidebar' %> <% end %> <% html_title @page.pretty_title %> + + From 9723d62d16c9b593078215658cdd2f54e5a2202c Mon Sep 17 00:00:00 2001 From: z9hang Date: Fri, 24 Oct 2014 09:41:31 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E6=9C=89=E7=BC=96=E7=A0=81=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E9=94=99=E8=AF=AF=E6=97=B6=EF=BC=8C=E4=B8=8D=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E8=BD=AC=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/attachments_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index 75b87c6f0..3c815c7d8 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -56,6 +56,8 @@ class AttachmentsController < ApplicationController } format.api end + rescue Encoding::InvalidByteSequenceError => e + render :action => 'file' end def download