From 05baffe4f3cb3cd24f0ac8731113ff9478136655 Mon Sep 17 00:00:00 2001 From: yanxd Date: Tue, 6 May 2014 17:04:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?issue=E5=AF=BC=E8=88=AA=EF=BC=8C=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E8=B4=B4=E5=90=A7=E5=8A=A8=E6=80=81html,=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E4=BA=86=E6=9C=80=E5=90=8E=E5=9B=9E=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 1 + Gemfile.lock | 7 ++++ app/helpers/issues_helper.rb | 8 +++- app/views/issues/show.html.erb | 1 + app/views/welcome/index.html.erb | 34 +++++++++------- public/stylesheets/welcome.css | 69 +++++++++++++++++++++++++++++++- 6 files changed, 104 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index bfc0b773f..9f3f0c0b9 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ unless RUBY_PLATFORM =~ /w32/ gem 'rubyzip' gem 'zip-zip' end +gem 'thin' gem 'seems_rateable', path: 'lib/seems_rateable' gem "rails", "3.2.13" gem "jquery-rails", "~> 2.0.2" diff --git a/Gemfile.lock b/Gemfile.lock index 54d89f381..199da2490 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,7 +40,9 @@ GEM arel (3.0.2) builder (3.0.0) coderay (1.0.9) + daemons (1.1.9) erubis (2.7.0) + eventmachine (1.0.3) fastercsv (1.5.0) hike (1.2.3) i18n (0.6.1) @@ -91,6 +93,10 @@ GEM multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) + thin (1.5.1) + daemons (>= 1.0.9) + eventmachine (>= 0.12.6) + rack (>= 1.0.0) thor (0.18.1) tilt (1.4.1) treetop (1.4.14) @@ -117,3 +123,4 @@ DEPENDENCIES rdoc (>= 2.4.2) ruby-openid (~> 2.1.4) seems_rateable! + thin diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 8da5d7c35..23351d919 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -59,7 +59,13 @@ module IssuesHelper def issue_heading(issue) #h("#{issue.tracker} ##{issue.id}") - h("#{issue.tracker} #{issue.source_from}") + #h("#{issue.tracker} #{issue.source_from}") + s = '' + s << ">>" + s << link_to(@issue.project.name+l(:issue_list), project_issues_path(@issue.project)) + s << " >" + s << @issue.source_from + s.html_safe end def render_issue_subject_with_tree(issue) diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 169f1a107..6a9c4b6c8 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,4 +1,5 @@ <%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> + <% html_title "#{@issue.tracker.name} #{@issue.source_from}: #{@issue.subject}" %> <%= render :partial => 'action_menu' %> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index e41260de1..3fdee2a97 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -96,22 +96,28 @@ <%= link_to "我要反馈" , suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> <%= link_to "更多>>", forums_path %> -
- <% find_new_forum_topics(7).each do |topic|%> -
  • -
    -       - <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;", :target => "_blank" %> - -
    - <%= l(:field_updated_on) %><%=time_tag_welcome(topic_last_time topic)%>前 - - 由 <%= link_to topic.author ? topic.author : 'Anonymous', user_path(topic.author_id), :style => "font-size: 9pt !important; color: rgb(17, 102, 173);", :target => "_blank" %> 发表 - - 回复(<%= link_to (topic.parent ? topic.parent.replies_count : topic.replies_count), topic.event_url, :target => "_blank" %>) +
    + <% find_new_forum_topics(7).each do |topic|%> +
  • +
    + <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %> +
    +
    + + <%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %> + + + 楼主: <%= link_to_user(topic.author) %> + + + 最后回复:<%=link_to_user topic.last_reply.try(:author) %> + + + 回复(<%= link_to topic.try(:replies_count), topic.event_url %>) +
  • - <% end %> + <% end %>
    diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css index 8e44135b8..dba9f478f 100644 --- a/public/stylesheets/welcome.css +++ b/public/stylesheets/welcome.css @@ -1,3 +1,8 @@ + + * 再添加的时候按照功能划分区块,随便加的被删掉自负 + */ + /************************** 某部分开始 *****************************/ + /************************** 某部分结束 *****************************/ .top_bar{ height: auto; } @@ -376,4 +381,66 @@ a.attachments_list_color { padding: 0 6px; line-height: 1.3em; margin-bottom: 3px; -} \ No newline at end of file +} + /************************** 贴吧动态 开始 *****************************/ + /*贴吧活动*/ +.memo_activity{ + +} +/*帖子li*/ +.memo_activity .message-brief-intro{ + line-height: 1.76em; + padding:3px; + margin:3px; +} +/*帖子中的链接*/ +.memo_activity a { + color: #105CB6; +} +/*帖子标题*/ +.memo_activity .memo_title{ + display: inline-block; + margin-bottom: 3px; + padding-left: 20px; + background: url('/images/list-icon.png') no-repeat scroll ; + background-position: left center; + font-size: 10pt; +} +/*帖子的各种属性*/ +.memo_activity .memo_attr{ + margin-left: 20px; +} +/*帖子的时间*/ +.memo_activity .memo_timestamp{ + color: #999999; + white-space: nowrap; + font-size: 9pt; +} +/*帖子的作者*/ +.memo_activity .memo_author{ + margin-left: 8px; + margin-bottom: 0px; + color: #999999; + white-space: nowrap; + font-size: 9pt; +} +.memo_activity span a{ + color: gray; +} +/*帖子的最后回复人*/ +.memo_activity .memo_last_person{ + margin-left: 8px; + margin-bottom: 0px; + color: #999999; + white-space: nowrap; + font-size: 9pt; +} +/*帖子的总回复数量*/ +.memo_activity .memo_reply{ + float: right; + color: rgb(172, 174, 177); + white-space: nowrap; + font-size: 10pt; +} + + /************************** 贴吧动态 结束 **************************** \ No newline at end of file From eb19b0cb1f915f5e866b585e5e564f7a3aa64247 Mon Sep 17 00:00:00 2001 From: yanxd Date: Tue, 6 May 2014 17:14:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?welcome=20css=E6=94=B9=E6=A0=87=E7=82=B9?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 1 - Gemfile.lock | 7 ------- public/stylesheets/welcome.css | 12 ++++++------ 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index 9f3f0c0b9..bfc0b773f 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,6 @@ unless RUBY_PLATFORM =~ /w32/ gem 'rubyzip' gem 'zip-zip' end -gem 'thin' gem 'seems_rateable', path: 'lib/seems_rateable' gem "rails", "3.2.13" gem "jquery-rails", "~> 2.0.2" diff --git a/Gemfile.lock b/Gemfile.lock index 199da2490..54d89f381 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,9 +40,7 @@ GEM arel (3.0.2) builder (3.0.0) coderay (1.0.9) - daemons (1.1.9) erubis (2.7.0) - eventmachine (1.0.3) fastercsv (1.5.0) hike (1.2.3) i18n (0.6.1) @@ -93,10 +91,6 @@ GEM multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - thin (1.5.1) - daemons (>= 1.0.9) - eventmachine (>= 0.12.6) - rack (>= 1.0.0) thor (0.18.1) tilt (1.4.1) treetop (1.4.14) @@ -123,4 +117,3 @@ DEPENDENCIES rdoc (>= 2.4.2) ruby-openid (~> 2.1.4) seems_rateable! - thin diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css index dba9f478f..9be876239 100644 --- a/public/stylesheets/welcome.css +++ b/public/stylesheets/welcome.css @@ -1,6 +1,6 @@ - - * 再添加的时候按照功能划分区块,随便加的被删掉自负 - */ + /* + * 再添加的时候按照功能划分区块,随便加的被删掉自负 + */ /************************** 某部分开始 *****************************/ /************************** 某部分结束 *****************************/ .top_bar{ @@ -290,8 +290,8 @@ div#tooltip::after { background-color: #FCE6EA; text-decoration: none; border-top: 1px solid #FFFFFF; - border-left: 1px solid #FFFFFF: - border-bottom: 1px solid #717171; + border-left: 1px solid #FFFFFF; + border-bottom: 1px solid #717171; border-right: 1px solid #717171; } .inner-content a:hover{ @@ -402,7 +402,7 @@ a.attachments_list_color { display: inline-block; margin-bottom: 3px; padding-left: 20px; - background: url('/images/list-icon.png') no-repeat scroll ; + background: url('/images/list-icon.png') no-repeat scroll; background-position: left center; font-size: 10pt; }