Merge branch 'develop' of http://repository.trustie.net/xianbo/trustie2 into develop

This commit is contained in:
senluo 2014-06-13 17:48:25 +08:00
commit ac850dd6f6
8 changed files with 16 additions and 13 deletions

View File

@ -95,6 +95,7 @@ class WelcomeController < ApplicationController
def entry_select
url = request.original_url
if url.include?("course.trustie.net")
course
render :course
return 0
elsif url.include?("contest.trustie.net")

View File

@ -193,9 +193,8 @@ module ApplicationHelper
end
def thumbnail_tag(attachment)
imagepath = named_attachment_path(attachment, attachment.filename)
link_to image_tag(imagepath),
imagepath ,
link_to image_tag(thumbnail_path(attachment)),
named_attachment_path(attachment, attachment.filename),
:title => attachment.filename
end

View File

@ -33,7 +33,7 @@
<% if images.any? %>
<div class="thumbnails">
<% images.each do |attachment| %>
<div><%= thumbnail_small_tag(attachment) %></div>
<div><%= thumbnail_tag(attachment) %></div>
<% end %>
</div>
<% end %>

View File

@ -298,8 +298,9 @@
<!--获奖及教师评奖-->
<div style="padding-left: 18px; padding-bottom: 5px">
<% score = c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_f %>
<span style="padding-left: 50px"><strong><%= l(:label_final_scores) %>
</strong></span><span style="color: red"><%= c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>
</strong></span><span style="color: red"><%= format("%.2f" , score) %>
分</span>
<span style="padding-left: 334px">
<td>

View File

@ -79,9 +79,10 @@
<% end %>
</div>
</div>
<div style="float: left; padding-left: 100px; padding-top:35px " align="center">
<div><%=l(:label_final_scores)%></div>
<div style="padding-top: 1px; font-size: 15px; color: blue"><%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>分</div>
<div style="float: left; padding-left: 100px; padding-top:35px ">
<div style="text-align: center;"><%=l(:label_final_scores)%></div>
<% score = @softapplication.average(:quality).try(:avg).try(:round, 2).to_f %>
<div style="padding-top: 1px; font-size: 15px; color: blue;text-align: center;"><%= format("%.2f" , score) %>分</div>
<div><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
</div>
<div style="float: left; padding-left: 100px; padding-top:35px;" align="center">

View File

@ -54,7 +54,7 @@
<ul class="d-p-projectlist">
<% projects = find_miracle_project(10, 3) %>
<% projects.map do |project| %>
<% cache "welcome_index_hotProject_ul_#{project}_li" do %>
<% cache "welcome_index_hotProject_ul_project_#{project.id}_li" do %>
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
<div style="float: left;">
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
@ -88,7 +88,7 @@
<div class="user-message-box-list" style="margin-top: 10px;">
<%activities = find_all_activities%>
<% activities.each do |event| %>
<% cache "welcome_index_userActivity_ul_#{event}_li" do %>
<% cache "welcome_index_userActivity_ul_event_#{event.class}_#{event.id}_li" do %>
<li style="display: block;height:60px; padding-bottom: 4px;">
<div class="inner-right" style="float: left; height: 100%; ">
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
@ -118,8 +118,8 @@
<% end %>
<div class="welcome-box-list-new memo_activity">
<% topics = find_new_forum_topics(7) %>
<% topics.each do |topic|%>
<% cache "welcome_index_memosActivity_ul_#{topic}_li" do %>
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
<% cache "welcome_index_memosActivity_ul_topic_#{topic.id}_li" do %>
<li class="message-brief-intro">
<div class='memo_title text_nowrap'>
<%= link_to '['+topic.forum.name + ']',forum_path(topic.forum),:class => 'memo_Bar_title' %><%= link_to topic.subject.truncate(30, omission: '...'), topic.event_url,title: topic.subject %>

View File

@ -173,7 +173,7 @@ default:
# Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
# the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
imagemagick_convert_command: '/home/pdl/redmine-2.3.1-1/common/bin/convert'
imagemagick_convert_command: '/home/pdl/redmine-2.3.2-0/common/bin/convert'
# Configuration of RMagcik font.
#

View File

@ -671,6 +671,7 @@ RedmineApp::Application.routes.draw do
get 'school/search_school/', :to => 'school#search_school'
post 'school/upload', :to => 'school#upload'
get 'school/upload_logo', :to => 'school#upload_logo'
######added by nie
match 'tags/show_projects_tags',:to => 'tags#show_projects_tags'