From 9b64027ed619f41c2c1c912ed4010157b9debac0 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 31 Oct 2014 14:04:19 +0800
Subject: [PATCH] =?UTF-8?q?1.=E5=BD=93=E7=94=A8=E6=88=B7=E7=9C=9F=E5=AE=9E?=
=?UTF-8?q?=E5=A7=93=E5=90=8D=E4=B8=BA=E7=A9=BA=E6=97=B6=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E5=88=97=E8=A1=A8=E7=95=8C=E9=9D=A2=E6=98=BE=E7=A4=BA=E4=B8=BA?=
=?UTF-8?q?=E6=98=B5=E7=A7=B0=202.=E4=BF=AE=E6=94=B9=E5=88=86=E9=A1=B5?=
=?UTF-8?q?=E6=8E=A7=E4=BB=B6=E6=A0=B7=E5=BC=8F=203.=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E5=9B=BE=E5=83=8F=E5=A2=9E=E5=8A=A0=E9=93=BE?=
=?UTF-8?q?=E6=8E=A5=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=BC=A0=E6=A0=87=E6=82=AC?=
=?UTF-8?q?=E6=B5=AE=E6=A0=B7=E5=BC=8F=204.=E5=A2=9E=E5=8A=A0=E5=BD=93?=
=?UTF-8?q?=E5=89=8D=E9=80=89=E4=B8=AD=E9=A1=B5=E6=98=BE=E7=A4=BA=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../homework_attach/_homeworks_list.html.erb | 7 ++++---
lib/redmine/pagination.rb | 19 ++++++++++++-------
public/stylesheets/css.css | 8 +++++---
3 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb
index 0534d3110..4d456c3ae 100644
--- a/app/views/homework_attach/_homeworks_list.html.erb
+++ b/app/views/homework_attach/_homeworks_list.html.erb
@@ -20,9 +20,10 @@
-
- <%= image_tag(url_to_avatar(homework.user), :width => "40", :height => "40")%>
+ <%= link_to image_tag(url_to_avatar(homework.user), :width => "40", :height => "40"), user_path(homework.user) %>
- <% user_name = is_teacher ? (homework.user.lastname + homework.user.firstname) : homework.user.login %>
+ <% user_realname = homework.user.lastname.to_s + homework.user.firstname.to_s %>
+ <% user_name = is_teacher ? (user_realname.empty? ? homework.user.login : user_realname) : homework.user.login %>
<%= link_to user_name, user_path(homework.user), :title => user_name %>
@@ -62,4 +63,4 @@
<% end %>
<% else %>
<% end %>
-
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => remote%>
\ No newline at end of file
+<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => remote, :flag => true%>
\ No newline at end of file
diff --git a/lib/redmine/pagination.rb b/lib/redmine/pagination.rb
index 89af979bb..189c15d36 100644
--- a/lib/redmine/pagination.rb
+++ b/lib/redmine/pagination.rb
@@ -224,13 +224,14 @@ module Redmine
#per_page_links = options.delete(:per_page_links)
per_page_links = options[:per_page_links]
remote = options[:remote] ? options[:remote] : false
+ flag = options[:flag] ? options[:flag] : false
per_page_links = false if count.nil?
page_param = paginator.page_param
html = ''
if paginator.previous_page
# \xc2\xab(utf-8) = «
- if remote
+ if flag
text = l(:label_previous)
else
text = "\xc2\xab " + l(:label_previous)
@@ -239,7 +240,7 @@ module Redmine
end
unless paginator.previous_page
if paginator.next_page
- if remote
+ if flag
text = l(:label_previous)
else
text = "\xc2\xab " + l(:label_previous)
@@ -251,11 +252,15 @@ module Redmine
previous = nil
paginator.linked_pages.each do |page|
if previous && previous != page - 1
- html << ' - ' << content_tag('span', '...', :class => 'spacer') << '
' + ' '
+ if flag
+ html << '- ' << content_tag('a', '...') << '
' + ' '
+ else
+ html << '- ' << content_tag('span', '...', :class => 'spacer') << '
' + ' '
+ end
end
if page == paginator.page
- if remote
- html << '- ' << content_tag('span', page.to_s, :class => 'select') << '
'
+ if flag
+ html << '- ' << page.to_s << '
'
else
html << '- ' << content_tag('span', page.to_s, :class => 'current-page') << '
'
end
@@ -267,7 +272,7 @@ module Redmine
end
if paginator.next_page
- if remote
+ if flag
text = l(:label_next)
else
text = l(:label_next) + " \xc2\xbb"
@@ -277,7 +282,7 @@ module Redmine
unless paginator.next_page
if paginator.previous_page
- if remote
+ if flag
text = l(:label_next)
else
text = l(:label_next) + " \xc2\xbb"
diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css
index cf8f6e35e..ff2c60886 100644
--- a/public/stylesheets/css.css
+++ b/public/stylesheets/css.css
@@ -37,8 +37,8 @@ a:hover.tb_all{ background:#eaeaea; text-decoration:none;}
.dis ul{ height:75px; border-bottom:1px dashed #64bdd9;}
.dis ul li{ float:left;}
.dis ul li a{ display:block; color:#15bccf; }
-.pic_head{ width:40px; padding:8px 15px 0 8px;}
-.pic_head a{ text-align:center; width:40px; overflow:hidden;}
+.pic_head{ width:42px; padding:8px 15px 0 8px;}
+.pic_head a{ text-align:center; width:42px; overflow:hidden;text-overflow:ellipsis; white-space:nowrap;}
.pic_head img{ border:1px solid #fff;}
.pic_head img:hover{border:1px solid #15bccf;}
.dis ul li.wname a{ width:260px; font-size:14px; color:#595959; padding:20px 0 0 15px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
@@ -48,8 +48,10 @@ a:hover.tb_all{ background:#eaeaea; text-decoration:none;}
.dis ul li.wping a{ margin-top:18px; margin-bottom:3px; width:43px; height:23px; background:#15bccf; color:#fff; text-align:center; padding-top:3px;}
.dis ul li.wping a:hover{ background-color:#03a1b3;}
ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
+.wlist span{ border:1px solid #15bccf; padding:0 5px; margin-left:3px;}
.wlist a{ border:1px solid #15bccf; padding:0 5px; margin-left:3px;}
.wlist a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
+.wlist_select { background-color:#64bdd9; color:#fff; padding:0 5px; margin-left:3px; border:1px solid #64bdd9;}
.code_list{ float:right; font-size:12px; color:#484848; padding:5px 3px; border-bottom:2px solid #15bccf; width:687px; }
.code_list a{ color:#787878;}
.fr{ float:right;}
@@ -59,7 +61,7 @@ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
.dis ul li.wmine a{ color:#3d7ec2; text-align:center; width:50px; font-weight: bold;}
.msg_box{ width:693px; height:170px; border-bottom:1px dashed #CCC; padding-top:20px;}
-.msg_box h4{ margin-left:15px;}
+.msg_box h4{ margin-left:15px;border-style: none;}
.msg_box textarea{width:660px;height:90px;padding:2px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 15px; color:#666; font-size:12px;}
.msg_box a{ float:right; display:block; width:50px; height:22px; background:#15bccf; color:#fff; margin-right:10px; text-align:center; margin-top:5px; }
.msg_box a:hover{ background-color:#03a1b3; text-decoration:none;}