Merge branch 'guange_dev' into szzh
This commit is contained in:
commit
3d7d82747c
|
@ -5,6 +5,7 @@
|
||||||
*.swp
|
*.swp
|
||||||
/config/database.yml
|
/config/database.yml
|
||||||
/config/configuration.yml
|
/config/configuration.yml
|
||||||
|
/config/additional_environment.rb
|
||||||
|
|
||||||
/files/*
|
/files/*
|
||||||
/log/*
|
/log/*
|
||||||
|
|
5
Gemfile
5
Gemfile
|
@ -6,10 +6,7 @@ unless RUBY_PLATFORM =~ /w32/
|
||||||
gem 'iconv'
|
gem 'iconv'
|
||||||
end
|
end
|
||||||
|
|
||||||
source 'http://rubygems.oneapm.com' do
|
gem 'rest-client'
|
||||||
gem 'oneapm_rpm'
|
|
||||||
end
|
|
||||||
|
|
||||||
gem "mysql2", "= 0.3.18"
|
gem "mysql2", "= 0.3.18"
|
||||||
gem 'redis-rails'
|
gem 'redis-rails'
|
||||||
gem 'rubyzip'
|
gem 'rubyzip'
|
||||||
|
|
|
@ -69,9 +69,12 @@ class AttachmentsController < ApplicationController
|
||||||
if candown || User.current.admin? || User.current.id == @attachment.author_id
|
if candown || User.current.admin? || User.current.id == @attachment.author_id
|
||||||
@attachment.increment_download
|
@attachment.increment_download
|
||||||
if stale?(:etag => @attachment.digest)
|
if stale?(:etag => @attachment.digest)
|
||||||
send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
|
req = RestClient.post 'http://192.168.80.107/Any2HtmlHandler.ashx', :txtDes => File.new(@attachment.diskfile, 'rb')
|
||||||
:type => detect_content_type(@attachment),
|
render :text => req.body
|
||||||
:disposition => 'attachment' #inline can open in browser
|
|
||||||
|
# send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
|
||||||
|
# :type => detect_content_type(@attachment),
|
||||||
|
# :disposition => 'attachment' #inline can open in browser
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
require 'net/http'
|
||||||
|
|
||||||
class TestController < ApplicationController
|
class TestController < ApplicationController
|
||||||
|
|
||||||
helper :UserScore
|
helper :UserScore
|
||||||
|
@ -5,6 +7,10 @@ class TestController < ApplicationController
|
||||||
|
|
||||||
def bootstrap; end
|
def bootstrap; end
|
||||||
|
|
||||||
|
def view_office
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
def zip
|
def zip
|
||||||
homeworks_attach_path = []
|
homeworks_attach_path = []
|
||||||
homework_id = params[:homework_id]
|
homework_id = params[:homework_id]
|
||||||
|
|
|
@ -195,7 +195,6 @@
|
||||||
</h3>
|
</h3>
|
||||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||||
<% topics = find_new_forum_topics(10) %>
|
<% topics = find_new_forum_topics(10) %>
|
||||||
<%# cache topics.maximum(:created_at) do%>
|
|
||||||
<div class="d-p-projectlist-box">
|
<div class="d-p-projectlist-box">
|
||||||
<ul class="d-p-projectlist">
|
<ul class="d-p-projectlist">
|
||||||
|
|
||||||
|
@ -233,8 +232,7 @@
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<%# end %>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
|
|
||||||
<%= render partial: 'link_to_another' %>
|
<%= render partial: 'link_to_another' %>
|
||||||
|
|
|
@ -123,7 +123,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="welcome-box-list-new memo_activity">
|
<div class="welcome-box-list-new memo_activity">
|
||||||
<% topics = find_new_forum_topics(12) %>
|
<% topics = find_new_forum_topics(12) %>
|
||||||
<% cache topics.maximum(:created_at) do%>
|
|
||||||
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
||||||
<li class="message-brief-intro" style="line-height:1.4em;">
|
<li class="message-brief-intro" style="line-height:1.4em;">
|
||||||
<div class='memo_title text_nowrap'>
|
<div class='memo_title text_nowrap'>
|
||||||
|
@ -153,10 +152,9 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<%= render partial: 'link_to_another' %>
|
<%= render partial: 'link_to_another' %>
|
||||||
|
|
|
@ -110,6 +110,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'courselist'
|
match 'courselist'
|
||||||
match 'zip'
|
match 'zip'
|
||||||
match 'mailer'
|
match 'mailer'
|
||||||
|
match 'view_office'
|
||||||
end
|
end
|
||||||
##new added by linchun #以发布应用的形式参与竞赛
|
##new added by linchun #以发布应用的形式参与竞赛
|
||||||
resources :softapplications do
|
resources :softapplications do
|
||||||
|
|
Loading…
Reference in New Issue