Merge branch 'hjq_new_course' into szzh
This commit is contained in:
commit
a0c8e52d0a
|
@ -31,8 +31,8 @@ class RepositoriesController < ApplicationController
|
|||
default_search_scope :changesets
|
||||
|
||||
before_filter :find_project_by_project_id, :only => [:new, :create, :newrepo]
|
||||
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers, :forked]
|
||||
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo,:to_gitlab]
|
||||
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
|
||||
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo, :to_gitlab, :forked]
|
||||
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
|
||||
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked]
|
||||
accept_rss_auth :revisions
|
||||
|
@ -64,6 +64,8 @@ class RepositoriesController < ApplicationController
|
|||
end
|
||||
|
||||
def forked
|
||||
@project = Project.find(params[:id])
|
||||
@repository = Repository.where("project_id =? and type =?", @project.id, "Repository::Gitlab")
|
||||
# 如果当前用户已经fork过该项目,不会新fork项目,则跳至已fork的项
|
||||
unless has_forked?(@project, User.current)
|
||||
project = project_from_current_project(@project.id, User.current.id)
|
||||
|
@ -76,7 +78,11 @@ class RepositoriesController < ApplicationController
|
|||
else
|
||||
g = Gitlab.client
|
||||
if User.current.gid.nil?
|
||||
g.sync_user(User.current)
|
||||
begin
|
||||
g.sync_user(User.current)
|
||||
ensure
|
||||
logger.error "Synv user failed ==>#{User.current.id}"
|
||||
end
|
||||
end
|
||||
gproject = g.fork(@project.gpid, User.current.gid)
|
||||
if gproject
|
||||
|
@ -351,7 +357,7 @@ update
|
|||
@changesets = g.commits(@project.gpid, :ref_name => @rev)
|
||||
# @changesets = @repository.latest_changesets(@path, @rev)
|
||||
# @changesets_count = @repository.latest_changesets(@path, @rev).count
|
||||
@changesets_all_count = 0
|
||||
@changesets_all_count = @project.gpid.nil? ? 0 : g.commits_total_count(@project.gpid).count
|
||||
@changesets_latest_coimmit = @changesets[0]
|
||||
@properties = @repository.properties(@path, @rev)
|
||||
@repositories = @project.repositories
|
||||
|
@ -383,10 +389,10 @@ update
|
|||
@commits = g.commits(@project.gpid, page:(params[:page].to_i - 1).to_s)
|
||||
|
||||
#add by hx
|
||||
rep_count = commit_count(@project)
|
||||
#rep_count = commit_count(@project)
|
||||
|
||||
#页面传递必须要str类型,但是Paginator的初始化必须要num类型,需要类型转化
|
||||
@commits_count = rep_count
|
||||
@commits_count = params[:commit_count].to_i
|
||||
@commits_pages = Redmine::Pagination::Paginator.new @commits_count,limit,params[:page]
|
||||
|
||||
@commit = g.commit(@project.gpid,@rev)
|
||||
|
|
|
@ -253,8 +253,10 @@ module ApplicationHelper
|
|||
subject = truncate(subject, :length => 60)
|
||||
end
|
||||
end
|
||||
if issue.status_id == 5
|
||||
if issue.status_id == 3
|
||||
s = link_to text, issue_path(issue), :class => "text_line_s", :title => title
|
||||
elsif issue.status_id == 5
|
||||
s = link_to text, issue_path(issue), :class => "text_line_s del_line", :title => title
|
||||
else
|
||||
s = link_to text, issue_path(issue), :class => "c_blue", :title => title
|
||||
end
|
||||
|
|
|
@ -394,7 +394,7 @@ class Mailer < ActionMailer::Base
|
|||
@issue = issue
|
||||
user = User.find_by_mail(recipients)
|
||||
@user = user
|
||||
@token = Token.get_token_from_user(user, 'autologin')
|
||||
# @token = Token.get_token_from_user(user, 'autologin')
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id)
|
||||
|
||||
# edit
|
||||
|
@ -436,15 +436,15 @@ class Mailer < ActionMailer::Base
|
|||
|
||||
user = User.find_by_mail(recipients)
|
||||
@user = user
|
||||
@token = Token.get_token_from_user(user, 'autologin')
|
||||
# @token = Token.get_token_from_user(user, 'autologin')
|
||||
|
||||
|
||||
# edit
|
||||
@issue_author_url = url_for(:controller => 'users', :action => 'show', :id => issue.author_id, :token => @token.value)
|
||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id, :token => @token.value)
|
||||
@user_url = url_for(my_account_url(user,:token => @token.value))
|
||||
@issue_author_url = url_for(:controller => 'users', :action => 'show', :id => issue.author_id)
|
||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id)
|
||||
@user_url = url_for(my_account_url(user))
|
||||
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :anchor => "change-#{journal.id}", :token => @token.value)
|
||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :anchor => "change-#{journal.id}")
|
||||
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] "
|
||||
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
||||
s << issue.subject
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||
<% else %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||
<% else %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||
<% else %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||
<% else %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -16,16 +16,16 @@
|
|||
<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:#666; font-weight:bold; float:left;">[</span>
|
||||
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
|
||||
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_project_notice) %></span>
|
||||
|
||||
<%= link_to truncate(course_new.title.html_safe,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
|
||||
<%= link_to truncate(course_new.title.html_safe,length: 30,omission: '...'), news_url(course_new),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -39,17 +39,17 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<% unless course_news_comment.commented.nil? %>
|
||||
<%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value),
|
||||
<%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to course_news_comment.author, user_activities_url(course_news_comment.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_project_notice_reply) %></span>
|
||||
|
||||
<%= link_to truncate(l(:label_course_notice_point),length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value),
|
||||
<%= link_to truncate(l(:label_course_notice_point),length: 30,omission: '...'), news_url(course_news_comment.commented),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -72,16 +72,16 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(bid.course.name,length: 30,omission: '...'), course_url(bid.course, :token => @token.value),
|
||||
<%= link_to truncate(bid.course.name,length: 30,omission: '...'), course_url(bid.course),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to bid.user, user_activities_url(bid.user,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to bid.user, user_activities_url(bid.user), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_course_homework) %></span>
|
||||
|
||||
<%= link_to truncate(bid.name.html_safe,length: 30,omission: '...'), student_work_index_url(:homework => bid.id,:token => @token.value),
|
||||
<%= link_to truncate(bid.name.html_safe,length: 30,omission: '...'), student_work_index_url(:homework => bid.id),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -105,16 +105,16 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; 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),
|
||||
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; 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",
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_send_course_journals_for_messages) %></span>
|
||||
|
||||
<%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
|
||||
<%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -135,14 +135,14 @@
|
|||
<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:#666; 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),
|
||||
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to course_message.author, user_activities_url(course_message.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_send_course_messages) %></span>
|
||||
<%= link_to truncate(course_message.subject.html_safe,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
||||
<%= link_to truncate(course_message.subject.html_safe,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(course_message.created_on) %></span>
|
||||
|
@ -163,16 +163,16 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
|
||||
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to attachment.author, user_activities_url(attachment.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_course_file_upload) %></span>
|
||||
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -199,14 +199,14 @@
|
|||
<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:#666; font-weight:bold; float:left;">[</span>
|
||||
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
|
||||
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to issue.author, user_activities_url(issue.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_project_issue) %></span>
|
||||
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
|
||||
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue),
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(issue.created_on) %></span>
|
||||
|
@ -217,14 +217,14 @@
|
|||
<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:#666; font-weight:bold; float:left;">[</span>
|
||||
<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value),
|
||||
<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to issues_journal.user, user_activities_url(issues_journal.user), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_project_issue_update) %></span>
|
||||
<%= link_to truncate(issues_journal.issue.subject, length:30,omission:'...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||
<%= link_to truncate(issues_journal.issue.subject, length:30,omission:'...'),issue_url(issues_journal.issue),
|
||||
:style => "color:#2E8DD7;float:left;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;",
|
||||
:onmouseover =>"message_titile_show($(this),event)",
|
||||
:onmouseout => "message_titile_hide($(this))"
|
||||
|
@ -251,16 +251,16 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
|
||||
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to project_message.author, user_activities_url(project_message.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= 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),
|
||||
<%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -283,16 +283,16 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<% unless wikicontent.page.nil? %>
|
||||
<%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project, :token => @token.value),
|
||||
<%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to wikicontent.author, user_activities_url(wikicontent.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to wikicontent.author, user_activities_url(wikicontent.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_wiki_mail_notification) %></span>
|
||||
<% unless wikicontent.page.nil? %>
|
||||
<%= link_to wikicontent.text.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, project_wiki_url(wikicontent.page.wiki,:token => @token.value),
|
||||
<%= link_to wikicontent.text.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, project_wiki_url(wikicontent.page.wiki),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; max-width:400px;height:23px;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
|
@ -314,15 +314,15 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value),
|
||||
<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to project_new.author, user_activities_url(project_new.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_project_mail_notice) %></span>
|
||||
|
||||
<%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new,:token => @token.value),
|
||||
<%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(project_new.created_on) %></span>
|
||||
|
@ -336,16 +336,16 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
<% unless project_news_comment.commented.nil? %>
|
||||
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value),
|
||||
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<% end %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
<%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to project_news_comment.author, user_activities_url(project_news_comment.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:lable_project_mail_notice_reply) %></span>
|
||||
|
||||
<%= link_to truncate(l(:lable_project_notice_point),length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value),
|
||||
<%= link_to truncate(l(:lable_project_notice_point),length: 30,omission: '...'), news_url(project_news_comment.commented),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_date" style="color:#6e6e6e; float:left;display:block; margin-left:40px;"><%= format_time(project_news_comment.created_on) %></span>
|
||||
|
@ -366,16 +366,16 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(project_attachment.project.name,length: 30,omission: '...'), project_url(project_attachment.project, :token => @token.value),
|
||||
<%= link_to truncate(project_attachment.project.name,length: 30,omission: '...'), project_url(project_attachment.project),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to project_attachment.author, user_activities_url(project_attachment.author,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to project_attachment.author, user_activities_url(project_attachment.author), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_project_mail_upload) %></span>
|
||||
|
||||
<%= link_to truncate(project_attachment.filename,length: 30,omission: '...'), project_files_url(project_attachment.project,:token => @token.value),
|
||||
<%= link_to truncate(project_attachment.filename,length: 30,omission: '...'), project_files_url(project_attachment.project),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -398,16 +398,16 @@
|
|||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">[</span>
|
||||
|
||||
<%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project, :token => @token.value),
|
||||
<%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project),
|
||||
:class=> "wmail_column",
|
||||
:style=> " font-weight: bold; display:block; float:left; color:#666;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||
<span class="wmail_b" style="color:#666; font-weight:bold; float:left;">]</span>
|
||||
|
||||
<%= link_to project_journal_message.user, user_activities_url(project_journal_message.user,:token => @token.value), :class => "wmail_name",
|
||||
<%= link_to project_journal_message.user, user_activities_url(project_journal_message.user), :class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_send_course_journals_for_messages) %></span>
|
||||
|
||||
<%= link_to project_journal_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, project_feedback_url(project_journal_message.project,:token => @token.value),
|
||||
<%= link_to project_journal_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe, project_feedback_url(project_journal_message.project),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; max-width:400px; max-height:30px;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -434,12 +434,12 @@
|
|||
<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),
|
||||
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_show_your_message) %></span>
|
||||
|
||||
<%= link_to user_journal_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe,feedback_url(@user,:token => @token.value),
|
||||
<%= link_to user_journal_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe,feedback_url(@user),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; max-width:400px; max-height:30px;font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -466,12 +466,12 @@
|
|||
<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),
|
||||
<%= link_to forum.creator, user_activities_url(forum.creator),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= l(:label_forum_new) %></span>
|
||||
|
||||
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
|
||||
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum),
|
||||
:class => 'wmail_info',
|
||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||
%>
|
||||
|
@ -492,7 +492,7 @@
|
|||
<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),
|
||||
<%= link_to memo.author, user_activities_url(memo.author),
|
||||
:class => "wmail_name",
|
||||
:style => "color:#2E8DD7; 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:#ACAEB1;"><%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %></span>
|
||||
|
@ -516,7 +516,7 @@
|
|||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||
<% else %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
<%= l(:label_course_news) %>
|
||||
<% @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 truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course)%> ]
|
||||
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value) %>
|
||||
<%= link_to course_new.author, user_activities_url(course_new.author) %>
|
||||
<%= l(:label_project_notice) %>
|
||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value) %>
|
||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new) %>
|
||||
<%= format_time(course_new.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -19,12 +19,12 @@
|
|||
<%= l(:label_course_news) %>
|
||||
<% @course_news_comments.each do |course_news_comment|%>
|
||||
▪[ <% unless course_news_comment.commented.nil? %>
|
||||
<%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course, :token => @token.value) %>
|
||||
<%= link_to truncate(course_news_comment.commented.course.name,length: 30,omission: '...'), course_url(course_news_comment.commented.course) %>
|
||||
<% end %>
|
||||
]
|
||||
<%= link_to course_news_comment.author, user_activities_url(course_news_comment.author,:token => @token.value) %>
|
||||
<%= link_to course_news_comment.author, user_activities_url(course_news_comment.author) %>
|
||||
<%= l(:label_project_notice_reply) %>
|
||||
<%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented,:token => @token.value) %>
|
||||
<%= link_to truncate(course_news_comment.comments,length: 30,omission: '...'), news_url(course_news_comment.commented) %>
|
||||
<%= format_time(course_news_comment.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -33,10 +33,10 @@
|
|||
<%= l(:label_homework_overview) %>
|
||||
<% unless @bids.first.nil?%>
|
||||
<% @bids.each do |bid| %>
|
||||
▪[<%= link_to truncate(bid.course.name,length: 30,omission: '...'),course_url(bid.course, :token => @token.value) %>]
|
||||
<%= link_to bid.user, user_activities_url(bid.user,:token => @token.value) %>
|
||||
▪[<%= link_to truncate(bid.course.name,length: 30,omission: '...'),course_url(bid.course) %>]
|
||||
<%= link_to bid.user, user_activities_url(bid.user) %>
|
||||
<%= l(:label_course_homework) %>
|
||||
<%= link_to truncate(bid.name, length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value) %>
|
||||
<%= link_to truncate(bid.name, length: 30,omission: '...'), student_work_index_path(:homework => bid.id) %>
|
||||
<%= format_time(bid.created_at) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -46,10 +46,10 @@
|
|||
<% unless @course_journal_messages.first.nil? %>
|
||||
<%= l(:view_course_journals_for_messages) %>
|
||||
<% @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) %>
|
||||
[ <%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course) %>]
|
||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user) %>
|
||||
<%= l(:label_send_course_journals_for_messages) %>
|
||||
<%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value) %>
|
||||
<%= link_to truncate(course_journal_message.notes.html_safe,length: 30,omission: '...'), course_feedback_url(course_journal_message.course) %>
|
||||
<%= format_time(course_journal_message.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -57,10 +57,10 @@
|
|||
<% unless @course_messages.first.nil? %>
|
||||
<%= l(:view_borad_course) %>
|
||||
<% @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) %>
|
||||
▪[<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course)%>]
|
||||
<%= link_to course_message.author, user_activities_url(course_message.author) %>
|
||||
<%= 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) %>
|
||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id) %>
|
||||
<%= format_time(course_message.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -68,10 +68,10 @@
|
|||
<% unless @attachments.first.nil? %>
|
||||
<%= l(:label_course_mail_files) %>
|
||||
<% @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) %>
|
||||
▪[<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course) %>]
|
||||
<%= link_to attachment.author, user_activities_url(attachment.author) %>
|
||||
<%= l(:label_course_file_upload) %>
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value) %>
|
||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course) %>
|
||||
<%= format_time(attachment.created_on) %>
|
||||
<% end %>
|
||||
<!--课件下载 end-->
|
||||
|
@ -86,10 +86,10 @@
|
|||
<% unless @issues.first.nil? %>
|
||||
<%= l(:label_issue_tracking) %>
|
||||
<% @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) %>
|
||||
▪[<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project) %>]
|
||||
<%= link_to issue.author, user_activities_url(issue.author) %>
|
||||
<%= l(:label_project_issue) %>
|
||||
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value) %>
|
||||
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue) %>
|
||||
<%= format_time(issue.created_on) %>
|
||||
<% end %>
|
||||
<!--问题跟踪 end-->
|
||||
|
@ -99,13 +99,13 @@
|
|||
<% unless @issues_journals.first.nil? %>
|
||||
<%= l(:label_issue_tracking) %>
|
||||
<% @issues_journals.each do |issues_journal| %>
|
||||
▪[<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project, :token => @token.value) %>]
|
||||
<%= link_to issues_journal.user, user_activities_url(issues_journal.user,:token => @token.value) %>
|
||||
▪[<%= link_to truncate(issues_journal.issue.project.name,length: 30,omission: '...'), project_url(issues_journal.issue.project) %>]
|
||||
<%= link_to issues_journal.user, user_activities_url(issues_journal.user) %>
|
||||
<%= l(:label_project_issue_update) %>
|
||||
<% if issues_journal.notes.nil? %>
|
||||
<%= link_to truncate(issues_journal.issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value) %>
|
||||
<%= link_to truncate(issues_journal.issue.subject,length: 30,omission: '...'),issue_url(issue) %>
|
||||
<% else %>
|
||||
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value) %>
|
||||
<%= link_to truncate(issues_journal.notes.html_safe,length: 30,omission: '...'),issue_url(issues_journal.issue) %>
|
||||
<% end %>
|
||||
<%= format_time(issues_journal.created_on) %>
|
||||
<% end %>
|
||||
|
@ -115,10 +115,10 @@
|
|||
<% unless @project_messages.first.nil? %>
|
||||
<%= l(:project_moule_boards_show) %>
|
||||
<% @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, user_activities_url(project_message.author,:token => @token.value) %>
|
||||
▪[<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project) %>]
|
||||
<%= link_to project_message.author, user_activities_url(project_message.author) %>
|
||||
<%= 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) %>
|
||||
<%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id) %>
|
||||
<%= format_time(project_message.created_on) %>
|
||||
<% end %>
|
||||
<!--项目论坛 end-->
|
||||
|
@ -129,13 +129,13 @@
|
|||
<%= l(:label_wiki) %>
|
||||
<% @wiki_contents.each do |wikicontent|%>
|
||||
▪[<% unless wikicontent.page.nil? %>
|
||||
<%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project, :token => @token.value) %>
|
||||
<%= link_to truncate(wikicontent.page.wiki.project.name,length: 30,omission: '...'), project_url(wikicontent.page.wiki.project) %>
|
||||
<% end %>
|
||||
]
|
||||
<%= link_to wikicontent.author, user_activities_url(wikicontent.author,:token => @token.value) %>
|
||||
<%= link_to wikicontent.author, user_activities_url(wikicontent.author) %>
|
||||
<%= l(:label_wiki_mail_notification) %>
|
||||
<% unless wikicontent.page.nil? %>
|
||||
<%= link_to truncate(wikicontent.text.html_safe, length: 30,omission: '...'), project_wiki_url(wikicontent.page.wiki,:token => @token.value) %>
|
||||
<%= link_to truncate(wikicontent.text.html_safe, length: 30,omission: '...'), project_wiki_url(wikicontent.page.wiki) %>
|
||||
<% end %>
|
||||
<%= format_time(wikicontent.updated_on) %>
|
||||
<% end %>
|
||||
|
@ -145,10 +145,10 @@
|
|||
<% unless @project_news.first.nil? %>
|
||||
<%= l(:label_project_news) %>
|
||||
<% @project_news.each do |project_new|%>
|
||||
▪[<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value) %> ]
|
||||
<%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value) %>
|
||||
▪[<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project) %> ]
|
||||
<%= link_to project_new.author, user_activities_url(project_new.author) %>
|
||||
<%= l(:label_project_mail_notice) %>
|
||||
<%= link_to truncate(project_new.title.html_safe,length: 30,omission: '...'), news_url(project_new,:token => @token.value) %>
|
||||
<%= link_to truncate(project_new.title.html_safe,length: 30,omission: '...'), news_url(project_new) %>
|
||||
<%= format_time(project_new.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -158,11 +158,11 @@
|
|||
<%= l(:label_project_news) %>
|
||||
<% @project_news_comments.each do |project_news_comment|%>
|
||||
▪[ <% unless project_news_comment.commented.nil? %>
|
||||
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project, :token => @token.value) %>
|
||||
<%= link_to truncate(project_news_comment.commented.project.name,length: 30,omission: '...'), project_url(project_news_comment.commented.project) %>
|
||||
<% end %>]
|
||||
<%= link_to project_news_comment.author, user_activities_url(project_news_comment.author,:token => @token.value) %>
|
||||
<%= link_to project_news_comment.author, user_activities_url(project_news_comment.author) %>
|
||||
<%= l(:lable_project_mail_notice_reply) %>
|
||||
<%= link_to truncate(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented,:token => @token.value) %>
|
||||
<%= link_to truncate(project_news_comment.comments.html_safe,length: 30,omission: '...'), news_url(project_news_comment.commented) %>
|
||||
<%= format_time(project_news_comment.created_on) %>
|
||||
<% end %>
|
||||
<!-- 项目新闻回复end -->
|
||||
|
@ -172,10 +172,10 @@
|
|||
<% unless @project_attachments.first.nil? %>
|
||||
<%= l(:label_project_mail_attachments) %>
|
||||
<% @project_attachments.each do |project_attachment|%>
|
||||
▪[<%= link_to truncate(project_attachment.project.name,length: 30,omission: '...'), project_url(project_attachment.project, :token => @token.value) %>]
|
||||
<%= link_to project_attachment.author, user_activities_url(project_attachment.author,:token => @token.value) %>
|
||||
▪[<%= link_to truncate(project_attachment.project.name,length: 30,omission: '...'), project_url(project_attachment.project) %>]
|
||||
<%= link_to project_attachment.author, user_activities_url(project_attachment.author) %>
|
||||
<%= l(:label_project_mail_upload) %>
|
||||
<%= link_to truncate(project_attachment.filename,length: 30,omission: '...'),project_files_url(project_attachment.project,:token => @token.value) %>
|
||||
<%= link_to truncate(project_attachment.filename,length: 30,omission: '...'),project_files_url(project_attachment.project) %>
|
||||
<%= format_time(project_attachment.created_on) %>
|
||||
<% end %> <!-- 项目上传资源 end-->
|
||||
<% end %>
|
||||
|
@ -184,10 +184,10 @@
|
|||
<% unless @project_journal_messages.first.nil? %>
|
||||
<%= l(:label_project_mail_feedback) %>
|
||||
<% @project_journal_messages.each do |project_journal_message|%>
|
||||
▪[<%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project, :token => @token.value) %> ]
|
||||
<%= link_to project_journal_message.user, user_activities_url(project_journal_message.user,:token => @token.value) %>
|
||||
▪[<%= link_to truncate(project_journal_message.project.name,length: 30,omission: '...'), project_url(project_journal_message.project) %> ]
|
||||
<%= link_to project_journal_message.user, user_activities_url(project_journal_message.user) %>
|
||||
<%= l(:label_send_course_journals_for_messages) %>
|
||||
<%= link_to truncate(project_journal_message.notes.html_safe,length: 30,omission: '...'), project_feedback_url(project_journal_message.project,:token => @token.value) %>
|
||||
<%= link_to truncate(project_journal_message.notes.html_safe,length: 30,omission: '...'), project_feedback_url(project_journal_message.project) %>
|
||||
<%= format_time(project_journal_message.created_on) %>
|
||||
<% end %>
|
||||
<!--项目留言 end-->
|
||||
|
@ -202,9 +202,9 @@
|
|||
<%= 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)%>
|
||||
▪ <%= link_to user_journal_message.user, user_activities_url(user_journal_message.user)%>
|
||||
<%= l(:label_show_your_message) %>
|
||||
<%= link_to truncate(user_journal_message.notes.html_safe,length: 30,omission: '...'), feedback_url(@user,:token => @token.value) %>
|
||||
<%= link_to truncate(user_journal_message.notes.html_safe,length: 30,omission: '...'), feedback_url(@user) %>
|
||||
<%= format_time(user_journal_message.created_on) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -214,9 +214,9 @@
|
|||
<% unless @forums.first.nil? %>
|
||||
<%= l(:label_user_forum) %>
|
||||
<% @forums.each do |forum|%>
|
||||
▪<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value) %>
|
||||
▪<%= link_to forum.creator, user_activities_url(forum.creator) %>
|
||||
<%= l(:label_forum_new) %>
|
||||
<%= link_to truncate(forum.name.html_safe,length: 30,omission: '...'),forum_url(forum,:token => @token.value) %>
|
||||
<%= link_to truncate(forum.name.html_safe,length: 30,omission: '...'),forum_url(forum) %>
|
||||
<%= format_time(forum.created_at) %>
|
||||
<% end %>
|
||||
<!-- 新建贴吧 end-->
|
||||
|
@ -224,7 +224,7 @@
|
|||
<% unless @memos.first.nil? %>
|
||||
<%= l(:label_user_message_forum) %>
|
||||
<% @memos.each do |memo|%>
|
||||
▪<%= link_to memo.author, user_activities_url(memo.author,:token => @token.value)%>
|
||||
▪<%= link_to memo.author, user_activities_url(memo.author)%>
|
||||
<%= memo.parent_id.nil? ? l(:label_memo_new_from_forum) : l(:label_reply) %>
|
||||
<%= link_to truncate(memo.subject.html_safe,length: 30,omission: '...'),forum_memo_url(memo.forum, (memo.parent_id.nil? ? memo : memo.parent_id))%>
|
||||
<%= format_time(memo.created_at) %>
|
||||
|
@ -238,6 +238,6 @@
|
|||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||
<%= l(mail_option) %>
|
||||
<% else %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<%= link_to l(mail_option), my_change_mail_notification_url(mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="fl"><div class="fb fontGrey3 mr5 fl"><%=@changesets_latest_coimmit.author_email %></div>
|
||||
<span class="fl"><div class="fb fontGrey3 rep_mail_name mr5 fl"><%=@changesets_latest_coimmit.author_email %></div>
|
||||
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:</div>
|
||||
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
||||
</span>
|
||||
|
@ -51,9 +51,8 @@
|
|||
<%= @repository.branches.count %></font> 个分支
|
||||
</span>
|
||||
|
||||
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
|
||||
|
||||
<%=link_to"提交明细", {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font>
|
||||
<span class="fr mr5"><font class="fb ml2 mr2 vl_commit">
|
||||
<%=link_to @changesets_all_count, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev,:page=>1 ,:commit_count =>"#{@changesets_all_count}"} %></font> 提交
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<%= form_for('new_form', :remote => true, :method => :post,:url => add_score_student_work_path(work.id)) do |f|%>
|
||||
<%= form_for('new_form', :remote => true, :method => :post,:url => add_score_student_work_path(work.id),:id=>'add_score_'+work.id.to_s) do |f|%>
|
||||
<li >
|
||||
<span class="tit_fb"> 评价:</span>
|
||||
<%= f.text_area 'user_message', :class => 'hwork_ping_text', :placeholder => l(:text_caracters_maximum,:count=>250),:maxlength => 250 %>
|
||||
<%= f.text_area 'user_message', :class => 'hwork_ping_text', :id => 'score_comment_'+work.id.to_s, :placeholder => l(:text_caracters_maximum,:count=>250),:maxlength => 250 %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<p id="hint_message_<%=work.id %>" style="margin-left: 65px;"></p>
|
||||
<li >
|
||||
<span class="tit_fb mt2"> 评分:</span>
|
||||
<input type="number" name="score" id="score_<%= work.id%>" value="<%= score.nil? ? 60 : score.score%>" min="0" max="100" size="4" data-units="dollars" />
|
||||
|
@ -16,7 +17,19 @@
|
|||
<%= render :partial => 'student_work/student_work_attachment_form', :locals => {:work => work,:score => score} %>
|
||||
</div>
|
||||
<%end%>
|
||||
<a href="javascript:void(0);" class="blue_n_btn fr evaluation_submit" onclick="$(this).parent().parent().submit();$('#about_hwork_<%= work.id%>').html('');">提交</a>
|
||||
<a href="javascript:void(0);" id="work_submit_<%= work.id %>" class="blue_n_btn fr evaluation_submit" onclick="score_submit('<%=work.id %>');">提交</a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<script type="text/javascript">
|
||||
function score_submit(id){
|
||||
if ($.trim($('#score_comment_'+id).val()) == "") {
|
||||
$('#hint_message_'+id).html("为了对其他学生的作品负责,请您务必填写评语");
|
||||
$("#hint_message_"+id).css('color','#ff0000');
|
||||
$("#score_comment_"+id).focus();
|
||||
} else {
|
||||
$("#work_submit_"+id).parent().parent().submit();
|
||||
$('#about_hwork_'+id).html('');
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,9 +1,9 @@
|
|||
<%= form_tag(words_create_reply_path, :remote => true,:id=>"form_#{journal.id}") do %>
|
||||
<%= form_tag(words_create_reply_path, :remote => true) do %>
|
||||
<%= text_area_tag 'user_notes', "", :class => 'w520 h50 mb5',
|
||||
:style => "resize: none;overflow: hidden;",:rows => 4,
|
||||
:placeholder => l(:label_feedback_respond_content)#,
|
||||
|
||||
#:maxlength => 250
|
||||
#:maxlength => 250
|
||||
%>
|
||||
<p nhname="contentmsg"></p>
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
|
||||
|
@ -13,20 +13,6 @@
|
|||
|
||||
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<%= submit_tag l(:button_feedback_respond), :name => nil ,
|
||||
:class => "reply_btn" ,:onclick=>"form_sub_#{ journal.id}($(this),event)"%>
|
||||
:class => "reply_btn"%>
|
||||
<input nhname="cancel_btn" type="button" style="display:none;"/>
|
||||
<% end %>
|
||||
<script>
|
||||
var flag_<%= journal.id %> = false;
|
||||
function form_sub_<%= journal.id%>(dom,event){
|
||||
if(flag_<%= journal.id %> == true){
|
||||
//dom.attr('disabled','disabled');
|
||||
return;
|
||||
}else{
|
||||
//dom.removeAttr('disabled');
|
||||
}
|
||||
flag_<%= journal.id %> = true;
|
||||
$("#form_<%= journal.id%>").submit();
|
||||
event.preventDefault();
|
||||
}
|
||||
</script>
|
||||
<% end %>
|
|
@ -703,6 +703,7 @@ zh:
|
|||
label_search_by_login: 登录名
|
||||
label_search_by_name: 名字
|
||||
label_search_by_email: 邮箱
|
||||
label_search_by_occupation: 单位
|
||||
label_result_plural: 结果
|
||||
label_all_words: 所有单词
|
||||
label_wiki: Wiki
|
||||
|
|
|
@ -1569,6 +1569,7 @@ ActiveRecord::Schema.define(:version => 20151218110033) do
|
|||
end
|
||||
|
||||
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
|
||||
add_index "student_works", ["homework_common_id"], :name => "index"
|
||||
|
||||
create_table "student_works_evaluation_distributions", :force => true do |t|
|
||||
t.integer "student_work_id"
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
namespace :hjq do
|
||||
namespace :news do
|
||||
desc "news order"
|
||||
task :users => :environment do
|
||||
a = []
|
||||
# news = News.where("course_id =?", 122)
|
||||
course.news.each do |new|
|
||||
unless new.comments.blank?
|
||||
latest_comment = new.comments.sort! { |a,b| a.created_on <=> b.created_on}.last
|
||||
end
|
||||
a << latest_comment
|
||||
end
|
||||
comments = a.map(&:commented_id).detect{|a.b| a.created_on <=> b.created_on}
|
||||
# comments = a.sort!{|a.b| a.created_on <=> b.created_on}
|
||||
news = News.where("id in (?)", comments)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -916,4 +916,5 @@ a.resourcesTypeUser {background:url(images/homepage_icon.png) -178px -453px no-r
|
|||
.list_style ul li{list-style-type: disc;margin-left: 20px;}
|
||||
|
||||
/* @功能 定义 */
|
||||
span.at {color:#269ac9;}
|
||||
span.at {color:#269ac9;}
|
||||
.del_line{text-decoration:line-through !important;}
|
|
@ -286,4 +286,5 @@ li.commit .commit-row-info .committed_ago {
|
|||
}
|
||||
.rep_history_grey{
|
||||
color: #7F7F7F;
|
||||
}
|
||||
}
|
||||
.rep_mail_name{max-width: 150px; overflow: hidden; text-overflow: ellipsis;}
|
Loading…
Reference in New Issue