This commit is contained in:
z9hang 2014-08-07 11:36:08 +08:00
commit 96fa28f70d
21 changed files with 373 additions and 303 deletions

View File

@ -44,11 +44,11 @@ class FilesController < ApplicationController
if params[:sort] if params[:sort]
if params[:sort].include?":" if params[:sort].include?":"
@orderBy = params[:sort].split(":")[0]; @orderBy = params[:sort].split(":")[0]
@orderType = params[:sort].split(":")[1].split(",")[0]; @orderType = params[:sort].split(":")[1].split(",")[0]
else else
@orderBy = params[:sort].split(",")[0]; @orderBy = params[:sort].split(",")[0]
@orderType = "asc"; @orderType = "asc"
end end
end end

View File

@ -1,4 +1,7 @@
class NotificationcommentsController < ApplicationController class NotificationcommentsController < ApplicationController
def show
end
# default_search_scope :contestnotifications # default_search_scope :contestnotifications
# model_object Contestnotifications # model_object Contestnotifications
# before_filter :authorize # before_filter :authorize
@ -20,8 +23,14 @@ class NotificationcommentsController < ApplicationController
end end
def destroy def destroy
@contestnotifications.notificaioncomments.find(params[:notificaioncomment_id]).destroy @contest = Contest.find(params[:contest_id])
redirect_to contest_contestnotification_path(@contestnotifications) @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
end end

View File

@ -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.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 } # format.json { render json: @softapplication, status: :created, location: @softapplication }
else else
format.js { render status: 406 } #format.js { render status: 406 }
format.html { render action: "new" } format.html { render action: "contests/show_attendingcontest" }
# format.json { render json: @softapplication.errors, status: :unprocessable_entity } # format.json { render json: @softapplication.errors, status: :unprocessable_entity }
end end
end end

View File

@ -53,10 +53,13 @@ module MembersHelper
# 当前申请加入的成员名单 # 当前申请加入的成员名单
def render_principals_for_applied_members(project) 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_count = scope.count
principal_pages = Redmine::Pagination::Paginator.new principal_count, 10, params['page'] 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') s = content_tag('div', principals_check_box_tags_ex('membership[user_ids][]', principals), :id => 'principals')

View File

@ -4,6 +4,7 @@ class Notificationcomment < ActiveRecord::Base
include Redmine::SafeAttributes include Redmine::SafeAttributes
belongs_to :notificationcommented, :polymorphic => true#, :counter_cache => true belongs_to :notificationcommented, :polymorphic => true#, :counter_cache => true
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
belongs_to :Contestnotification
validates_presence_of :notificationcommented, :author, :notificationcomments validates_presence_of :notificationcommented, :author, :notificationcomments

View File

@ -11,7 +11,7 @@ class Softapplication < ActiveRecord::Base
belongs_to :project belongs_to :project
has_many :contests, :through => :contesting_softapplications 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 :application_developers, :maximum => 125
validates_length_of :android_min_version_available, :maximum => 125 validates_length_of :android_min_version_available, :maximum => 125

View File

@ -8,7 +8,7 @@
<table width="100%" valign="center"> <table width="100%" valign="center">
<tr> <tr>
<td ><span style="margin-left:0px"><%= l(:label_task_plural)%>(<%= @homework_list.count%>)</span> <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>
<td align="right"> <td align="right">
<div class="project-search"> <div class="project-search">
@ -106,7 +106,7 @@
<td> <td>
<strong>提交文件:&nbsp; <strong>提交文件:&nbsp;
<% if is_evaluation || is_teacher%> <% 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 %> <% else %>
<span class="required">未开启互评功能作业不允许下载</span> <span class="required">未开启互评功能作业不允许下载</span>
<% end %> <% end %>

View File

@ -69,7 +69,21 @@
<td> <td>
<table width="580px" border="0"> <table width="580px" border="0">
<tr> <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>
<tr> <tr>
<td colspan="2" width="580px" > <td colspan="2" width="580px" >

View File

