From 338a7d3dedafa47d9cf587e0055453d02c73627f Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 24 Apr 2015 16:05:32 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=8E=BB=E6=8E=89code=20?= =?UTF-8?q?icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/kindeditor/kindeditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 7d74752f1..ea6a5b1c7 100644 --- a/public/assets/kindeditor/kindeditor.js +++ b/public/assets/kindeditor/kindeditor.js @@ -257,7 +257,7 @@ K.options = { minHeight : 100, minChangeSize : 50, zIndex : 811213, - items : [ 'emoticons','code', + items : [ 'emoticons', 'source','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', '|', 'formatblock', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link' From cde4a892e0c7ec98a2cf63ab523a2d8f07b18496 Mon Sep 17 00:00:00 2001 From: whimlex Date: Fri, 24 Apr 2015 17:11:36 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E9=80=9A=E7=9F=A5=E6=9D=A1=E6=95=B0=E5=AF=B9?= =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E6=A0=B7=E5=BC=8F=E7=9A=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/contest.html.erb | 205 ++++++++++++++++++++--------- app/views/welcome/course.html.erb | 3 - 2 files changed, 146 insertions(+), 62 deletions(-) diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index fa23f3843..201afe574 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -256,60 +256,19 @@ <% end %> - - -
-

<%=l(:label_current_attendingcontest_work)%>

-
- <% if Softapplication.count > 0%> -
- <% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %> - -
  • -
    - <%= image_tag('/images/app1.png')%> -
    -
    - <%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %> -
    - -
    - > - <%=softapplication.description.to_s.truncate(50, omission: '...')%> - -

    - -
    - - <%=l(:label_release_time)%>:  - <%=format_time softapplication.created_at %> - -
    - -
  • - <% end; reset_cycle %> - -
    - <% else %> -

    - <%= l(:label_no_ftapplication) %> -

    - <% end %> -
    -
    - -
    -

    - <%=l(:label_issue_feedback_activities)%> - <%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> - <%= link_to l(:label_my_feedback), suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> -

    - <%= link_to l(:label_more_information), forums_path %> -
    -
      - <% find_new_forum_topics(9 - @contest_notifications.count).each do |topic|%> -
    • -
      +<% if @contest_notifications.count < 5%> +
      +

      + <%=l(:label_issue_feedback_activities)%> + <%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> + <%= link_to l(:label_my_feedback), suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> +

      + <%= link_to l(:label_more_information), forums_path %> +
      +
        + <% find_new_forum_topics(9 - @contest_notifications.count).each do |topic|%> +
      • +
              <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %> <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %> @@ -333,11 +292,139 @@
      -
    • - <% end %> -
    -
    -
    + + <% end %> + + + + + +
    +

    <%=l(:label_current_attendingcontest_work)%>

    +
    + <% if Softapplication.count > 0%> +
    + <% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %> + +
  • +
    + <%= image_tag('/images/app1.png')%> +
    +
    + <%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %> +
    + +
    + > + <%=softapplication.description.to_s.truncate(50, omission: '...')%> + +

    + +
    + + <%=l(:label_release_time)%>:  + <%=format_time softapplication.created_at %> + +
    + +
  • + <% end; reset_cycle %> + +
    + <% else %> +

    + <%= l(:label_no_ftapplication) %> +

    + <% end %> +
    +
    +<% else %> +
    +

    <%=l(:label_current_attendingcontest_work)%>

    +
    + <% if Softapplication.count > 0%> +
    + <% find_all_hot_softapplication.map do |softapplication| break if(softapplication == find_all_hot_softapplication[5]) %> + +
  • +
    + <%= image_tag('/images/app1.png')%> +
    +
    + <%= link_to(softapplication.name, softapplication_path(softapplication.id), :class => "d-g-blue d-p-project-name", :title => "#{softapplication.name}", :target => "_blank") %> +
    + +
    + > + <%=softapplication.description.to_s.truncate(50, omission: '...')%> + +

    + +
    + + <%=l(:label_release_time)%>:  + <%=format_time softapplication.created_at %> + +
    + +
  • + <% end; reset_cycle %> + +
    + <% else %> +

    + <%= l(:label_no_ftapplication) %> +

    + <% end %> +
    +
    + + + +
    +

    + <%=l(:label_issue_feedback_activities)%> + <%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> + <%= link_to l(:label_my_feedback), suggestion_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%> +

    + <%= link_to l(:label_more_information), forums_path %> +
    +
      + <% find_new_forum_topics(9 - @contest_notifications.count).each do |topic|%> +
    • +
      +       + <%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %> + <%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url, :class => "gray" , :style => "font-size: 10pt !important;" %> + +
      + + <%= "#{l(:label_updated_time, value: time_tag_welcome(topic_last_time topic))}".html_safe %> + + + <%=l(:label_question_sponsor)%> <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %> + + + <% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %> + <%=l(:label_final_reply)%>  + <%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%> + <% end %> + + + <%=l(:label_reply)%> + (<%= link_to topic.try(:replies_count), topic.event_url %>) + +
      +
      +
    • + <% end %> +
    +
    +
    +<% end%> + + +
    diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb index 5c57a5ba1..cbceec2c7 100644 --- a/app/views/welcome/course.html.erb +++ b/app/views/welcome/course.html.erb @@ -57,7 +57,6 @@
    From 7e833a472785d0a4ace534af211f541c3fa3b7a7 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 24 Apr 2015 17:41:18 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index fed074bdb..3feb49547 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -329,7 +329,7 @@ module ApplicationHelper imagesize = attachment.thumbnail(:size => "50*50") imagepath = named_attachment_path(attachment, attachment.filename) if imagesize - link_to image_tag(thumbnail_path(attachment,"50")), + link_to image_tag(thumbnail_path(attachment), height: '73', width: '100'), imagepath, :title => attachment.filename else