Merge branch 'develop' of http://repository.trustie.net/xianbo/trustie2 into develop
This commit is contained in:
commit
ac850dd6f6
|
@ -95,6 +95,7 @@ class WelcomeController < ApplicationController
|
||||||
def entry_select
|
def entry_select
|
||||||
url = request.original_url
|
url = request.original_url
|
||||||
if url.include?("course.trustie.net")
|
if url.include?("course.trustie.net")
|
||||||
|
course
|
||||||
render :course
|
render :course
|
||||||
return 0
|
return 0
|
||||||
elsif url.include?("contest.trustie.net")
|
elsif url.include?("contest.trustie.net")
|
||||||
|
|
|
@ -193,9 +193,8 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def thumbnail_tag(attachment)
|
def thumbnail_tag(attachment)
|
||||||
imagepath = named_attachment_path(attachment, attachment.filename)
|
link_to image_tag(thumbnail_path(attachment)),
|
||||||
link_to image_tag(imagepath),
|
named_attachment_path(attachment, attachment.filename),
|
||||||
imagepath ,
|
|
||||||
:title => attachment.filename
|
:title => attachment.filename
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<% if images.any? %>
|
<% if images.any? %>
|
||||||
<div class="thumbnails">
|
<div class="thumbnails">
|
||||||
<% images.each do |attachment| %>
|
<% images.each do |attachment| %>
|
||||||
<div><%= thumbnail_small_tag(attachment) %></div>
|
<div><%= thumbnail_tag(attachment) %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -298,8 +298,9 @@
|
||||||
|
|
||||||
<!--获奖及教师评奖-->
|
<!--获奖及教师评奖-->
|
||||||
<div style="padding-left: 18px; padding-bottom: 5px">
|
<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) %>
|
<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>
|
||||||
<span style="padding-left: 334px">
|
<span style="padding-left: 334px">
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -79,9 +79,10 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left; padding-left: 100px; padding-top:35px " align="center">
|
<div style="float: left; padding-left: 100px; padding-top:35px ">
|
||||||
<div><%=l(:label_final_scores)%></div>
|
<div style="text-align: center;"><%=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>
|
<% 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><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
|
||||||
</div>
|
</div>
|
||||||
<div style="float: left; padding-left: 100px; padding-top:35px;" align="center">
|
<div style="float: left; padding-left: 100px; padding-top:35px;" align="center">
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
<% projects = find_miracle_project(10, 3) %>
|
<% projects = find_miracle_project(10, 3) %>
|
||||||
<% projects.map do |project| %>
|
<% 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") %>'>
|
<li style="position:relative;height:6em;" class='<%= cycle("odd", "even") %>'>
|
||||||
<div style="float: left;">
|
<div style="float: left;">
|
||||||
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
<%= image_tag(get_project_avatar(project), :class => "avatar-4") %>
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
<div class="user-message-box-list" style="margin-top: 10px;">
|
<div class="user-message-box-list" style="margin-top: 10px;">
|
||||||
<%activities = find_all_activities%>
|
<%activities = find_all_activities%>
|
||||||
<% activities.each do |event| %>
|
<% 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;">
|
<li style="display: block;height:60px; padding-bottom: 4px;">
|
||||||
<div class="inner-right" style="float: left; height: 100%; ">
|
<div class="inner-right" style="float: left; height: 100%; ">
|
||||||
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
||||||
|
@ -118,8 +118,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="welcome-box-list-new memo_activity">
|
<div class="welcome-box-list-new memo_activity">
|
||||||
<% topics = find_new_forum_topics(7) %>
|
<% topics = find_new_forum_topics(7) %>
|
||||||
<% topics.each do |topic|%>
|
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
||||||
<% cache "welcome_index_memosActivity_ul_#{topic}_li" do %>
|
<% cache "welcome_index_memosActivity_ul_topic_#{topic.id}_li" do %>
|
||||||
<li class="message-brief-intro">
|
<li class="message-brief-intro">
|
||||||
<div class='memo_title text_nowrap'>
|
<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 %>
|
<%= 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 %>
|
||||||
|
|
|
@ -173,7 +173,7 @@ default:
|
||||||
|
|
||||||
# Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
|
# Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
|
||||||
# the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
|
# 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.
|
# Configuration of RMagcik font.
|
||||||
#
|
#
|
||||||
|
|
|
@ -671,6 +671,7 @@ RedmineApp::Application.routes.draw do
|
||||||
get 'school/search_school/', :to => 'school#search_school'
|
get 'school/search_school/', :to => 'school#search_school'
|
||||||
|
|
||||||
post 'school/upload', :to => 'school#upload'
|
post 'school/upload', :to => 'school#upload'
|
||||||
|
get 'school/upload_logo', :to => 'school#upload_logo'
|
||||||
|
|
||||||
######added by nie
|
######added by nie
|
||||||
match 'tags/show_projects_tags',:to => 'tags#show_projects_tags'
|
match 'tags/show_projects_tags',:to => 'tags#show_projects_tags'
|
||||||
|
|
Loading…
Reference in New Issue