@ -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('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('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('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
<!-- <%= sort_header_tag('description', :caption => l(:field_description)) %> --> <!-- <%#= sort_header_tag('description', :caption => l(:field_description)) %> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -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('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('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('operation', :caption => "", :scope => "col", :id => "vzebra-children") %>
<!-- <%= sort_header_tag('description', :caption => l(:field_description)) %> --> <!-- <%#= sort_header_tag('description', :caption => l(:field_description)) %> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -104,6 +104,8 @@
<div class="memo-content"> <div class="memo-content">
<%= textilizable(@topic, :content) %> <%= textilizable(@topic, :content) %>
<%= link_to_attachments @topic, :author => false %> <%= 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>
<div class="memo-timestamp"> <div class="memo-timestamp">
<div style="float: left"><%= authoring @topic.created_on, @topic.author %></div> <div style="float: left"><%= authoring @topic.created_on, @topic.author %></div>

View File

@ -82,7 +82,7 @@
</span> </span>
<span id='enterprise' style='display:none'> <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> </p>
</span> </span>

View File

@ -113,7 +113,7 @@
<%= render :partial => 'attachments/form' %> <%= render :partial => 'attachments/form' %>
</p> </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">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>
</fieldset></br> </fieldset></br>

View File

@ -43,289 +43,295 @@
<% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %> <% (Rails.logger.error "[Error] =========================================================> NameError: uninitialized constant " + e.act_type.to_s; next;) if e.act_type.safe_constantize.nil? %>
<% act = e.act %> <% act = e.act %>
<% unless act.nil? %> <% 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;"> <% 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'%>
<tr> <table width="660" border="0" align="left" style="border-bottom: 1px dashed rgb(204, 204, 204); margin-bottom: 10px;font-size:14px;">
<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> <tr>
<td colspan="2" valign="top"> <td colspan="2" valign="top" width="50"><%= image_tag(url_to_avatar(e.user), :class => "avatar") %></td>
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_have_feedback) %> <td>
<%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span> <table width="580" border="0" class="info-break">
</td> <% case e.act_type %>
</tr> <% when 'JournalsForMessage' %>
<%# else %> <% if User.current.login == e.user.try(:login) %>
<!-- <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>&nbsp;</td></tr> --> <%# if e.user_id == act.jour.id %>
<%# end %> <tr>
<% else %> <td colspan="2" valign="top">
<tr> <strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_have_feedback) %>
<td colspan="2" valign="top"> <%= link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span>
<strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_have_feedback) %><%= </td>
link_to("#{e.act.user.name}", user_path(e.act.user.id)) %><%= l(:label_of_feedback) + l(:label_layouts_feedback) %></span> </tr>
</td> <%# else %>
</tr> <!-- <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>&nbsp;</td></tr> -->
<% end %> <%# end %>
<tr> <% else %>
<td colspan="2" width="580"> <tr>
<p class="font_description"> <%= textilizable act.notes %> </p> <td colspan="2" valign="top">
<strong><%= link_to("#{e.user.name}", user_path(e.user_id)) %></strong>&nbsp;<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)) %> <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> </span></div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"> <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> <span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
</div> </div>
<div style="display: inline-block; float: right; margin-top: 0px"></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) %>
</td> </td>
<% else %> </tr>
<td colspan="2" valign="top"> <% when 'Bid' %>
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp; <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> <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>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp; <%= 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>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp; <%= 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> </td>
<% end %> </tr>
<% else %> <% when 'Journal' %>
<% if e.user == User.current %> <tr>
<td colspan="2" valign="top"> <% if e.user == User.current %>
<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 colspan="2" valign="top">
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= 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>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= 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> </td>
<% else %> </tr>
<td colspan="2" valign="top"> <tr>
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp; <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> <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> </td>
<% end %> </tr>
<% end %> <% when 'Changeset' %>
</tr> <tr>
<tr> <% if e.user == User.current %>
<td colspan="2" width="580"> <td colspan="2" valign="top">
<p class="font_description"> <%= act.description.html_safe %> </p></td> <strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= 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>
</tr> </td>
<tr> <% else %>
<td> <td colspan="2" valign="top">
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"> <strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= 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 class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span> </td>
</div> <% end %>
<div style="display: inline-block; float: right; margin-top: 0px"> </tr>
<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> <tr>
</div> <td colspan="2" width="580">
</td> <p class="font_description"> <%= act.long_comments.html_safe %> </p></td>
</tr> </tr>
<% when 'Journal' %> <tr>
<tr> <td>
<% if e.user == User.current %> <div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
<td colspan="2" valign="top"> <span class="font_lighter"> <%= format_time(e.act.committed_on) %></span>
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= 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}"} %> </div>
</td> <div style="display: inline-block; float: right; margin-top: 0px">
<% else %> <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>
<td colspan="2" valign="top"> </div>
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= 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>
</td> </tr>
<% end %> <% when 'Message' %>
</tr> <tr>
<tr> <% if e.user == User.current %>
<% if act.notes.nil? %> <td colspan="2" valign="top">
<% desStr = '' %> <strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= 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}"}) %>
<% else %> </td>
<% desStr=act.notes.html_safe %> <% else %>
<% end %> <td colspan="2" valign="top">
<td colspan="2" width="580"><p class="font_description"> <%= desStr %> </p> <strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= 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> </td>
</tr> <% end %>
<tr> </tr>
<td> <tr>
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"> <td colspan="2" width="580">
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span> <p class="font_description"> <%= h act.content.truncate(240, omission: '...') %> </p>
</div> </td>
<div style="display: inline-block; float: right; margin-top: 0px"></div> </tr>
</td> <tr>
</tr> <td>
<% when 'Changeset' %> <div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
<tr> <span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
<% if e.user == User.current %> </div>
<td colspan="2" valign="top"> <div style="display: inline-block; float: right; margin-top: 0px"></div>
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= 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>
</td> </tr>
<% else %> <% when 'Principal' %>
<td colspan="2" valign="top"> <tr>
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> <% if e.user == User.current %>
</td> <td colspan="2" valign="top">
<% end %> <strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_user) %></span>
</tr> </td>
<tr> <% else %>
<td colspan="2" width="580"> <td colspan="2" valign="top">
<p class="font_description"> <%= act.long_comments.html_safe %> </p></td> <strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_user) %></span>
</tr> </td>
<tr> <% end %>
<td> </tr>
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"> <tr>
<span class="font_lighter"> <%= format_time(e.act.committed_on) %></span> <td colspan="2" width="580"><p class="font_description"></p></td>
</div> </tr>
<div style="display: inline-block; float: right; margin-top: 0px"> <tr>
<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> <td>
</div> <div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
</td> <span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
</tr> </div>
<% when 'Message' %> <div style="display: inline-block; float: right; margin-top: 0px"></div>
<tr> </td>
<% if e.user == User.current %> </tr>
<td colspan="2" valign="top"> <% when 'News' %>
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= 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}"}) %> <tr>
</td> <% if e.user == User.current %>
<% else %> <td colspan="2" valign="top">
<td colspan="2" valign="top"> <strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= 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>
</td> <% else %>
<% end %> <td colspan="2" valign="top">
</tr> <strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>
<tr> </td>
<td colspan="2" width="580"> <% end %>
<p class="font_description"> <%= h act.content.truncate(240, omission: '...') %> </p> </tr>
</td> <tr>
</tr> <td colspan="2" width="580">
<tr> <p class="font_description"> <%= act.description.html_safe %> </p></td>
<td> </tr>
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"> <tr>
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span> <td>
</div> <div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
<div style="display: inline-block; float: right; margin-top: 0px"></div> <span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
</td> </div>
</tr> <div style="display: inline-block; float: right; margin-top: 0px">
<% when 'Principal' %> <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>
<tr> </div>
<% if e.user == User.current %> </td>
<td colspan="2" valign="top"> </tr>
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_user) %></span> <% when 'Issue' %>
</td> <tr>
<% else %> <% if e.user == User.current %>
<td colspan="2" valign="top"> <td colspan="2" valign="top">
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_user) %></span> <strong>
</td> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %>
<% end %> </strong>&nbsp;
</tr> <span class="font_lighter">
<tr> <%= l(:label_i_new_activity) %>
<td colspan="2" width="580"><p class="font_description"></p></td> </span>&nbsp;
</tr> <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
<tr> </td>
<td> <% else %>
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"> <td colspan="2" valign="top">
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span> <strong>
</div> <%= link_to(h(e.user), user_path(e.user_id)) %>
<div style="display: inline-block; float: right; margin-top: 0px"></div> </strong>&nbsp;
</td> <span class="font_lighter">
</tr> <%= l(:label_new_activity) %>
<% when 'News' %> </span>&nbsp;
<tr> <%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>
<% if e.user == User.current %> </td>
<td colspan="2" valign="top"> <% end %>
<strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> </tr>
</td> <tr>
<% else %> <td colspan="2" width="580" style="WORD-BREAK: break-all; WORD-WRAP: break-word">
<td colspan="2" valign="top"> <!--
<strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> <div class="issue-list-description">
</td> <div class="wiki">
<% end %>
</tr> </div>
<tr> </div>
<td colspan="2" width="580"> -->
<p class="font_description"> <%= act.description.html_safe %> </p></td> <%= textilizable act, :description %>
</tr> <!-- <p class="font_description"> <%#= textilizable(act.description) %> </p> -->
<tr> </td>
<td> </tr>
<div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a"> <tr>
<span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span> <td>
</div> <div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
<div style="display: inline-block; float: right; margin-top: 0px"> <span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
<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>
</div> <div style="display: inline-block; float: right; margin-top: 0px">
</td> <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>
</tr> </div>
<% when 'Issue' %> </td>
<tr> </tr>
<% if e.user == User.current %> <% when 'Contest' %>
<td colspan="2" valign="top"> <tr>
<strong> <% if e.user == User.current && @show_contest == 1%>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <td colspan="2" valign="top">
</strong>&nbsp; <strong><%= link_to("#{l(:label_i)}", user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
<span class="font_lighter"> </td>
<%= l(:label_i_new_activity) %> <% else %>
</span>&nbsp; <td colspan="2" valign="top">
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> <strong><%= link_to(h(e.user), user_path(e.user_id)) %></strong>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= link_to format_activity_title("#{l(:label_contest)}: #{act.name}"), {:controller => 'contests', :action => 'show_contest', :id => act.id} %>
</td> </td>
<% else %> <% end %>
<td colspan="2" valign="top"> </tr>
<strong> <tr>
<%= link_to(h(e.user), user_path(e.user_id)) %> <td colspan="2" width="580"><p class="font_description"> <%= h act.description %> </p>
</strong>&nbsp; </td>
<span class="font_lighter"> </tr>
<%= l(:label_new_activity) %> <tr>
</span>&nbsp; <td>
<%= link_to format_activity_title("#{act.source_from} (#{act.status}): #{act.tracker.name} #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> <div style="display: inline-block; float: left; margin-top: 0px" width="200" align="right" class="a">
</td> <span class="font_lighter"> <%= (l(:label_update_time).to_s << ':' << format_time(e.act.created_on)).to_s %></span>
<% end %> </div>
</tr> </tr>
<tr> <% else %>
<td colspan="2" width="580"> <%# f=1 %>
<div class="issue-list-description"> <% end %><!-- < % #case end %> -->
<div class="wiki"> </table>
<%= textilizable act, :description %> </td>
</div> </tr>
</div>
<!-- <p class="font_description"> <%#= textilizable(act.description) %> </p> --> </table>
</td> <% end %>
</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>&nbsp;<span class="font_lighter"><%= l(:label_i_new_activity) %></span>&nbsp;<%= 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>&nbsp;<span class="font_lighter"><%= l(:label_new_activity) %></span>&nbsp;<%= 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 %><!-- < % #unless act.nil? end %> --> <% end %><!-- < % #unless act.nil? end %> -->
<% end %><!-- < % #@activity.each do |e| end%> --> <% end %><!-- < % #@activity.each do |e| end%> -->

View File

@ -169,13 +169,15 @@
(<%= link_to "#{files_count}份", course_files_path(course) %>资料) (<%= link_to "#{files_count}份", course_files_path(course) %>资料)
</div> </div>
<div class='join_course_link'> <!--
<% if !course_endTime_timeout?(course) %> <div class='join_course_link'>
<%# if !course_endTime_timeout?(course) %>
<div> <div>
<%= join_in_course(course, User.current) %> <%#= join_in_course(course, User.current) %>
</div> </div>
<% end %> <%# end %>
</div> </div>
-->
</li> </li>
<%end%> <%end%>
<% end; reset_cycle %> <% end; reset_cycle %>

View File

@ -16,6 +16,9 @@
<%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, <%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25,
:class => 'wiki-edit', :accesskey => accesskey(:edit) %> :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? %> <% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %>
<%= fields_for @page do |fp| %> <%= fields_for @page do |fp| %>
<p> <p>

View File

@ -229,7 +229,7 @@ en:
field_description: Description field_description: Description
field_summary: Summary field_summary: Summary
field_is_required: Required field_is_required: Required
field_firstname: First name field_firstname: Name
field_lastname: Last name field_lastname: Last name
field_mail: Email field_mail: Email
field_job_category: Job category # added by bai field_job_category: Job category # added by bai
@ -1707,7 +1707,7 @@ en:
label_upload_softapplication_packets: Upload-apppacket label_upload_softapplication_packets: Upload-apppacket
label_upload_softapplication_photo: Upload-appphoto label_upload_softapplication_photo: Upload-appphoto
label_upload_softapplication_packets_mustpacketed: Works code and ralated-document must be packaged before upload. label_upload_softapplication_packets_mustpacketed: Works code and ralated-document must be packaged before upload.
label_upload_softapplication_photo_condition: Need upload 0~4 works screenshot, each is less than 5M, photo format such as gif,jpg,png etc. label_upload_softapplication_photo_condition: The best works. 0~4 (redundant pictures would not show page), each is less than 5M, photo format such as gif,jpg,png etc.
label_updated_caution: Note:if you edit the work, the uploaded screenshot and package will be deleted, please re-load! label_updated_caution: Note:if you edit the work, the uploaded screenshot and package will be deleted, please re-load!
label_softapplication_name: App-name label_softapplication_name: App-name
label_work_name: Work name label_work_name: Work name
@ -1799,3 +1799,6 @@ en:
# ajax异步验证 # ajax异步验证
modal_valid_passing: can be used. modal_valid_passing: can be used.
label_company_name: Company Name
notice_account_invalid_creditentials_new: You have not to the mailbox activation

View File

@ -1975,7 +1975,7 @@ zh:
label_upload_softapplication_packets: 上传应用软件包 label_upload_softapplication_packets: 上传应用软件包
label_upload_softapplication_photo: 上传产品截图 label_upload_softapplication_photo: 上传产品截图
label_upload_softapplication_packets_mustpacketed: 作品相关代码及相关说明文件必须打包后以压缩包的形式上传,便于上传和下载 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_updated_caution: 注意:若编辑参赛作品,则之前上传的软件包和截图都将被删除,请重新上传!
label_softapplication_name: 应用名称 label_softapplication_name: 应用名称
label_work_name: 作品名称 label_work_name: 作品名称
@ -2016,6 +2016,7 @@ zh:
label_contest_work_list: 参赛作品列表 label_contest_work_list: 参赛作品列表
label_attending_contest: 我要参赛 label_attending_contest: 我要参赛
label_contest_notification: 竞赛通知 label_contest_notification: 竞赛通知
label_company_name: 企业名
label_coursefile_sharingarea: 课程资源共享区 label_coursefile_sharingarea: 课程资源共享区
label_sort_by_activity: 按动态数排序 label_sort_by_activity: 按动态数排序

View File

@ -83,6 +83,10 @@ RedmineApp::Application.routes.draw do
end end
end end
#resources :notificationcomments do
#
#end
#resources :contestnotifications, :only => [:index, :show, :edit, :update, :destroy] #resources :contestnotifications, :only => [:index, :show, :edit, :update, :destroy]
# match '/contestnotifications/:id/notificationcomments', :to => 'notificationcomments#create', :via => :post # match '/contestnotifications/:id/notificationcomments', :to => 'notificationcomments#create', :via => :post
# match '/contestnotifications/:id/notificationcomments/:notificationcomment_id', :to => 'notificationcomments#destroy', :via => :delete # 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 :contests, only: [:index] do
resources :contestnotifications do resources :contestnotifications do
# get 'preview', on: :collection # get 'preview', on: :collection
resources :notificationcomments resources :notificationcomments do
end
end end
collection do collection do

View File

@ -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

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # 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| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false