Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
4c71af51f4
|
@ -102,7 +102,14 @@ class AccountController < ApplicationController
|
|||
# User self-registration
|
||||
def register
|
||||
# @root_path="/home/pdl/redmine-2.3.2-0/apache2/"
|
||||
#
|
||||
#
|
||||
@cache_identityy = params[:identity]||"" #身份
|
||||
@cache_no = params[:no]||"" #学号
|
||||
@cache_technical_title = params[:technical_title]||"" #教师职称
|
||||
@cache_province = params[:province]||"" #省份
|
||||
@cache_city = params[:city]||"" #城市
|
||||
@cache_enterprise_name = params[:enterprise_name]||"" #企业
|
||||
|
||||
(redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration]
|
||||
if request.get?
|
||||
session[:auth_source_registration] = nil
|
||||
|
@ -112,8 +119,8 @@ class AccountController < ApplicationController
|
|||
@user = User.new
|
||||
@user.safe_attributes = user_params
|
||||
if params[:identity] == "2" # 2 企业
|
||||
@user.firstname = params[:enterprise_name]
|
||||
@user.lastname = l(:field_enterprise)
|
||||
#@user.firstname = params[:enterprise_name]
|
||||
#@user.lastname = l(:field_enterprise)
|
||||
end
|
||||
@user.admin = false
|
||||
@user.register
|
||||
|
|
|
@ -44,11 +44,11 @@ class FilesController < ApplicationController
|
|||
|
||||
if params[:sort]
|
||||
if params[:sort].include?":"
|
||||
@orderBy = params[:sort].split(":")[0];
|
||||
@orderType = params[:sort].split(":")[1].split(",")[0];
|
||||
@orderBy = params[:sort].split(":")[0]
|
||||
@orderType = params[:sort].split(":")[1].split(",")[0]
|
||||
else
|
||||
@orderBy = params[:sort].split(",")[0];
|
||||
@orderType = "asc";
|
||||
@orderBy = params[:sort].split(",")[0]
|
||||
@orderType = "asc"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#added by baiyu
|
||||
class GitUsageController < ApplicationController
|
||||
layout "project_base"
|
||||
def ch_usage
|
||||
|
||||
end
|
||||
|
|
|
@ -84,7 +84,7 @@ class MemosController < ApplicationController
|
|||
@reply_pages = Paginator.new @reply_count, pre_count, page
|
||||
@replies = @memo.children.
|
||||
includes(:author, :attachments).
|
||||
reorder("#{Memo.table_name}.created_at ASC").
|
||||
reorder("#{Memo.table_name}.created_at DESC").
|
||||
limit(@reply_pages.per_page).
|
||||
offset(@reply_pages.offset).
|
||||
all
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
class NotificationcommentsController < ApplicationController
|
||||
def show
|
||||
|
||||
end
|
||||
# default_search_scope :contestnotifications
|
||||
# model_object Contestnotifications
|
||||
# before_filter :authorize
|
||||
|
@ -20,8 +23,14 @@ class NotificationcommentsController < ApplicationController
|
|||
end
|
||||
|
||||
def destroy
|
||||
@contestnotifications.notificaioncomments.find(params[:notificaioncomment_id]).destroy
|
||||
redirect_to contest_contestnotification_path(@contestnotifications)
|
||||
@contest = Contest.find(params[:contest_id])
|
||||
@contestnotification = Contestnotification.find(params[:contestnotification_id])
|
||||
notificaioncomments = Notificationcomment.find(params[:id])
|
||||
notificaioncomments.destroy if notificaioncomments
|
||||
#@contestnotifications = notificaioncomments.Contestnotification
|
||||
#@contest = @contestnotifications.contest
|
||||
#@contestnotifications.notificaioncomments.find(params[:notificaioncomment_id]).destroy
|
||||
redirect_to contest_contestnotification_path(@contest,@contestnotification)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -156,8 +156,8 @@ class SoftapplicationsController < ApplicationController
|
|||
format.html { redirect_to show_attendingcontest_contest_path(:id => params[:contest_id]), notice: l(:notice_attendingcontest_work_successfully_created) }
|
||||
# format.json { render json: @softapplication, status: :created, location: @softapplication }
|
||||
else
|
||||
format.js { render status: 406 }
|
||||
format.html { render action: "new" }
|
||||
#format.js { render status: 406 }
|
||||
format.html { render action: "contests/show_attendingcontest" }
|
||||
# format.json { render json: @softapplication.errors, status: :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -53,10 +53,13 @@ module MembersHelper
|
|||
|
||||
# 当前申请加入的成员名单
|
||||
def render_principals_for_applied_members(project)
|
||||
scope = Principal.active.sorted.applied_members(project).like(params[:q])
|
||||
scope = project.applied_projects.map(&:user)
|
||||
principal_count = scope.count
|
||||
principal_pages = Redmine::Pagination::Paginator.new principal_count, 10, params['page']
|
||||
principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all
|
||||
offset ||= principal_pages.offset
|
||||
principals = scope[offset, 10]
|
||||
#principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all
|
||||
#principals = ApplicationController.new.paginateHelper scope,10
|
||||
|
||||
s = content_tag('div', principals_check_box_tags_ex('membership[user_ids][]', principals), :id => 'principals')
|
||||
|
||||
|
|
|
@ -385,6 +385,7 @@ module UserScoreHelper
|
|||
def update_score(option_number)
|
||||
option_number.total_score = collaboration(option_number) + influence(option_number) + skill(option_number) + active(option_number)
|
||||
option_number.save
|
||||
option_number.total_score
|
||||
end
|
||||
|
||||
#协同得分
|
||||
|
@ -704,6 +705,19 @@ module UserScoreHelper
|
|||
|
||||
def user_scores(user,type,project=nil)
|
||||
ooption_num = get_option_number(user,type,project)
|
||||
update_memo_number(user,type,project)
|
||||
update_messges_for_issue(user,type,project)
|
||||
update_issues_status(user,type,project)
|
||||
update_replay_for_message(user,type,project)
|
||||
update_replay_for_memo(user,type,project)
|
||||
update_tread(user,type,project)
|
||||
update_praise(user,type,project)
|
||||
update_changeset(user,type,project)
|
||||
update_document(user,type,project)
|
||||
update_attachment(user,type,project)
|
||||
update_issue_done_ratio(user,type,project)
|
||||
update_post_issue(user,type,project)
|
||||
update_score(ooption_num)
|
||||
ooption_num
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,6 +4,7 @@ class Notificationcomment < ActiveRecord::Base
|
|||
include Redmine::SafeAttributes
|
||||
belongs_to :notificationcommented, :polymorphic => true#, :counter_cache => true
|
||||
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
||||
belongs_to :Contestnotification
|
||||
|
||||
validates_presence_of :notificationcommented, :author, :notificationcomments
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class Softapplication < ActiveRecord::Base
|
|||
belongs_to :project
|
||||
has_many :contests, :through => :contesting_softapplications
|
||||
|
||||
validates_length_of :name, :maximum => 125
|
||||
validates_length_of :name, :maximum => 25
|
||||
validates_length_of :application_developers, :maximum => 125
|
||||
validates_length_of :android_min_version_available, :maximum => 125
|
||||
|
||||
|
|
|
@ -174,6 +174,7 @@ class User < Principal
|
|||
validates_format_of :login, :with => /\A[a-z0-9_\-@\.]*\z/i
|
||||
validates_length_of :login, :maximum => LOGIN_LENGTH_LIMIT
|
||||
validates_length_of :firstname, :maximum => 30
|
||||
validates_length_of :lastname, :maximum => 30
|
||||
validates_format_of :mail, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :allow_blank => true
|
||||
validates_length_of :mail, :maximum => MAIL_LENGTH_LIMIT, :allow_nil => true
|
||||
validates_confirmation_of :password, :allow_nil => true
|
||||
|
|
|
@ -193,7 +193,40 @@
|
|||
</script>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
window.onload = function(){
|
||||
var identity = "<%= @cache_identityy %>";
|
||||
var no = "<%= @cache_no %>";
|
||||
var technical_title = "<%= @cache_technical_title %>";
|
||||
var province = "<%= @cache_province %>";
|
||||
var city = "<%= @cache_city %>";
|
||||
var enterprise_name = "<%= @cache_enterprise_name %>";
|
||||
//还原身份
|
||||
if(identity!=null&&identity!=""){
|
||||
$('#userIdentity').children("option[value='"+identity+"']").attr("selected","selected");
|
||||
showtechnical_title(identity, document.getElementById('userTechnical_title'));
|
||||
if(identity=="0"){
|
||||
//还原教师职称
|
||||
$('#userTechnical_title').children("option[value='"+technical_title+"']").attr("selected","selected");
|
||||
}else if(identity=="1"){
|
||||
//还原学号
|
||||
$("input[id='no']").attr("value",no);
|
||||
}
|
||||
}
|
||||
//还原地区
|
||||
if(province!=null&&province!=""){
|
||||
$("#userProvince").children("option[value='"+province+"']").attr("selected","selected");
|
||||
showcity(province, document.getElementById('userCity'));
|
||||
$("select[id='userCity']").children("option[value='"+city+"']").attr("selected","selected");
|
||||
}
|
||||
//还原企业名
|
||||
if(enterprise_name!=null&&enterprise_name!=""){
|
||||
$("input[id='enterprise_name']").attr("value",enterprise_name);
|
||||
}
|
||||
}
|
||||
|
||||
function showtechnical_title(identity, technical_titleField) {
|
||||
var technical_titleOptions = null;
|
||||
switch (identity) {
|
||||
|
||||
case '0' :
|
||||
|
@ -202,7 +235,7 @@
|
|||
$('#name').show()
|
||||
$('#enterprise').hide()
|
||||
$('#gender').show()
|
||||
var technical_titleOptions = new Array(
|
||||
technical_titleOptions = new Array(
|
||||
"<%= l(:label_technicl_title_professor) %>", "<%= l(:label_technicl_title_associate_professor) %>", "<%= l(:label_technicl_title_lecturer) %>", "<%= l(:label_technicl_title_teaching_assistant) %>");
|
||||
break;
|
||||
|
||||
|
@ -234,15 +267,20 @@
|
|||
break;
|
||||
|
||||
}
|
||||
|
||||
technical_titleField.options.length = 0;
|
||||
if(technical_titleOptions == null){
|
||||
return;
|
||||
}
|
||||
for (var i = 0; i < technical_titleOptions.length; i++) {
|
||||
technical_titleField.options[i] = new Option(technical_titleOptions[i], technical_titleOptions[i]);
|
||||
/*
|
||||
/*
|
||||
if (cityField.options[i].value==city)
|
||||
{
|
||||
//alert("here put City ok!");
|
||||
document.oblogform["city"].selectedIndex = i;
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -12,8 +12,16 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<script type='text/javascript'>
|
||||
function CompatibleSend()
|
||||
{
|
||||
var obj=document.getElementById("_file");
|
||||
var file= $(obj).clone();
|
||||
file.click();
|
||||
}
|
||||
</script>
|
||||
<span class="add_attachment">
|
||||
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %>
|
||||
<%= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
|
||||
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
|
||||
<%= file_field_tag 'attachments[dummy][file]',
|
||||
:id => '_file',
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<table width="100%" valign="center">
|
||||
<tr>
|
||||
<td ><span style="margin-left:0px"><%= l(:label_task_plural)%>(<%= @homework_list.count%>)</span>
|
||||
<%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), remote: false, class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(is_teacher && @bid.homeworks.count > 0) %>
|
||||
<%= link_to "作业打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid), class: "button_submit button_submit_font_white", style: "margin: 5px 10px;line-height: 20px;height: 20px;display: inline-block;" if(is_teacher && @bid.homeworks.count > 0) %>
|
||||
</td>
|
||||
<td align="right">
|
||||
<div class="project-search">
|
||||
|
@ -106,7 +106,7 @@
|
|||
<td>
|
||||
<strong>提交文件:
|
||||
<% if is_evaluation || is_teacher%>
|
||||
<%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework, :remote => true%>
|
||||
<%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
|
||||
<% else %>
|
||||
<span class="required">未开启互评功能作业不允许下载</span>
|
||||
<% end %>
|
||||
|
|
|
@ -69,7 +69,21 @@
|
|||
<td>
|
||||
<table width="580px" border="0">
|
||||
<tr>
|
||||
<td colspan="2" valign="top"><strong><%= link_to_user(notificationcomment.author) if notificationcomment.respond_to?(:author) %> </strong><span class="font_lighter"><%= l(:label_project_newadd) %></span><%= l(:label_comment_plural) %></td>
|
||||
<td colspan="2" valign="top">
|
||||
<strong>
|
||||
<%= link_to_user(notificationcomment.author) if notificationcomment.respond_to?(:author) %>
|
||||
</strong>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_project_newadd) %>
|
||||
</span>
|
||||
<%= l(:label_comment_plural) %>
|
||||
</td>
|
||||
<td>
|
||||
<% if notificationcomment.author==User.current|| User.current.admin? %>
|
||||
<%= link_to(l(:label_bid_respond_delete), contest_contestnotification_notificationcomment_path(@contest, @contestnotification,notificationcomment),
|
||||
:method => :delete,:confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580px" >
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="frame-wiki">
|
||||
|
||||
|
||||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:edit_documents, @project) %>
|
||||
<%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %>
|
||||
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %>
|
||||
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
|
||||
<!-- <%= sort_header_tag('description', :caption => l(:field_description)) %> -->
|
||||
<!-- <%#= sort_header_tag('description', :caption => l(:field_description)) %> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<%= sort_header_tag('field_file_dense', :caption => l(:field_file_dense), :default_order => 'desc', :scope => "col", :id => "vzebra-field_file_dense") %>
|
||||
<%= sort_header_tag('downloads', :caption => l(:field_downloads), :default_order => 'desc', :scope => "col", :id => "vzebra-action") %>
|
||||
<%= sort_header_tag('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
|
||||
<!-- <%= sort_header_tag('description', :caption => l(:field_description)) %> -->
|
||||
<!-- <%#= sort_header_tag('description', :caption => l(:field_description)) %> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -104,6 +104,8 @@
|
|||
<div class="memo-content">
|
||||
<%= textilizable(@topic, :content) %>
|
||||
<%= link_to_attachments @topic, :author => false %>
|
||||
<%# options = {:author => true, :deletable => @topic.author.eql?(User.current)} %>
|
||||
<%#= render :partial => 'attachments/app_link', :locals => {:attachments => @topi.attachments, :options => options} %>
|
||||
</div>
|
||||
<div class="memo-timestamp">
|
||||
<div style="float: left"><%= authoring @topic.created_on, @topic.author %></div>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
</span>
|
||||
|
||||
<span id='enterprise' style='display:none'>
|
||||
<p style="width:400px;padding-left: 26px;">企业名<%= text_field_tag :enterprise_name, @user.firstname %>
|
||||
<p style="width:400px;padding-left: 26px;"><%= l(:label_company_name)%><%= text_field_tag :enterprise_name, @user.firstname %>
|
||||
</p>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -5,7 +5,12 @@ background-color:gray;
|
|||
border:none
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {
|
||||
document.getElementById("googleinputcache").remove();
|
||||
document.getElementById("repository_identifier").setAttribute("type","text");
|
||||
}
|
||||
</script>
|
||||
<%= error_messages_for 'repository' %>
|
||||
|
||||
<div class="box tabular">
|
||||
|
@ -22,7 +27,10 @@ border:none
|
|||
<% end %>
|
||||
</p>
|
||||
<p><%= f.check_box :is_default, :label => :field_repository_is_default %></p>
|
||||
<p><%= f.text_field :identifier, :required=>true, :disabled => @repository.identifier_frozen?, :label => l(:label_repository_name)%>
|
||||
|
||||
<p>
|
||||
<input id="googleinputcache" size="30" type="text">
|
||||
<%= f.text_field :identifier,:required=>true,:type=>"hidden", :disabled => @repository.identifier_frozen?, :label => l(:label_repository_name)%>
|
||||
<% unless @repository.identifier_frozen? %>
|
||||
<em class="info"><%= l(:text_length_between, :min => 1, :max => Repository::IDENTIFIER_MAX_LENGTH) %>
|
||||
<%= l(:text_repository_identifier_info).html_safe %></em>
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
<h3><%= l(:label_repository_new_repos) %></h3>
|
||||
<%= labelled_form_for :repository, @repository, :url =>project_repositories_path(@project),:html => {:id => 'repository-form'} do |f| %>
|
||||
<%= render :partial => 'form_create', :locals => {:f => f} %>
|
||||
|
||||
|
||||
<% end %>
|
|
@ -113,7 +113,7 @@
|
|||
<%= render :partial => 'attachments/form' %>
|
||||
</p>
|
||||
<p style="font-size: 10px">1、<%=l(:label_upload_softapplication_packets_mustpacketed)%><br>2、<%=l(:label_upload_softapplication_photo_condition)%></p>
|
||||
<p style="font-size: 10px; color: red"><%=l(:label_updated_caution)%></p>
|
||||
<!-- p style="font-size: 10px; color: red"><%#=l(:label_updated_caution)%></p-->
|
||||
|
||||
</fieldset>
|
||||
</fieldset></br>
|
||||
|
|
|
@ -43,289 +43,295 @@
|
|||
<% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %>
|
||||
<% act = e.act %>
|
||||
<% unless act.nil? %>
|
||||
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
||||
<tr>
|
||||
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
|
||||
<td>
|
||||
<table width="580" border="0" class="info-break">
|
||||
<% case e.act_type %>
|
||||
<% when 'JournalsForMessage' %>
|
||||
<% if User.current.login == e.user.try(:login) %>
|
||||
<%# if e.user_id == act.jour.id %>
|
||||
<% if e.act_type == 'JournalsForMessage' || e.act_type == 'Bid' || e.act_type == 'Journal'|| e.act_type == 'Changeset' || e.act_type == 'Message' || e.act_type == 'Principal' || e.act_type == 'News' || e.act_type == 'Issue' || e.act_type == 'Contest'%>
|
||||
<table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %>
|
||||
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
||||
</td>
|
||||
</tr>
|
||||
<%# else %>
|
||||
<!-- <tr><td colspan="2" valign="top" class="font_lighter"><strong><%#= link_to("#{e.user.name}", user_path(e.user_id)) %> 给 <%#= link_to("#{act.at_user.name if act.at_user}", user_path(act.jour.id)) %> 留言了</strong> </td></tr> -->
|
||||
<%# end %>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %><%=
|
||||
link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= textilizable act.notes %> </p>
|
||||
<td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
|
||||
<td>
|
||||
<table width="580" border="0" class="info-break">
|
||||
<% case e.act_type %>
|
||||
<% when 'JournalsForMessage' %>
|
||||
<% if User.current.login == e.user.try(:login) %>
|
||||
<%# if e.user_id == act.jour.id %>
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %>
|
||||
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
||||
</td>
|
||||
</tr>
|
||||
<%# else %>
|
||||
<!-- <tr><td colspan="2" valign="top" class="font_lighter"><strong><%#= link_to("#{e.user.name}", user_path(e.user_id)) %> 给 <%#= link_to("#{act.at_user.name if act.at_user}", user_path(act.jour.id)) %> 留言了</strong> </td></tr> -->
|
||||
<%# end %>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_have_feedback) %><%=
|
||||
link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= textilizable act.notes %> </p>
|
||||
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %>
|
||||
</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"><span><%= link_to(l(:label_goto), user_newfeedback_user_path(e.user_id)) %>
|
||||
</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Bid' %>
|
||||
<tr>
|
||||
<% if act.reward_type == 3 && @show_course == 1%>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
</tr>
|
||||
<% when 'Bid' %>
|
||||
<tr>
|
||||
<% if act.reward_type == 3 && @show_course == 1%>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
</td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= act.description.html_safe %> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span><%= link_to l(:label_find_all_comments), respond_path(e.act_id) %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.commit) %></a>
|
||||
</div>
|
||||
</td>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong><span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
</tr>
|
||||
<% when 'Journal' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<% if act.notes.nil? %>
|
||||
<% desStr = '' %>
|
||||
<% else %>
|
||||
<% desStr=act.notes.html_safe %>
|
||||
<% end %>
|
||||
<td colspan="2" width="580"><p class="font_description"> <%= desStr %> </p>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
</td>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= act.description.html_safe %> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span><%= link_to l(:label_find_all_comments), respond_path(e.act_id) %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.commit) %></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Journal' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier)) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<% if act.notes.nil? %>
|
||||
<% desStr = '' %>
|
||||
<% else %>
|
||||
<% desStr=act.notes.html_safe %>
|
||||
<% end %>
|
||||
<td colspan="2" width="580"><p class="font_description"> <%= desStr %> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Changeset' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= act.long_comments.html_safe %> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= format_time(e.act.committed_on) %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span><%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.count) %></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Message' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= h act.content.truncate(240, omission: '...') %> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Principal' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580"><p class="font_description"></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'News' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= act.description.html_safe %> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span><%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.comments_count) %></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Issue' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong>
|
||||
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
||||
</strong>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_i_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong>
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
</strong>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<div class="issue-list-description">
|
||||
<div class="wiki">
|
||||
<%= textilizable act, :description %>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <p class="font_description"> <%#= textilizable(act.description) %> </p> -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span><%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.journals.count) %></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Contest' %>
|
||||
<tr>
|
||||
<% if e.user == User.current && @show_contest == 1%>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580"><p class="font_description"> <%= h act.description %> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
</tr>
|
||||
<% else %>
|
||||
<% f=1 %>
|
||||
<% end %><!-- < % #case end %> -->
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</tr>
|
||||
<% when 'Changeset' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= act.long_comments.html_safe %> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= format_time(e.act.committed_on) %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span><%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.count) %></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Message' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= h act.content.truncate(240, omission: '...') %> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Principal' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_user) %></span>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580"><p class="font_description"></p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'News' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580">
|
||||
<p class="font_description"> <%= act.description.html_safe %> </p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span><%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.comments_count) %></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Issue' %>
|
||||
<tr>
|
||||
<% if e.user == User.current %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong>
|
||||
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
|
||||
</strong>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_i_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong>
|
||||
<%= link_to(h(e.user), user_path(e.user_id)) %>
|
||||
</strong>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_new_activity) %>
|
||||
</span>
|
||||
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
|
||||
<!--
|
||||
<div class="issue-list-description">
|
||||
<div class="wiki">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<%= textilizable act, :description %>
|
||||
<!-- <p class="font_description"> <%#= textilizable(act.description) %> </p> -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
<div style="display: inline-block; float: right; margin-top: 0px">
|
||||
<span><%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %></span><a class="font_lighter"><%= l(:label_comments_count, :count => e.act.journals.count) %></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<% when 'Contest' %>
|
||||
<tr>
|
||||
<% if e.user == User.current && @show_contest == 1%>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_i_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
||||
</td>
|
||||
<% else %>
|
||||
<td colspan="2" valign="top">
|
||||
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong> <span class="font_lighter"><%= l(:label_new_activity) %></span> <%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" width="580"><p class="font_description"> <%= h act.description %> </p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
|
||||
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
|
||||
</div>
|
||||
</tr>
|
||||
<% else %>
|
||||
<%# f=1 %>
|
||||
<% end %><!-- < % #case end %> -->
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<% end %>
|
||||
<% end %><!-- < % #unless act.nil? end %> -->
|
||||
|
||||
<% end %><!-- < % #@activity.each do |e| end%> -->
|
||||
|
|
|
@ -169,13 +169,15 @@
|
|||
(<%= link_to "#{files_count}份", course_files_path(course) %>资料)
|
||||
</div>
|
||||
|
||||
<div class='join_course_link'>
|
||||
<% if !course_endTime_timeout?(course) %>
|
||||
<!--
|
||||
<div class='join_course_link'>
|
||||
<%# if !course_endTime_timeout?(course) %>
|
||||
<div>
|
||||
<%= join_in_course(course, User.current) %>
|
||||
<%#= join_in_course(course, User.current) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%# end %>
|
||||
</div>
|
||||
-->
|
||||
</li>
|
||||
<%end%>
|
||||
<% end; reset_cycle %>
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
<%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25,
|
||||
:class => 'wiki-edit', :accesskey => accesskey(:edit) %>
|
||||
|
||||
<!--p style="max-width:680px"><input id="editor02" required="true" /><%#= f.text_area :comments, :required => true, :id => 'editor02' %></p>
|
||||
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script-->
|
||||
|
||||
<% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %>
|
||||
<%= fields_for @page do |fp| %>
|
||||
<p>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<%= wiki_page_breadcrumb(@page) %>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
$(document).ready(function($) {
|
||||
var label=$("#wiki_page_redirect_existing_links").prev().prev();
|
||||
label.css("margin-left","-165px");
|
||||
});
|
||||
</script>
|
||||
<h3><%= h @original_title %></h3>
|
||||
|
||||
<%= error_messages_for 'page' %>
|
||||
|
@ -9,7 +14,7 @@
|
|||
:html => { :method => :post } do |f| %>
|
||||
<div class="box tabular">
|
||||
<p><%= f.text_field :title, :required => true, :size => 100 %></p>
|
||||
<p><%= f.check_box :redirect_existing_links %></p>
|
||||
<p><%= f.check_box :redirect_existing_links %></p>
|
||||
<p><%= f.select :parent_id,
|
||||
content_tag('option', '', :value => '') +
|
||||
wiki_page_options_for_select(
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -630,7 +630,7 @@ zh:
|
|||
#by huang # modified by bai
|
||||
label_college: 高校进入
|
||||
label_enter_college: 进入高校
|
||||
label_enterprise: 企业进入
|
||||
#label_enterprise: 企业进入
|
||||
lable_enter_enterprise: 进入企业
|
||||
label_term: 开课学期
|
||||
label_spring: 春季学期
|
||||
|
@ -1975,7 +1975,7 @@ zh:
|
|||
label_upload_softapplication_packets: 上传应用软件包
|
||||
label_upload_softapplication_photo: 上传产品截图
|
||||
label_upload_softapplication_packets_mustpacketed: 作品相关代码及相关说明文件必须打包后以压缩包的形式上传,便于上传和下载 ;
|
||||
label_upload_softapplication_photo_condition: 作品截图需上传0~4张;格式为gif/jpg/png, 每张小于5M
|
||||
label_upload_softapplication_photo_condition: 作品截图最好0~4张(多余图片不会再展示页面上显示);格式为gif/jpg/png, 每张小于5M
|
||||
label_updated_caution: 注意:若编辑参赛作品,则之前上传的软件包和截图都将被删除,请重新上传!
|
||||
label_softapplication_name: 应用名称
|
||||
label_work_name: 作品名称
|
||||
|
@ -2016,6 +2016,7 @@ zh:
|
|||
label_contest_work_list: 参赛作品列表
|
||||
label_attending_contest: 我要参赛
|
||||
label_contest_notification: 竞赛通知
|
||||
label_company_name: 企业名
|
||||
|
||||
label_coursefile_sharingarea: 课程资源共享区
|
||||
label_sort_by_activity: 按动态数排序
|
||||
|
|
|
@ -83,6 +83,10 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
#resources :notificationcomments do
|
||||
#
|
||||
#end
|
||||
|
||||
#resources :contestnotifications, :only => [:index, :show, :edit, :update, :destroy]
|
||||
# match '/contestnotifications/:id/notificationcomments', :to => 'notificationcomments#create', :via => :post
|
||||
# match '/contestnotifications/:id/notificationcomments/:notificationcomment_id', :to => 'notificationcomments#destroy', :via => :delete
|
||||
|
@ -91,7 +95,9 @@ RedmineApp::Application.routes.draw do
|
|||
resources :contests, only: [:index] do
|
||||
resources :contestnotifications do
|
||||
# get 'preview', on: :collection
|
||||
resources :notificationcomments
|
||||
resources :notificationcomments do
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
collection do
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# -*coding:utf-8 -*-
|
||||
class ChangeBoardsName < ActiveRecord::Migration
|
||||
def up
|
||||
boards = Board.where("project_id <> -1 and name like '%课程讨论区%'")
|
||||
boards.each do |board|
|
||||
board.name = "项目讨论区"
|
||||
board.description = "项目讨论区"
|
||||
board.save(:validate => false)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
boards = Board.where("project_id <> -1 and name like '%项目讨论区%'")
|
||||
boards.each do |board|
|
||||
board.name = " 课程讨论区"
|
||||
board.description = " 课程讨论区"
|
||||
board.save(:validate => false)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20140730024419) do
|
||||
ActiveRecord::Schema.define(:version => 20140801034242) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
Loading…
Reference in New Issue