Merge branch 'szzh' of http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git into szzh
commit
2caf2ddf30
@ -1,348 +0,0 @@
|
||||
GIT
|
||||
remote: https://github.com/guange2015/grape-swagger-ui.git
|
||||
revision: 4c33439f236c174ae0e774b3435ef2547995c21d
|
||||
specs:
|
||||
grape-swagger-ui (0.0.4)
|
||||
railties (>= 3.1)
|
||||
|
||||
PATH
|
||||
remote: lib/better_errors
|
||||
specs:
|
||||
better_errors (1.1.0)
|
||||
coderay (>= 1.0.0)
|
||||
erubis (>= 2.6.6)
|
||||
|
||||
PATH
|
||||
remote: lib/rack-mini-profiler
|
||||
specs:
|
||||
rack-mini-profiler (0.9.1)
|
||||
rack (>= 1.1.3)
|
||||
|
||||
PATH
|
||||
remote: lib/seems_rateable
|
||||
specs:
|
||||
seems_rateable (1.0.13)
|
||||
jquery-rails
|
||||
rails
|
||||
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actionmailer (3.2.13)
|
||||
actionpack (= 3.2.13)
|
||||
mail (~> 2.5.3)
|
||||
actionpack (3.2.13)
|
||||
activemodel (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
builder (~> 3.0.0)
|
||||
erubis (~> 2.7.0)
|
||||
journey (~> 1.0.4)
|
||||
rack (~> 1.4.5)
|
||||
rack-cache (~> 1.2)
|
||||
rack-test (~> 0.6.1)
|
||||
sprockets (~> 2.2.1)
|
||||
activemodel (3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
builder (~> 3.0.0)
|
||||
activerecord (3.2.13)
|
||||
activemodel (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
arel (~> 3.0.2)
|
||||
tzinfo (~> 0.3.29)
|
||||
activeresource (3.2.13)
|
||||
activemodel (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
activesupport (3.2.13)
|
||||
i18n (= 0.6.1)
|
||||
multi_json (~> 1.0)
|
||||
acts-as-taggable-on (2.4.1)
|
||||
rails (>= 3, < 5)
|
||||
arel (3.0.3)
|
||||
axiom-types (0.1.1)
|
||||
descendants_tracker (~> 0.0.4)
|
||||
ice_nine (~> 0.11.0)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
builder (3.0.0)
|
||||
capybara (2.4.1)
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (~> 2.0)
|
||||
celluloid (0.16.0)
|
||||
timers (~> 4.0.0)
|
||||
childprocess (0.5.3)
|
||||
ffi (~> 1.0, >= 1.0.11)
|
||||
climate_control (0.0.3)
|
||||
activesupport (>= 3.0)
|
||||
cocaine (0.5.4)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
coderay (1.0.9)
|
||||
coercible (1.0.0)
|
||||
descendants_tracker (~> 0.0.1)
|
||||
coffee-rails (3.2.2)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (~> 3.2.0)
|
||||
coffee-script (2.3.0)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.7.1)
|
||||
descendants_tracker (0.0.4)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
diff-lcs (1.2.5)
|
||||
equalizer (0.0.9)
|
||||
erubis (2.7.0)
|
||||
execjs (2.2.1)
|
||||
factory_girl (4.4.0)
|
||||
activesupport (>= 3.0.0)
|
||||
faker (1.4.3)
|
||||
i18n (~> 0.5)
|
||||
fastercsv (1.5.5)
|
||||
ffi (1.9.3)
|
||||
ffi (1.9.3-x86-mingw32)
|
||||
formatador (0.2.5)
|
||||
grape (0.9.0)
|
||||
activesupport
|
||||
builder
|
||||
hashie (>= 2.1.0)
|
||||
multi_json (>= 1.3.2)
|
||||
multi_xml (>= 0.5.2)
|
||||
rack (>= 1.3.0)
|
||||
rack-accept
|
||||
rack-mount
|
||||
virtus (>= 1.0.0)
|
||||
grape-entity (0.4.4)
|
||||
activesupport
|
||||
multi_json (>= 1.3.2)
|
||||
grape-swagger (0.8.0)
|
||||
grape
|
||||
grape-entity
|
||||
guard (2.11.1)
|
||||
formatador (>= 0.2.4)
|
||||
listen (~> 2.7)
|
||||
lumberjack (~> 1.0)
|
||||
nenv (~> 0.1)
|
||||
notiffany (~> 0.0)
|
||||
pry (>= 0.9.12)
|
||||
shellany (~> 0.0)
|
||||
thor (>= 0.18.1)
|
||||
guard-rspec (2.5.0)
|
||||
guard (>= 1.1)
|
||||
rspec (~> 2.11)
|
||||
hashie (3.3.1)
|
||||
hike (1.2.3)
|
||||
hitimes (1.2.2)
|
||||
hitimes (1.2.2-x86-mingw32)
|
||||
htmlentities (4.3.2)
|
||||
i18n (0.6.1)
|
||||
ice_nine (0.11.0)
|
||||
journey (1.0.4)
|
||||
jquery-rails (2.0.3)
|
||||
railties (>= 3.1.0, < 5.0)
|
||||
thor (~> 0.14)
|
||||
json (1.8.1)
|
||||
kaminari (0.16.1)
|
||||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
libv8 (3.16.14.3)
|
||||
listen (2.8.5)
|
||||
celluloid (>= 0.15.2)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
lumberjack (1.0.9)
|
||||
mail (2.5.4)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
metaclass (0.0.4)
|
||||
method_source (0.8.2)
|
||||
mime-types (1.25.1)
|
||||
mini_portile (0.6.0)
|
||||
mocha (1.1.0)
|
||||
metaclass (~> 0.0.1)
|
||||
multi_json (1.10.1)
|
||||
multi_xml (0.5.5)
|
||||
mysql2 (0.3.11)
|
||||
mysql2 (0.3.11-x86-mingw32)
|
||||
nenv (0.2.0)
|
||||
net-ldap (0.3.1)
|
||||
nokogiri (1.6.3)
|
||||
mini_portile (= 0.6.0)
|
||||
nokogiri (1.6.3-x86-mingw32)
|
||||
mini_portile (= 0.6.0)
|
||||
notiffany (0.0.3)
|
||||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
paperclip (3.5.4)
|
||||
activemodel (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
cocaine (~> 0.5.3)
|
||||
mime-types
|
||||
polyglot (0.3.5)
|
||||
pry (0.9.12.6)
|
||||
coderay (~> 1.0)
|
||||
method_source (~> 0.8)
|
||||
slop (~> 3.4)
|
||||
pry (0.9.12.6-x86-mingw32)
|
||||
coderay (~> 1.0)
|
||||
method_source (~> 0.8)
|
||||
slop (~> 3.4)
|
||||
win32console (~> 1.3)
|
||||
rack (1.4.5)
|
||||
rack-accept (0.4.5)
|
||||
rack (>= 0.4)
|
||||
rack-cache (1.2)
|
||||
rack (>= 0.4)
|
||||
rack-mount (0.8.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-openid (1.4.2)
|
||||
rack (>= 1.1.0)
|
||||
ruby-openid (>= 2.1.8)
|
||||
rack-raw-upload (1.1.1)
|
||||
multi_json
|
||||
rack-ssl (1.3.4)
|
||||
rack
|
||||
rack-test (0.6.2)
|
||||
rack (>= 1.0)
|
||||
rails (3.2.13)
|
||||
actionmailer (= 3.2.13)
|
||||
actionpack (= 3.2.13)
|
||||
activerecord (= 3.2.13)
|
||||
activeresource (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.2.13)
|
||||
railties (3.2.13)
|
||||
actionpack (= 3.2.13)
|
||||
activesupport (= 3.2.13)
|
||||
rack-ssl (~> 1.3.2)
|
||||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
thor (>= 0.14.6, < 2.0)
|
||||
rake (10.3.2)
|
||||
rb-fsevent (0.9.4)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
ref (1.0.5)
|
||||
rich (1.4.6)
|
||||
jquery-rails
|
||||
kaminari
|
||||
mime-types
|
||||
paperclip
|
||||
rack-raw-upload
|
||||
rails (>= 3.2.0)
|
||||
sass-rails
|
||||
rspec (2.13.0)
|
||||
rspec-core (~> 2.13.0)
|
||||
rspec-expectations (~> 2.13.0)
|
||||
rspec-mocks (~> 2.13.0)
|
||||
rspec-core (2.13.1)
|
||||
rspec-expectations (2.13.0)
|
||||
diff-lcs (>= 1.1.3, < 2.0)
|
||||
rspec-mocks (2.13.1)
|
||||
rspec-rails (2.13.1)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
rspec-core (~> 2.13.0)
|
||||
rspec-expectations (~> 2.13.0)
|
||||
rspec-mocks (~> 2.13.0)
|
||||
ruby-ole (1.2.11.7)
|
||||
ruby-openid (2.1.8)
|
||||
rubyzip (1.1.6)
|
||||
sass (3.3.10)
|
||||
sass-rails (3.2.6)
|
||||
railties (~> 3.2.0)
|
||||
sass (>= 3.1.10)
|
||||
tilt (~> 1.3)
|
||||
selenium-webdriver (2.42.0)
|
||||
childprocess (>= 0.5.0)
|
||||
multi_json (~> 1.0)
|
||||
rubyzip (~> 1.0)
|
||||
websocket (~> 1.0.4)
|
||||
shellany (0.0.1)
|
||||
shoulda (3.5.0)
|
||||
shoulda-context (~> 1.0, >= 1.0.1)
|
||||
shoulda-matchers (>= 1.4.1, < 3.0)
|
||||
shoulda-context (1.2.1)
|
||||
shoulda-matchers (2.6.1)
|
||||
activesupport (>= 3.0.0)
|
||||
slop (3.6.0)
|
||||
spreadsheet (1.0.0)
|
||||
ruby-ole (>= 1.0)
|
||||
sprockets (2.2.2)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
therubyracer (0.12.1)
|
||||
libv8 (~> 3.16.14.0)
|
||||
ref
|
||||
thor (0.19.1)
|
||||
thread_safe (0.3.4)
|
||||
tilt (1.4.1)
|
||||
timers (4.0.1)
|
||||
hitimes
|
||||
treetop (1.4.15)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.40)
|
||||
uglifier (2.5.1)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
virtus (1.0.3)
|
||||
axiom-types (~> 0.1)
|
||||
coercible (~> 1.0)
|
||||
descendants_tracker (~> 0.0, >= 0.0.3)
|
||||
equalizer (~> 0.0, >= 0.0.9)
|
||||
websocket (1.0.7)
|
||||
win32console (1.3.2-x86-mingw32)
|
||||
xpath (2.0.0)
|
||||
nokogiri (~> 1.3)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
x86-mingw32
|
||||
|
||||
DEPENDENCIES
|
||||
activerecord-jdbc-adapter (= 1.2.5)
|
||||
activerecord-jdbcmysql-adapter
|
||||
acts-as-taggable-on (= 2.4.1)
|
||||
better_errors!
|
||||
builder (= 3.0.0)
|
||||
capybara (~> 2.4.1)
|
||||
coderay (~> 1.0.6)
|
||||
coffee-rails (~> 3.2.1)
|
||||
factory_girl (~> 4.4.0)
|
||||
faker
|
||||
fastercsv (~> 1.5.0)
|
||||
grape (~> 0.9.0)
|
||||
grape-entity
|
||||
grape-swagger
|
||||
grape-swagger-ui!
|
||||
guard-rspec (= 2.5.0)
|
||||
htmlentities
|
||||
i18n (~> 0.6.0)
|
||||
jquery-rails (~> 2.0.2)
|
||||
kaminari
|
||||
mocha (~> 1.1.0)
|
||||
mysql2 (= 0.3.11)
|
||||
net-ldap (~> 0.3.1)
|
||||
nokogiri (~> 1.6.3)
|
||||
paperclip (~> 3.5.4)
|
||||
rack-mini-profiler!
|
||||
rack-openid
|
||||
rails (= 3.2.13)
|
||||
rich (= 1.4.6)
|
||||
rspec-rails (= 2.13.1)
|
||||
ruby-ole
|
||||
ruby-openid (~> 2.1.4)
|
||||
sass-rails (~> 3.2.3)
|
||||
seems_rateable!
|
||||
selenium-webdriver (~> 2.42.0)
|
||||
shoulda (~> 3.5.0)
|
||||
spreadsheet
|
||||
therubyracer
|
||||
uglifier (>= 1.0.3)
|
@ -0,0 +1,30 @@
|
||||
module Mobile
|
||||
module Entities
|
||||
class Comment < Grape::Entity
|
||||
include Redmine::I18n
|
||||
def self.comment_expose(field)
|
||||
expose field do |f,opt|
|
||||
if f.is_a?(Hash) && f.key?(field)
|
||||
f[field]
|
||||
elsif f.is_a?(::Comment)
|
||||
if f.respond_to?(field)
|
||||
if field == :created_on
|
||||
format_time(f.send(field))
|
||||
else
|
||||
f.send(field)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
comment_expose :id
|
||||
expose :author, using: Mobile::Entities::User do |c, opt|
|
||||
if c.is_a? ::Comment
|
||||
c.author
|
||||
end
|
||||
end
|
||||
comment_expose :comments
|
||||
comment_expose :created_on
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,16 @@
|
||||
module Mobile
|
||||
module Entities
|
||||
class CourseDynamic < Grape::Entity
|
||||
def self.course_dynamic_expose(field)
|
||||
expose field do |c,opt|
|
||||
c[field] if (c.is_a?(Hash) && c.key?(field))
|
||||
end
|
||||
end
|
||||
course_dynamic_expose :type
|
||||
course_dynamic_expose :count
|
||||
course_dynamic_expose :course_name
|
||||
course_dynamic_expose :course_id
|
||||
course_dynamic_expose :course_img_url
|
||||
end
|
||||
end
|
||||
end
|
@ -1,8 +1,8 @@
|
||||
class ForumObserver < ActiveRecord::Observer
|
||||
def after_create(forum)
|
||||
Thread.start do
|
||||
Mailer.forum_add(forum).deliver if Setting.notified_events.include?('forum_add')
|
||||
end
|
||||
|
||||
end
|
||||
# def after_create(forum)
|
||||
# Thread.start do
|
||||
# Mailer.forum_add(forum).deliver if Setting.notified_events.include?('forum_add')
|
||||
# end
|
||||
#
|
||||
# end
|
||||
end
|
||||
|
@ -0,0 +1,373 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="content">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= @subject %>
|
||||
</h4>
|
||||
<% if @attachments.first || @course_news.first || @bids.first ||
|
||||
@homeworks.first || @course_journal_messages.first|| @course_messages.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h2>
|
||||
<% unless @course_news.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_news) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_news.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @course_news.each do |course_new|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_notice) %></span>
|
||||
|
||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_new.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程动态 end-->
|
||||
<% end %>
|
||||
<% if !@bids.first.nil? || !@homeworks.first.nil? %>
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;"><%= l(:label_homework_overview) %><span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @bids.count %>)</span></h4>
|
||||
<% unless @bids.first.nil?%>
|
||||
<% @bids.each do |bid| %>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'), course_url(bid.courses.first, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to bid.author, user_activities_url(bid.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_homework) %></span>
|
||||
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(:id => bid.id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(bid.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% unless @homeworks.first.nil? %>
|
||||
<% @homeworks.each do |homework| %>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to homework.user, user_activities_url(homework.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_submit_homework) %></span>
|
||||
|
||||
<%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(:id => homework.bid.id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(homework.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--作业动态 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @course_journal_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:view_course_journals_for_messages) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @course_journal_messages.each do |course_journal_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_journals_for_messages) %></span>
|
||||
|
||||
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_journal_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程留言 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @course_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:view_borad_course) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @course_messages.each do |course_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
||||
|
||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程讨论 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @attachments.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_attendingcontestwork_download) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @attachments.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @attachments.each do |attachment|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_file_upload) %></span>
|
||||
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(attachment.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul><!--课件下载 end-->
|
||||
<% end %>
|
||||
</div><!--课程动态 end-->
|
||||
<% end %>
|
||||
<% if @issues.first || @project_messages.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_project_overview_new)%></h2>
|
||||
<% unless @issues.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_issue_tracking) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @issues.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @issues.each do |issue|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_issue) %></span>
|
||||
|
||||
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(issue.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--问题跟踪 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @project_messages.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:project_moule_boards_show) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @project_messages.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @project_messages.each do |project_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
||||
|
||||
<%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_message.created_on) %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--项目论坛 end-->
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
</div><!--项目动态 end-->
|
||||
<% end %>
|
||||
<% unless @user_journal_messages.first.nil? %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_activities) %></h2>
|
||||
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_user_message) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @user_journal_messages.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @user_journal_messages.each do |user_journal_message|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
||||
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_show_your_message) %></span>
|
||||
|
||||
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'),feedback_url(@user,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(user_journal_message.created_on) %></span></li>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!--课程动态 end-->
|
||||
|
||||
</div><!--个人动态 end-->
|
||||
<% end %>
|
||||
<% if @forums.first || @memos.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:lable_bar_active) %></h2>
|
||||
<% unless @forums.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_user_forum) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @forums.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @forums.each do |forum|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
||||
<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_forum_new) %></span>
|
||||
|
||||
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(forum.created_at) %></span></li>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 新建贴吧 end-->
|
||||
<% end %>
|
||||
<% unless @memos.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_user_message_forum) %>
|
||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @memos.count %>)</span>
|
||||
</h4>
|
||||
|
||||
<% @memos.each do |memo|%>
|
||||
<li style="clear: both; list-style: none;">
|
||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
|
||||
<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %></span>
|
||||
|
||||
<%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id)),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(memo.created_at) %></span></li>
|
||||
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul><!-- 新建贴吧 end-->
|
||||
<% end %>
|
||||
</div><!--贴吧动态 end-->
|
||||
<% end %>
|
||||
<div class="wmail_foot" style="margin-top:20px;color:#2775d2; margin-left:10px;">
|
||||
<%= link_to l(:mail_footer), @user_url, :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -0,0 +1,296 @@
|
||||
<%= @subject %>
|
||||
<% if @attachments.first || @course_news.first || @bids.first ||
|
||||
@homeworks.first || @course_journal_messages.first|| @course_messages.first %>
|
||||
<%= l(:label_course_overview)%>
|
||||
<% unless @course_news.first.nil? %>
|
||||
<%= l(:label_course_news) %>
|
||||
(<%= @course_news.count %>)
|
||||
|
||||
|
||||
<% @course_news.each do |course_new|%>
|
||||
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value)%>
|
||||
]
|
||||
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_project_notice) %>
|
||||
|
||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value)
|
||||
|
||||
|
||||
%> <%= format_time(course_new.created_on) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% if !@bids.first.nil? || !@homeworks.first.nil? %>
|
||||
<%= l(:label_homework_overview) %><%= @bids.count %>
|
||||
<% unless @bids.first.nil?%>
|
||||
<% @bids.each do |bid| %>
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'),course_url(bid.courses.first, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to bid.author, user_activities_url(bid.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_course_homework) %>
|
||||
|
||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(bid,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(bid.created_on) %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% unless @homeworks.first.nil? %>
|
||||
<% @homeworks.each do |homework| %>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to homework.user, user_activities_url(homework.user,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_course_submit_homework) %>
|
||||
|
||||
<%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(homework.bid,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(homework.created_at) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<!--作业动态 end-->
|
||||
<% end %>
|
||||
|
||||
<% unless @course_journal_messages.first.nil? %>
|
||||
|
||||
<%= l(:view_course_journals_for_messages) %> (<%= @course_journal_messages.count %>)
|
||||
|
||||
|
||||
<% @course_journal_messages.each do |course_journal_message|%>
|
||||
|
||||
[
|
||||
|
||||
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_send_course_journals_for_messages) %>
|
||||
|
||||
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(course_journal_message.created_on) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
<% unless @course_messages.first.nil? %>
|
||||
|
||||
<%= l(:view_borad_course) %>
|
||||
(<%= @course_journal_messages.count %>)
|
||||
|
||||
|
||||
<% @course_messages.each do |course_message|%>
|
||||
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_send_course_messages) %>
|
||||
|
||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(course_message.created_on) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
<% unless @attachments.first.nil? %>
|
||||
|
||||
<%= l(:label_course_attendingcontestwork_download) %>
|
||||
(<%= @attachments.count %>)
|
||||
|
||||
|
||||
<% @attachments.each do |attachment|%>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_course_file_upload) %>
|
||||
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(attachment.created_on) %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
</ul><!--课件下载 end-->
|
||||
<% end %>
|
||||
<% end %><!--课程动态 end-->
|
||||
|
||||
<% @issues.first || @project_messages.first %>
|
||||
<%= l(:label_project_overview_new)%>
|
||||
<% unless @issues.first.nil? %>
|
||||
|
||||
<%= l(:label_issue_tracking) %>
|
||||
(<%= @issues.count %>)
|
||||
|
||||
<% @issues.each do |issue|%>
|
||||
▪
|
||||
[
|
||||
|
||||
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to issue.author, user_activities_url(issue.author,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_project_issue) %>
|
||||
|
||||
<%= link_to truncate(issue. subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(issue.created_on) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
<% unless @project_messages.first.nil? %>
|
||||
|
||||
<%= l(:project_moule_boards_show) %>
|
||||
(<%= @project_messages.count %>)
|
||||
|
||||
<% @project_messages.each do |project_message|%>
|
||||
▪[
|
||||
|
||||
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value)
|
||||
|
||||
%>
|
||||
]
|
||||
|
||||
<%= link_to project_message.author, board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value)
|
||||
%>
|
||||
<%= l(:label_send_course_messages) %>
|
||||
|
||||
<%= link_to truncate(project_message. subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(project_message.created_on) %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<% unless @user_journal_messages.first.nil? %>
|
||||
<%= l(:label_activities) %>
|
||||
|
||||
|
||||
<%= l(:label_user_message) %>
|
||||
(<%= @user_journal_messages.count %>)
|
||||
|
||||
<% @user_journal_messages.each do |user_journal_message|%>
|
||||
▪
|
||||
|
||||
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value)
|
||||
|
||||
%>
|
||||
<%= l(:label_show_your_message) %>
|
||||
|
||||
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'), feedback_url(@user,:token => @token.value)
|
||||
|
||||
|
||||
%>
|
||||
<%= format_time(user_journal_message.created_on) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<% end %>
|
||||
<% if @forums.first || @memos.first %>
|
||||
<%= l(:lable_bar_active) %>
|
||||
<% unless @forums.first.nil? %>
|
||||
|
||||
<%= l(:label_user_forum) %>
|
||||
(<%= @forums.count %>)
|
||||
|
||||
<% @forums.each do |forum|%>
|
||||
▪
|
||||
|
||||
<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value) %>
|
||||
<%= l(:label_forum_new) %>
|
||||
|
||||
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value)
|
||||
%>
|
||||
<%= format_time(forum.created_at) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<!-- 新建贴吧 end-->
|
||||
<% end %>
|
||||
<% unless @memos.first.nil? %>
|
||||
|
||||
<%= l(:label_user_message_forum) %>
|
||||
(<%= @memos.count %>)
|
||||
|
||||
<% @memos.each do |memo|%>
|
||||
▪
|
||||
|
||||
<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value)%>
|
||||
<%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %>
|
||||
|
||||
<%= link_to truncate(memo.subject,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))
|
||||
%>
|
||||
<%= format_time(memo.created_at) %>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
<!-- 新建贴吧 end-->
|
||||
<% end %>
|
||||
<!--贴吧动态 end-->
|
||||
<% end %>
|
||||
|
||||
<%= link_to l(:mail_footer), @user_url, :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
@ -0,0 +1,17 @@
|
||||
|
||||
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||
|
||||
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||
<span style="float: left; width: 526px">
|
||||
<p><%= @subject %> </p>
|
||||
<p> <%= link_to @project_url, @project_url%></p>
|
||||
</span>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||
</div>
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
<%= @subject %>
|
||||
<%= link_to @project_url, @project_url%>
|
@ -0,0 +1,27 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<script type="text/javascript">
|
||||
function close_alert_form(){hideModal("#alert_form");}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="alert_form">
|
||||
<div class="upload_con">
|
||||
<div class="polls_alert_upload_box">
|
||||
<p class="polls_alert_box_p">
|
||||
<%= message%>
|
||||
</p>
|
||||
<div class="polls_alert_btn_box">
|
||||
<a class="upload_btn" onclick="close_alert_form();">
|
||||
确 定
|
||||
</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,2 +1,10 @@
|
||||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
||||
alert("发布成功");
|
||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>");
|
||||
showModal('ajax-modal', '180px');
|
||||
$('#ajax-modal').css('height','111px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='#' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().removeClass("alert_praise");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("poll_alert_form");
|
@ -1,2 +1,10 @@
|
||||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
||||
alert("取消成功");
|
||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>");
|
||||
showModal('ajax-modal', '180px');
|
||||
$('#ajax-modal').css('height','80px');
|
||||
$('#ajax-modal').siblings().remove();
|
||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||
"<a href='#' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||
$('#ajax-modal').parent().removeClass("alert_praise");
|
||||
$('#ajax-modal').parent().css("top","").css("left","");
|
||||
$('#ajax-modal').parent().addClass("poll_alert_form");
|
@ -1,52 +0,0 @@
|
||||
# Default setup is given for MySQL with ruby1.9. If you're running Redmine
|
||||
# with MySQL and ruby1.8, replace the adapter name with `mysql`.
|
||||
# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
|
||||
# Line indentation must be 2 spaces (no tabs).
|
||||
|
||||
production:
|
||||
adapter: mysql2
|
||||
database: redmine
|
||||
host: localhost
|
||||
username: root
|
||||
password: ""
|
||||
encoding: utf8
|
||||
|
||||
development:
|
||||
adapter: mysql2
|
||||
database: redmine_development
|
||||
host: 10.107.17.20
|
||||
username: root
|
||||
password: "1234"
|
||||
encoding: utf8
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rake".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
adapter: mysql2
|
||||
database: redmine_test
|
||||
host: 10.107.17.20
|
||||
username: root
|
||||
password: "1234"
|
||||
encoding: utf8
|
||||
|
||||
# PostgreSQL configuration example
|
||||
#production:
|
||||
# adapter: postgresql
|
||||
# database: redmine
|
||||
# host: localhost
|
||||
# username: postgres
|
||||
# password: "postgres"
|
||||
|
||||
# SQLite3 configuration example
|
||||
#production:
|
||||
# adapter: sqlite3
|
||||
# database: db/redmine.sqlite3
|
||||
|
||||
# SQL Server configuration example
|
||||
#production:
|
||||
# adapter: sqlserver
|
||||
# database: redmine
|
||||
# host: localhost
|
||||
# username: jenkins
|
||||
# password: jenkins
|
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'rubygems'
|
||||
require 'rufus-scheduler'
|
||||
|
||||
#users = User.where("mail_notification = 'week' or mail_notification = 'day'")
|
||||
|
||||
scheduler = Rufus::Scheduler.new
|
||||
scheduler.cron('0 0 * * 1') do
|
||||
users = User.where("mail_notification = 'week'")
|
||||
users.each do |user|
|
||||
#Rails.logger.info "send mail to #{user.show_name}(#{user.mail}) at #{Time.now}"
|
||||
Thread.start do
|
||||
Mailer.send_for_user_activities(user, Date.today, 7).deliver
|
||||
end
|
||||
end
|
||||
end
|
||||
scheduler.cron('0 0 * * *') do
|
||||
users = User.where("mail_notification = 'day'")
|
||||
users.each do |user|
|
||||
#Rails.logger.info "send mail to #{user.show_name}(#{user.mail}) at #{Time.now}"
|
||||
Thread.start do
|
||||
Mailer.send_for_user_activities(user, Date.today, 1).deliver
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1 @@
|
||||
Rails.application.config.session_store ActionDispatch::Session::CacheStore, :expire_after => 20.minutes
|
@ -0,0 +1,13 @@
|
||||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
|
||||
#
|
||||
# Trustie管理员模块
|
||||
#
|
||||
# 管理员设置账号激活通知方式
|
||||
#
|
||||
label_registration_activation_by_email: account activation by email
|
||||
label_registration_manual_activation: manual account activation
|
||||
label_registration_automatic_activation: automatic account activation
|
@ -0,0 +1,16 @@
|
||||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
#
|
||||
# Trustie管理员模块
|
||||
#
|
||||
# 管理员设置账号激活通知方式
|
||||
#
|
||||
label_registration_activation_by_email: 通过邮件认证激活帐号
|
||||
label_registration_manual_activation: 手动激活帐号
|
||||
label_registration_automatic_activation: 自动激活帐号
|
||||
|
@ -0,0 +1,3 @@
|
||||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
@ -0,0 +1,22 @@
|
||||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
#
|
||||
# Trustie按钮类
|
||||
#
|
||||
# 底部承办单位等信息
|
||||
#
|
||||
label_hosted_organization: 主办单位
|
||||
label_hosted_by: 国防科学技术大学并行与分布处理国家重点实验室
|
||||
label_sponsor: 计算机科学与技术系
|
||||
label_co_organizer_NUDT: 国防科学技术大学计算机学院
|
||||
label_co_organizer_EECS: 北京大学信息科学技术学院软件研究所
|
||||
label_co_organizer_BHU: 北京航空航天大学计算机学院
|
||||
label_co_organizer_CAS: 中国科学院软件研究所
|
||||
label_co_organizer_InforS: 山东中创软件商用中间件股份有限公司
|
||||
label_rights_reserved: 版权©2007~2014
|
||||
label_contact_us: 联系我们
|
||||
label_license: 湘ICP备09019772
|
@ -0,0 +1,4 @@
|
||||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
@ -0,0 +1,6 @@
|
||||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
@ -0,0 +1,4 @@
|
||||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
@ -0,0 +1,17 @@
|
||||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
|
||||
|
||||
#
|
||||
# 课程托管平台
|
||||
#
|
||||
# 课程资源上传
|
||||
#
|
||||
label_file_upload: 资源文件
|
||||
label_file_upload_error_messages: "上传出现错误,请您检查您的网络环境,并刷新页面重新上传。"
|
||||
button_confirm: 确认
|
@ -0,0 +1,4 @@
|
||||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
@ -0,0 +1,8 @@
|
||||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
|
||||
|
||||
|
||||
label_user_location: Location
|
@ -0,0 +1,81 @@
|
||||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
#
|
||||
# Trustie平台导航
|
||||
#
|
||||
# 顶部菜单
|
||||
#
|
||||
field_homepage: 主页
|
||||
label_project_deposit: 项目托管
|
||||
label_course_practice: 课程实践
|
||||
label_forum_all: 公共贴吧
|
||||
label_school_all: 中国高校
|
||||
label_contest_innovate: 创新竞赛
|
||||
label_software_user: 软件创客
|
||||
label_requirement_enterprise: 软件众包
|
||||
label_stores_index: 资源搜索
|
||||
label_login: 登录
|
||||
|
||||
|
||||
#
|
||||
# 项目托管平台主
|
||||
#
|
||||
# 主旨
|
||||
#
|
||||
label_welcome_trustie_project: Trustie在线项目托管平台
|
||||
label_welcome_trustie_project_description: "面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。"
|
||||
|
||||
|
||||
#
|
||||
# 课程托管平台
|
||||
#
|
||||
# 主旨
|
||||
#
|
||||
label_welcome_trustie_course: Trustie在线课程实践平台
|
||||
label_welcome_trustie_course_description: "面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。"
|
||||
|
||||
|
||||
#
|
||||
# 竞赛托管平台
|
||||
#
|
||||
# 主旨
|
||||
#
|
||||
label_welcome_trustie_contest: Trustie在线竞赛实战平台
|
||||
label_welcome_trustie_contest_description: "面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。"
|
||||
|
||||
#
|
||||
# Trustie平台导航
|
||||
#
|
||||
# 搜索
|
||||
#
|
||||
welcome:
|
||||
search:
|
||||
information: 请输入要搜索的关键字 # 搜索提示信息
|
||||
select: # 下拉列表
|
||||
project: 项目
|
||||
course: 课程
|
||||
user: 用户
|
||||
userinfo:
|
||||
nickname: 昵称
|
||||
showname: 姓名
|
||||
email: 邮箱
|
||||
#
|
||||
# Trustie平台导航
|
||||
#
|
||||
# 下方托管平台链接
|
||||
#
|
||||
label_projects_management_platform: 项目托管平台
|
||||
label_courses_management_platform: 课程实践平台
|
||||
label_contests_management_platform: 竞赛托管平台
|
||||
|
||||
|
||||
#
|
||||
# Trustie平台导航
|
||||
#
|
||||
# 各模块内导航
|
||||
#
|
||||
label_user_location: 当前位置
|
@ -0,0 +1,6 @@
|
||||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
label_approve: Approve
|
||||
label_refusal: Refusal
|
@ -0,0 +1,19 @@
|
||||
en:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
#
|
||||
# Trustie账户模块
|
||||
#
|
||||
# 公共变量
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
label_project_course_un: "The user is not enrolled in any course yet. "
|
||||
label_project_course_unadd: "You have no course,creat one now!"
|
||||
label_project_cousre_studentun: "You have not joined any course, come and join now!"
|
||||
user:
|
||||
courses:
|
||||
doing: Strating
|
||||
done: Finished
|
@ -0,0 +1,139 @@
|
||||
|
||||
# Chinese (China) translations for Ruby on Rails
|
||||
# by tsechingho (http://github.com/tsechingho)
|
||||
zh:
|
||||
# Text direction: Left-to-Right (ltr) or Right-to-Left (rtl)
|
||||
direction: ltr
|
||||
|
||||
#
|
||||
# 项目托管平台主页
|
||||
#
|
||||
# 用户动态栏
|
||||
#
|
||||
lable_user_active: 用户动态
|
||||
user:
|
||||
active:
|
||||
published: 发表了
|
||||
uploaded: 上传了
|
||||
updated: 更新了
|
||||
|
||||
field_user_active_unknow: 未知内容
|
||||
field_user_active_news: 新闻
|
||||
field_user_active_issue: 问题
|
||||
field_user_active_attachment: 附件
|
||||
field_user_active_message: 主题
|
||||
field_user_active_reply: 回复
|
||||
field_user_active_bid: 作业
|
||||
field_user_active_memo: 主题
|
||||
field_user_active_document: 文件
|
||||
field_user_active_changeset: 版本库
|
||||
field_user_active_issue_note: 问题说明
|
||||
|
||||
field_updated_on: 更新于
|
||||
field_time_ago: 前
|
||||
field_active_reply: "回复("
|
||||
# 用户动态中event.title和event.description
|
||||
# 通过act_as_event方法的option配置
|
||||
# "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"
|
||||
# "缺陷 #1869 (已解决):subject"
|
||||
# 而tracker.name和status在数据库中以中文字段形式存储
|
||||
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# top-content
|
||||
#
|
||||
label_user_home: 创客空间
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# 左边栏
|
||||
#
|
||||
label_user_edit: "修改资料"
|
||||
|
||||
label_user_score: 个人综合得分
|
||||
label_user_score_of_topic: 帖子得分
|
||||
label_user_score_of_project: 项目得分
|
||||
label_user_score_of_activity: 活跃度得分
|
||||
label_user_score_of_influence: 影响力得分
|
||||
label_user_score_of_collaboration: 协同得分
|
||||
label_user_score_of_skill: 技术得分
|
||||
label_user_score_of_active: 项目贡献得分
|
||||
|
||||
label_user_info: "个人简介" #huang 添加
|
||||
label_user_watcher: "关注" # huang添加的
|
||||
label_user_fans: "粉丝"
|
||||
label_x_user_fans:
|
||||
zero: 粉丝
|
||||
one: 粉丝
|
||||
other: 粉丝
|
||||
|
||||
label_brief_introduction: 个性签名
|
||||
label_my_brief_introduction: 今天的心情如何?留下你的脚印吧~
|
||||
|
||||
label_user_joinin: "加入时间"
|
||||
label_user_login: "最后登录"
|
||||
label_technical_title: 职称
|
||||
label_bidding_user_studentcode: 学号
|
||||
label_account_developer: 开发者
|
||||
label_account_student: 学生
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# 菜单栏
|
||||
#
|
||||
label_activity: 动态
|
||||
label_user_course: 课程
|
||||
label_user_project: 项目
|
||||
label_user_newfeedback: 留言
|
||||
|
||||
|
||||
#
|
||||
# Trustie个人主页
|
||||
#
|
||||
# Trustie个人主页>
|
||||
# 动态栏
|
||||
label_user_activity: "%{name}的动态"
|
||||
label_user_all_activity: 所有动态
|
||||
label_user_activity_myself: 我的动态
|
||||
label_user_all_respond: 所有反馈
|
||||
|
||||
label_i_new_activity: 有了新活动在
|
||||
label_have_feedback: 有了
|
||||
label_of_feedback: 的
|
||||
label_layouts_feedback: 留言
|
||||
label_new_activity: 有了最新动态
|
||||
|
||||
# 项目栏
|
||||
label_project_unadd: "暂无项目,赶快去创建吧!"
|
||||
label_project_un: "该用户暂未参与任何项目!"
|
||||
|
||||
label_has_watched_project: 关注的项目
|
||||
label_project_take: 参与的项目
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# 课程栏
|
||||
#
|
||||
label_project_course_un: "该用户暂未加入任何课程!"
|
||||
label_project_course_unadd: "你还未创建课程,赶快去创建吧!"
|
||||
label_project_cousre_studentun: "你还未加入任何课程,赶快加入吧!"
|
||||
user:
|
||||
courses:
|
||||
doing: 进行中的课程
|
||||
done: 已结束的课程
|
||||
|
||||
|
||||
#
|
||||
# Trustie用户主页
|
||||
#
|
||||
# 留言栏
|
||||
#
|
@ -0,0 +1,13 @@
|
||||
lib/dalli.rb b1fd9d39df06608fcae5bcf46e9940f95b186d22
|
||||
lib/dalli/ring.rb e2cd42d8b963e669e2c8a83791fa56ec94f9ec55
|
||||
lib/dalli/server.rb a42d734f9b3d654886c86f04fb4f0352e7147b1e
|
||||
lib/dalli/client.rb 11afa0d702c68a151c87ea6e7ccdc863cf03884f
|
||||
lib/dalli/socket.rb 18b7243332ec2dafa9a17c195944e321b684e67e
|
||||
lib/dalli/options.rb d7ecb4c52b4ae2b222f319813234297e0951f82a
|
||||
lib/dalli/version.rb fff3231b7f52d7fa1dabb78bf1f67dcef95c5378
|
||||
lib/dalli/railtie.rb 63dc0fe85790a10225e867774f2c611d1c1ac46c
|
||||
lib/dalli/compressor.rb 13b0cf3f607bd8bc9f969679b0b6e9dcb0a059d7
|
||||
lib/dalli/cas/client.rb 983ded7ec738ed4502658150123e9c5ad7e3faa1
|
||||
lib/rack/session/dalli.rb 2696ad72e8f9d7f5ceb232db0c8d9a8916192edb
|
||||
lib/active_support/cache/dalli_store.rb 010d880e0f297d92b26c8f44e446add9d4fedfa2
|
||||
lib/action_dispatch/middleware/session/dalli_store.rb 62236273ea28a91502871f31aa600e038358931a
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gemspec
|
||||
|
||||
gem 'rake'
|
||||
gem 'kgio', :platform => :mri
|
||||
gem 'appraisal'
|
||||
gem 'connection_pool'
|
||||
|
||||
group :test do
|
||||
gem 'simplecov'
|
||||
end
|
@ -0,0 +1,412 @@
|
||||
Dalli Changelog
|
||||
=====================
|
||||
|
||||
2.7.2
|
||||
==========
|
||||
|
||||
- The fix for #423 didn't make it into the released 2.7.1 gem somehow.
|
||||
|
||||
2.7.1
|
||||
==========
|
||||
|
||||
- Rack session will check if servers are up on initialization (arthurnn, #423)
|
||||
- Add support for IPv6 addresses in hex form, ie: "[::1]:11211" (dplummer, #428)
|
||||
- Add symbol support for namespace (jingkai #431)
|
||||
- Support expiration intervals longer than 30 days (leonid-shevtsov #436)
|
||||
|
||||
2.7.0
|
||||
==========
|
||||
|
||||
- BREAKING CHANGE:
|
||||
Dalli::Client#add and #replace now return a truthy value, not boolean true or false.
|
||||
- Multithreading support with dalli\_store:
|
||||
Use :pool\_size to create a pool of shared, threadsafe Dalli clients in Rails:
|
||||
```ruby
|
||||
config.cache_store = :dalli_store, "cache-1.example.com", "cache-2.example.com", :compress => true, :pool_size => 5, :expires_in => 300
|
||||
```
|
||||
This will ensure the Rails.cache singleton does not become a source of contention.
|
||||
**PLEASE NOTE** Rails's :mem\_cache\_store does not support pooling as of
|
||||
Rails 4.0. You must use :dalli\_store.
|
||||
|
||||
- Implement `version` for retrieving version of connected servers [dterei, #384]
|
||||
- Implement `fetch_multi` for batched read/write [sorentwo, #380]
|
||||
- Add more support for safe updates with multiple writers: [philipmw, #395]
|
||||
`require 'dalli/cas/client'` augments Dalli::Client with the following methods:
|
||||
* Get value with CAS: `[value, cas] = get_cas(key)`
|
||||
`get_cas(key) {|value, cas| ...}`
|
||||
* Get multiple values with CAS: `get_multi_cas(k1, k2, ...) {|value, metadata| cas = metadata[:cas]}`
|
||||
* Set value with CAS: `new_cas = set_cas(key, value, cas, ttl, options)`
|
||||
* Replace value with CAS: `replace_cas(key, new_value, cas, ttl, options)`
|
||||
* Delete value with CAS: `delete_cas(key, cas)`
|
||||
- Fix bug with get key with "Not found" value [uzzz, #375]
|
||||
|
||||
2.6.4
|
||||
=======
|
||||
|
||||
- Fix ADD command, aka `write(unless_exist: true)` (pitr, #365)
|
||||
- Upgrade test suite from mini\_shoulda to minitest.
|
||||
- Even more performance improvements for get\_multi (xaop, #331)
|
||||
|
||||
2.6.3
|
||||
=======
|
||||
|
||||
- Support specific stats by passing `:items` or `:slabs` to `stats` method [bukhamseen]
|
||||
- Fix 'can't modify frozen String' errors in `ActiveSupport::Cache::DalliStore` [dblock]
|
||||
- Protect against objects with custom equality checking [theron17]
|
||||
- Warn if value for key is too large to store [locriani]
|
||||
|
||||
2.6.2
|
||||
=======
|
||||
|
||||
- Properly handle missing RubyInline
|
||||
|
||||
2.6.1
|
||||
=======
|
||||
|
||||
- Add optional native C binary search for ring, add:
|
||||
|
||||
gem 'RubyInline'
|
||||
|
||||
to your Gemfile to get a 10% speedup when using many servers.
|
||||
You will see no improvement if you are only using one server.
|
||||
|
||||
- More get_multi performance optimization [xaop, #315]
|
||||
- Add lambda support for cache namespaces [joshwlewis, #311]
|
||||
|
||||
2.6.0
|
||||
=======
|
||||
|
||||
- read_multi optimization, now checks local_cache [chendo, #306]
|
||||
- Re-implement get_multi to be non-blocking [tmm1, #295]
|
||||
- Add `dalli` accessor to dalli_store to access the underlying
|
||||
Dalli::Client, for things like `get_multi`.
|
||||
- Add `Dalli::GzipCompressor`, primarily for compatibility with nginx's HttpMemcachedModule using `memcached_gzip_flag`
|
||||
|
||||
2.5.0
|
||||
=======
|
||||
|
||||
- Don't escape non-ASCII keys, memcached binary protocol doesn't care. [#257]
|
||||
- :dalli_store now implements LocalCache [#236]
|
||||
- Removed lots of old session_store test code, tests now all run without a default memcached server [#275]
|
||||
- Changed Dalli ActiveSupport adapter to always attempt instrumentation [brianmario, #284]
|
||||
- Change write operations (add/set/replace) to return false when value is too large to store [brianmario, #283]
|
||||
- Allowing different compressors per client [naseem]
|
||||
|
||||
2.4.0
|
||||
=======
|
||||
- Added the ability to swap out the compressed used to [de]compress cache data [brianmario, #276]
|
||||
- Fix get\_multi performance issues with lots of memcached servers [tmm1]
|
||||
- Throw more specific exceptions [tmm1]
|
||||
- Allowing different types of serialization per client [naseem]
|
||||
|
||||
2.3.0
|
||||
=======
|
||||
- Added the ability to swap out the serializer used to [de]serialize cache data [brianmario, #274]
|
||||
|
||||
2.2.1
|
||||
=======
|
||||
|
||||
- Fix issues with ENV-based connections. [#266]
|
||||
- Fix problem with SessionStore in Rails 4.0 [#265]
|
||||
|
||||
2.2.0
|
||||
=======
|
||||
|
||||
- Add Rack session with\_lock helper, for Rails 4.0 support [#264]
|
||||
- Accept connection string in the form of a URL (e.g., memcached://user:pass@hostname:port) [glenngillen]
|
||||
- Add touch operation [#228, uzzz]
|
||||
|
||||
2.1.0
|
||||
=======
|
||||
|
||||
- Add Railtie to auto-configure Dalli when included in Gemfile [#217, steveklabnik]
|
||||
|
||||
2.0.5
|
||||
=======
|
||||
|
||||
- Create proper keys for arrays of objects passed as keys [twinturbo, #211]
|
||||
- Handle long key with namespace [#212]
|
||||
- Add NODELAY to TCP socket options [#206]
|
||||
|
||||
2.0.4
|
||||
=======
|
||||
|
||||
- Dalli no longer needs to be reset after Unicorn/Passenger fork [#208]
|
||||
- Add option to re-raise errors rescued in the session and cache stores. [pitr, #200]
|
||||
- DalliStore#fetch called the block if the cached value == false [#205]
|
||||
- DalliStore should have accessible options [#195]
|
||||
- Add silence and mute support for DalliStore [#207]
|
||||
- Tracked down and fixed socket corruption due to Timeout [#146]
|
||||
|
||||
2.0.3
|
||||
=======
|
||||
|
||||
- Allow proper retrieval of stored `false` values [laserlemon, #197]
|
||||
- Allow non-ascii and whitespace keys, only the text protocol has those restrictions [#145]
|
||||
- Fix DalliStore#delete error-handling [#196]
|
||||
|
||||
2.0.2
|
||||
=======
|
||||
|
||||
- Fix all dalli\_store operations to handle nil options [#190]
|
||||
- Increment and decrement with :initial => nil now return nil (lawrencepit, #112)
|
||||
|
||||
2.0.1
|
||||
=======
|
||||
|
||||
- Fix nil option handling in dalli\_store#write [#188]
|
||||
|
||||
2.0.0
|
||||
=======
|
||||
|
||||
- Reimplemented the Rails' dalli\_store to remove use of
|
||||
ActiveSupport::Cache::Entry which added 109 bytes overhead to every
|
||||
value stored, was a performance bottleneck and duplicated a lot of
|
||||
functionality already in Dalli. One benchmark went from 4.0 sec to 3.0
|
||||
sec with the new dalli\_store. [#173]
|
||||
- Added reset\_stats operation [#155]
|
||||
- Added support for configuring keepalive on TCP connections to memcached servers (@bianster, #180)
|
||||
|
||||
Notes:
|
||||
|
||||
* data stored with dalli\_store 2.x is NOT backwards compatible with 1.x.
|
||||
Upgraders are advised to namespace their keys and roll out the 2.x
|
||||
upgrade slowly so keys do not clash and caches are warmed.
|
||||
`config.cache_store = :dalli_store, :expires_in => 24.hours.to_i, :namespace => 'myapp2'`
|
||||
* data stored with plain Dalli::Client API is unchanged.
|
||||
* removed support for dalli\_store's race\_condition\_ttl option.
|
||||
* removed support for em-synchrony and unix socket connection options.
|
||||
* removed support for Ruby 1.8.6
|
||||
* removed memcache-client compability layer and upgrade documentation.
|
||||
|
||||
|
||||
1.1.5
|
||||
=======
|
||||
|
||||
- Coerce input to incr/decr to integer via #to\_i [#165]
|
||||
- Convert test suite to minitest/spec (crigor, #166)
|
||||
- Fix encoding issue with keys [#162]
|
||||
- Fix double namespacing with Rails and dalli\_store. [#160]
|
||||
|
||||
1.1.4
|
||||
=======
|
||||
|
||||
- Use 127.0.0.1 instead of localhost as default to avoid IPv6 issues
|
||||
- Extend DalliStore's :expires\_in when :race\_condition\_ttl is also used.
|
||||
- Fix :expires\_in option not propogating from DalliStore to Client, GH-136
|
||||
- Added support for native Rack session store. Until now, Dalli's
|
||||
session store has required Rails. Now you can use Dalli to store
|
||||
sessions for any Rack application.
|
||||
|
||||
require 'rack/session/dalli'
|
||||
use Rack::Session::Dalli, :memcache_server => 'localhost:11211', :compression => true
|
||||
|
||||
1.1.3
|
||||
=======
|
||||
|
||||
- Support Rails's autoloading hack for loading sessions with objects
|
||||
whose classes have not be required yet, GH-129
|
||||
- Support Unix sockets for connectivity. Shows a 2x performance
|
||||
increase but keep in mind they only work on localhost. (dfens)
|
||||
|
||||
1.1.2
|
||||
=======
|
||||
|
||||
- Fix incompatibility with latest Rack session API when destroying
|
||||
sessions, thanks @twinge!
|
||||
|
||||
1.1.1
|
||||
=======
|
||||
|
||||
v1.1.0 was a bad release. Yanked.
|
||||
|
||||
1.1.0
|
||||
=======
|
||||
|
||||
- Remove support for Rails 2.3, add support for Rails 3.1
|
||||
- Fix socket failure retry logic, now you can restart memcached and Dalli won't complain!
|
||||
- Add support for fibered operation via em-synchrony (eliaslevy)
|
||||
- Gracefully handle write timeouts, GH-99
|
||||
- Only issue bug warning for unexpected StandardErrors, GH-102
|
||||
- Add travis-ci build support (ryanlecompte)
|
||||
- Gracefully handle errors in get_multi (michaelfairley)
|
||||
- Misc fixes from crash2burn, fphilipe, igreg, raggi
|
||||
|
||||
1.0.5
|
||||
=======
|
||||
|
||||
- Fix socket failure retry logic, now you can restart memcached and Dalli won't complain!
|
||||
|
||||
1.0.4
|
||||
=======
|
||||
|
||||
- Handle non-ASCII key content in dalli_store
|
||||
- Accept key array for read_multi in dalli_store
|
||||
- Fix multithreaded race condition in creation of mutex
|
||||
|
||||
1.0.3
|
||||
=======
|
||||
|
||||
- Better handling of application marshalling errors
|
||||
- Work around jruby IO#sysread compatibility issue
|
||||
|
||||
|
||||
1.0.2
|
||||
=======
|
||||
|
||||
- Allow browser session cookies (blindsey)
|
||||
- Compatibility fixes (mwynholds)
|
||||
- Add backwards compatibility module for memcache-client, require 'dalli/memcache-client'. It makes
|
||||
Dalli more compatible with memcache-client and prints out a warning any time you do something that
|
||||
is no longer supported so you can fix your code.
|
||||
|
||||
1.0.1
|
||||
=======
|
||||
|
||||
- Explicitly handle application marshalling bugs, GH-56
|
||||
- Add support for username/password as options, to allow multiple bucket access
|
||||
from the same Ruby process, GH-52
|
||||
- Add support for >1MB values with :value_max_bytes option, GH-54 (r-stu31)
|
||||
- Add support for default TTL, :expires_in, in Rails 2.3. (Steven Novotny)
|
||||
config.cache_store = :dalli_store, 'localhost:11211', {:expires_in => 4.hours}
|
||||
|
||||
|
||||
1.0.0
|
||||
=======
|
||||
|
||||
Welcome gucki as a Dalli committer!
|
||||
|
||||
- Fix network and namespace issues in get_multi (gucki)
|
||||
- Better handling of unmarshalling errors (mperham)
|
||||
|
||||
0.11.2
|
||||
=======
|
||||
|
||||
- Major reworking of socket error and failover handling (gucki)
|
||||
- Add basic JRuby support (mperham)
|
||||
|
||||
0.11.1
|
||||
======
|
||||
|
||||
- Minor fixes, doc updates.
|
||||
- Add optional support for kgio sockets, gives a 10-15% performance boost.
|
||||
|
||||
0.11.0
|
||||
======
|
||||
|
||||
Warning: this release changes how Dalli marshals data. I do not guarantee compatibility until 1.0 but I will increment the minor version every time a release breaks compatibility until 1.0.
|
||||
|
||||
IT IS HIGHLY RECOMMENDED YOU FLUSH YOUR CACHE BEFORE UPGRADING.
|
||||
|
||||
- multi() now works reentrantly.
|
||||
- Added new Dalli::Client option for default TTLs, :expires_in, defaults to 0 (aka forever).
|
||||
- Added new Dalli::Client option, :compression, to enable auto-compression of values.
|
||||
- Refactor how Dalli stores data on the server. Values are now tagged
|
||||
as "marshalled" or "compressed" so they can be automatically deserialized
|
||||
without the client having to know how they were stored.
|
||||
|
||||
0.10.1
|
||||
======
|
||||
|
||||
- Prefer server config from environment, fixes Heroku session store issues (thanks JoshMcKin)
|
||||
- Better handling of non-ASCII values (size -> bytesize)
|
||||
- Assert that keys are ASCII only
|
||||
|
||||
0.10.0
|
||||
======
|
||||
|
||||
Warning: this release changed how Rails marshals data with Dalli. Unfortunately previous versions double marshalled values. It is possible that data stored with previous versions of Dalli will not work with this version.
|
||||
|
||||
IT IS HIGHLY RECOMMENDED YOU FLUSH YOUR CACHE BEFORE UPGRADING.
|
||||
|
||||
- Rework how the Rails cache store does value marshalling.
|
||||
- Rework old server version detection to avoid a socket read hang.
|
||||
- Refactor the Rails 2.3 :dalli\_store to be closer to :mem\_cache\_store.
|
||||
- Better documentation for session store config (plukevdh)
|
||||
|
||||
0.9.10
|
||||
----
|
||||
|
||||
- Better server retry logic (next2you)
|
||||
- Rails 3.1 compatibility (gucki)
|
||||
|
||||
|
||||
0.9.9
|
||||
----
|
||||
|
||||
- Add support for *_multi operations for add, set, replace and delete. This implements
|
||||
pipelined network operations; Dalli disables network replies so we're not limited by
|
||||
latency, allowing for much higher throughput.
|
||||
|
||||
dc = Dalli::Client.new
|
||||
dc.multi do
|
||||
dc.set 'a', 1
|
||||
dc.set 'b', 2
|
||||
dc.set 'c', 3
|
||||
dc.delete 'd'
|
||||
end
|
||||
- Minor fix to set the continuum sorted by value (kangster)
|
||||
- Implement session store with Rails 2.3. Update docs.
|
||||
|
||||
0.9.8
|
||||
-----
|
||||
|
||||
- Implement namespace support
|
||||
- Misc fixes
|
||||
|
||||
|
||||
0.9.7
|
||||
-----
|
||||
|
||||
- Small fix for NewRelic integration.
|
||||
- Detect and fail on older memcached servers (pre-1.4).
|
||||
|
||||
0.9.6
|
||||
-----
|
||||
|
||||
- Patches for Rails 3.0.1 integration.
|
||||
|
||||
0.9.5
|
||||
-----
|
||||
|
||||
- Major design change - raw support is back to maximize compatibility with Rails
|
||||
and the increment/decrement operations. You can now pass :raw => true to most methods
|
||||
to bypass (un)marshalling.
|
||||
- Support symbols as keys (ddollar)
|
||||
- Rails 2.3 bug fixes
|
||||
|
||||
|
||||
0.9.4
|
||||
-----
|
||||
|
||||
- Dalli support now in rack-bug (http://github.com/brynary/rack-bug), give it a try!
|
||||
- Namespace support for Rails 2.3 (bpardee)
|
||||
- Bug fixes
|
||||
|
||||
|
||||
0.9.3
|
||||
-----
|
||||
|
||||
- Rails 2.3 support (beanieboi)
|
||||
- Rails SessionStore support
|
||||
- Passenger integration
|
||||
- memcache-client upgrade docs, see Upgrade.md
|
||||
|
||||
|
||||
0.9.2
|
||||
----
|
||||
|
||||
- Verify proper operation in Heroku.
|
||||
|
||||
|
||||
0.9.1
|
||||
----
|
||||
|
||||
- Add fetch and cas operations (mperham)
|
||||
- Add incr and decr operations (mperham)
|
||||
- Initial support for SASL authentication via the MEMCACHE_{USERNAME,PASSWORD} environment variables, needed for Heroku (mperham)
|
||||
|
||||
0.9.0
|
||||
-----
|
||||
|
||||
- Initial gem release.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue