diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 3459ef7fa..93c941518 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -108,7 +108,7 @@ module WelcomeHelper # or searchStudent(project).count end - def find_new_forum_topics limit=9 + def find_new_forum_topics limit=7 Memo.where('memos.parent_id IS NULL').reorder('memos.created_at DESC').limit(limit) # activity = Redmine::Activity::Fetcher.new(nil) # activity.scope=['memos'] diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 5aa2cdb76..28ff04080 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -1,5 +1,5 @@ -
+
@@ -205,7 +205,7 @@ <%= stylesheet_link_tag 'welcome' %>
-
+
--> + <%= link_to "更多>>", forums_path %>
- <% find_new_forum_topics.each do |topic|%> -
  • + <% find_new_forum_topics(8).each do |topic|%> +
  • -       +       <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;"%>
    - <%=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);"%>发表 + <%=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);"%> 发表 回复(<%= link_to topic.replies_count, topic.event_url %>)
    @@ -259,19 +260,19 @@
  • -
    -
      +
      +

        用户动态

        <% find_all_activities.each do |event| %> -
      • +
      • <%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
        <%= link_to event.event_author, (user_path(event.event_author) if event.event_author), :style => "color:green;" %><%= show_user_content event %> -

        <%= time_tag_welcome event.event_datetime %>前     <%= show_event_reply event %>

        +

        <%= time_tag_welcome event.event_datetime %>前     <%= show_event_reply event %>

      • <% end %> @@ -280,7 +281,8 @@
        -

        热门项目

        +

        热门项目

        + <%= link_to "更多>>", { :controller => 'projects', :action => 'index', :project_type => 0} %>
          <% find_all_hot_project.map do |project| break if(project == find_all_hot_project[15]) %> @@ -290,7 +292,7 @@

        - <%= link_to( project.name, project_path(project.project_id), :class => "d-g-blue d-p-project-name", :title => "#{project.name}")%> + <%= link_to( project.name, project_path(project.project_id), :class => "d-g-blue d-p-project-name", :title => "#{project.name}")%> <%= content_tag "span", show_grade(project), :style => "cursor: pointer; display: inline-block; float: right; color: #ec6300; ", @@ -310,6 +312,7 @@

        热门课程

        + <%= link_to "更多>>", {:controller => 'projects', :action => 'course', :project_type => 1, :project_sort_type => 1} %>
          <% find_all_hot_course.map do |project| break if(project == find_all_hot_course[5]) %> @@ -339,6 +342,7 @@

          热门竞赛

          + <%= link_to "更多>>", {:controller => 'bids', :action => 'contest', :project_type => 1} %>
            <% find_all_hot_contest.map do |contest| break if(contest == find_all_hot_contest[5]) %> @@ -358,6 +362,7 @@

            热门众包

            + <%= link_to "更多>>", {:controller => 'bids', :action => 'index'} %>
              <% find_all_hot_bid.map do |bid| break if(bid == find_all_hot_bid[5]) %> diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css index 85249e614..e4af4e71f 100644 --- a/public/stylesheets/welcome.css +++ b/public/stylesheets/welcome.css @@ -129,7 +129,7 @@ ul.welcome-message-list{ } .d-p-index-hotproject{ width: 48%; - margin-top: 30px; + margin-top: 40px; float: left; } ul.d-p-index-hdright{ @@ -198,6 +198,7 @@ p.layout { .right ul li { margin-bottom: 6px; + border-bottom: 1px dashed rgb(229,229,229); } .avatar-3 { @@ -206,7 +207,7 @@ p.layout { margin-top: 5px; } .message-brief-intro a.gray{ - color: #07a; + color: rgb(17, 102, 173); } .message-brief-intro a.gray:visited{ @@ -302,9 +303,3 @@ div#tooltip::after { border-bottom: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; } -{ - border-top: 1px solid #717171; - border-left: 1px solid #717171; - border-bottom: 1px solid #FFFFFF; - border-right: 1px solid #FFFFFF; -}
    <%= l(:label_welcome_trustie) %> , <%= l(:label_welcome_trustie_description) %>