Merge branch 'szzh' into develop
This commit is contained in:
commit
31d22ed8fa
|
@ -87,6 +87,17 @@ module Mobile
|
||||||
present :status, 0
|
present :status, 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc '课程留言列表'
|
||||||
|
params do
|
||||||
|
optional :token, type: String
|
||||||
|
end
|
||||||
|
get ':id/course_message' do
|
||||||
|
cs = CommentService.new
|
||||||
|
jours = cs.course_messages params,(current_user.nil? ? User.find(2):current_user)
|
||||||
|
present :data, jours, with: Mobile::Entities::Jours
|
||||||
|
present :status, 0
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -125,7 +125,7 @@ class AccountController < ApplicationController
|
||||||
#register_by_email_activation(@user)
|
#register_by_email_activation(@user)
|
||||||
unless @user.new_record?
|
unless @user.new_record?
|
||||||
flash[:notice] = l(:notice_account_register_done)
|
flash[:notice] = l(:notice_account_register_done)
|
||||||
render action: 'email_valid', locals: {:mail => user.mail}
|
render action: 'email_valid', locals: {:mail => @user.mail}
|
||||||
end
|
end
|
||||||
when '3'
|
when '3'
|
||||||
#register_automatically(@user)
|
#register_automatically(@user)
|
||||||
|
|
|
@ -336,4 +336,8 @@ class AdminController < ApplicationController
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def create_version
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -333,13 +333,21 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_mail_to_member
|
def send_mail_to_member
|
||||||
unless params[:mail].nil?
|
|
||||||
|
if !params[:mail].nil? && User.find_by_mail(params[:mail].to_s).nil?
|
||||||
email = params[:mail]
|
email = params[:mail]
|
||||||
Mailer.send_invite_in_project(email, @project, User.current).deliver
|
Mailer.send_invite_in_project(email, @project, User.current).deliver
|
||||||
|
@is_zhuce =false
|
||||||
|
else
|
||||||
|
@is_zhuce = true
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
#发送邮件邀请新用户
|
#发送邮件邀请新用户
|
||||||
def invite_members_by_mail
|
def invite_members_by_mail
|
||||||
|
@is_zhuce =false
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.js
|
format.js
|
||||||
|
|
|
@ -87,4 +87,15 @@ class CommentService
|
||||||
@memo
|
@memo
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#课程留言列表
|
||||||
|
def course_messages params,current_user
|
||||||
|
@course = ::Course.find(params[:id])
|
||||||
|
if (current_user.admin? || @course.is_public == 1 || (@course.is_public == 0 && current_user.member_of_course?(@course)))
|
||||||
|
@jours = @course.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||||
|
else
|
||||||
|
raise '403'
|
||||||
|
end
|
||||||
|
@jours
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -158,9 +158,9 @@ class CoursesService
|
||||||
|
|
||||||
|
|
||||||
#显示课程
|
#显示课程
|
||||||
def show_course(params,currnet_user)
|
def show_course(params,current_user)
|
||||||
course = Course.find(params[:id])
|
course = Course.find(params[:id])
|
||||||
unless (course.is_public == 1 || currnet_user.member_of_course?(@course)|| currnet_user.admin?)
|
unless (course.is_public == 1 || current_user.member_of_course?(course) || current_user.admin?)
|
||||||
raise '403'
|
raise '403'
|
||||||
end
|
end
|
||||||
{:course => course,:img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course)}
|
{:course => course,:img_url => url_to_avatar(course),:current_user_is_member => current_user.member_of_course?(course),:current_user_is_teacher => is_course_teacher(current_user,course)}
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
<a href="javascript:void(0)" onclick="$('#new_version').slideToggle(400); ">发布新版本</a>
|
<a href="javascript:void(0)" onclick="$('#new_version').slideToggle(400); ">发布新版本</a>
|
||||||
<div>
|
<div>
|
||||||
<form id="new_version" style="display: none">
|
<form id="new_version" style="display: none">
|
||||||
|
发布新版本
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<div>当前版本:</div>
|
<div>当前版本:</div>
|
||||||
|
|
|
@ -4,9 +4,7 @@
|
||||||
<h1 class="ur_page_title">
|
<h1 class="ur_page_title">
|
||||||
<%= @poll.polls_name.empty? ? l(:label_poll_new) : @poll.polls_name %>
|
<%= @poll.polls_name.empty? ? l(:label_poll_new) : @poll.polls_name %>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="ur_prefix_content">
|
<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
|
||||||
<%= @poll.polls_description%>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ur_card">
|
<div class="ur_card">
|
||||||
<ol class="ur_questions">
|
<ol class="ur_questions">
|
||||||
|
|
|
@ -33,9 +33,7 @@
|
||||||
<h1 class="ur_page_title">
|
<h1 class="ur_page_title">
|
||||||
<%= @poll.polls_name%>
|
<%= @poll.polls_name%>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="ur_prefix_content">
|
<%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%>
|
||||||
<%= @poll.polls_description.html_safe %>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
<div class="project_r_h">
|
<div class="floatbox" style="margin:100px;">
|
||||||
<h2 class="project_h2">邀请加入</h2>
|
|
||||||
</div>
|
|
||||||
<div class="floatbox" style="margin:120px;">
|
|
||||||
<div ><a href="#" class="box_close"></a></div>
|
<div ><a href="#" class="box_close"></a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="box_main">
|
<div class="box_main">
|
||||||
<h3 class="box_h3">发送邮件邀请新用户</h3>
|
<h3 class="box_h3">发送邮件邀请新用户</h3>
|
||||||
<p class="box_p">输入好友邮箱地址,Trustie帮您免费发送!</p>
|
<p class="box_p">输入好友邮箱地址,Trustie帮您免费发送!</p>
|
||||||
<p style="padding-lef:20px;"><%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get',:remote=>true) do %></p>
|
<div id="is_registed">
|
||||||
|
<%= render :partial => 'regested', locals: { :isregisted => false} %>
|
||||||
|
</div>
|
||||||
|
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get',:remote=>true) do %>
|
||||||
|
<ul>
|
||||||
|
<li >
|
||||||
<%= text_field_tag 'mail', '邮箱', :class => "fb_item fl" %>
|
<%= text_field_tag 'mail', '邮箱', :class => "fb_item fl" %>
|
||||||
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<%= submit_tag '免费发送', :style=> "display:block; width:80px; text-align:center; color:#fff; height:26px; padding-top:3px; margin-bottom:10px;" %>
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
<%= submit_tag '免费发送', :class=> "btn_free" %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<% if isregisted %>
|
||||||
|
<p style="color: #ff0000"><%= l(:notice_registed_success) %></p>
|
||||||
|
<% end %>
|
|
@ -0,0 +1 @@
|
||||||
|
$("#is_registed").html("<%= escape_javascript( render :partial => 'regested', locals: {:isregisted => @is_zhuce})%>")
|
|
@ -110,45 +110,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
|
<div class="right" style="float: right; width: 48%; padding-top: 8px;">
|
||||||
<ul class="user-welcome-message-list">
|
|
||||||
<h3 style="color: rgb(21, 188, 207)">
|
|
||||||
<strong>
|
|
||||||
<%= l(:lable_user_active)%>
|
|
||||||
</strong>
|
|
||||||
</h3>
|
|
||||||
<div class="user-message-box-list" style="margin-top: 10px;">
|
|
||||||
<%activities = find_all_activities%>
|
|
||||||
<% activities.each do |event| %>
|
|
||||||
<li style="display: block;height:60px; padding-bottom: 4px;">
|
|
||||||
<div class="inner-right" style="float: left; height: 100%; ">
|
|
||||||
<%= image_tag url_to_avatar(event.event_author), :class => "avatar-3" %>
|
|
||||||
</div>
|
|
||||||
<div class="inner-right" style="float: right; width:86%; height: 100%; overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" >
|
|
||||||
<span style="color: green;">
|
|
||||||
<%= link_to event.event_author, (user_path(event.event_author) if event.event_author),
|
|
||||||
:style => "color:green;", :target => "_blank" %>
|
|
||||||
</span>
|
|
||||||
<%= show_user_content event %>
|
|
||||||
<p style="margin-top: 4px;">
|
|
||||||
<span style="color: rgb(172, 174, 177)">
|
|
||||||
<%= l(:field_updated_on) %>
|
|
||||||
<%= format_time event.event_datetime %>
|
|
||||||
<%#= l(:field_time_ago) %>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<span style="float: right; color: rgb(172, 174, 177);">
|
|
||||||
<%= show_event_reply event %>
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="right" style="float: right; width: 48%; ">
|
|
||||||
<ul class="welcome-message-list">
|
<ul class="welcome-message-list">
|
||||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
||||||
<h3 style="color: rgb(21, 188, 207);"><strong> <%= l(:lable_bar_active)%> </strong> <%= link_to l(:label_my_question) , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
<h3 style="color: rgb(21, 188, 207);"><strong> <%= l(:lable_bar_active)%> </strong> <%= link_to l(:label_my_question) , newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
|
||||||
|
@ -156,7 +118,7 @@
|
||||||
<span style="margin-top: -30px;float: right; display: block;"> <%= link_to l(:label_more), forums_path %> </span>
|
<span style="margin-top: -30px;float: right; display: block;"> <%= link_to l(:label_more), forums_path %> </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="welcome-box-list-new memo_activity">
|
<div class="welcome-box-list-new memo_activity">
|
||||||
<% topics = find_new_forum_topics(6) %>
|
<% topics = find_new_forum_topics(12) %>
|
||||||
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
||||||
<li class="message-brief-intro" style="line-height:1.4em;">
|
<li class="message-brief-intro" style="line-height:1.4em;">
|
||||||
<div class='memo_title text_nowrap'>
|
<div class='memo_title text_nowrap'>
|
||||||
|
|
|
@ -181,6 +181,7 @@ zh:
|
||||||
notice_successful_create: 创建成功
|
notice_successful_create: 创建成功
|
||||||
notice_successful_update: 更新成功
|
notice_successful_update: 更新成功
|
||||||
notice_successful_delete: 删除成功
|
notice_successful_delete: 删除成功
|
||||||
|
notice_registed_success: 该邮箱已被注册,请直接邀请注册用户
|
||||||
notice_failed_delete: 删除失败
|
notice_failed_delete: 删除失败
|
||||||
notice_successful_connection: 连接成功
|
notice_successful_connection: 连接成功
|
||||||
notice_successful_join: 加入成功
|
notice_successful_join: 加入成功
|
||||||
|
@ -2273,6 +2274,17 @@ zh:
|
||||||
|
|
||||||
# 托管平台主页 > 搜索提示信息
|
# 托管平台主页 > 搜索提示信息
|
||||||
label_search_information: 请输入要搜索的关键字
|
label_search_information: 请输入要搜索的关键字
|
||||||
|
welcome:
|
||||||
|
search:
|
||||||
|
information: "请输入要搜索的关键字" # 搜索提示信息
|
||||||
|
select: # 下拉列表
|
||||||
|
project: "项目"
|
||||||
|
course: "课程"
|
||||||
|
user: "用户"
|
||||||
|
userinfo:
|
||||||
|
nickname: "昵称"
|
||||||
|
showname: "姓名"
|
||||||
|
email: "邮箱"
|
||||||
# 托管平台主页 > 下拉列表
|
# 托管平台主页 > 下拉列表
|
||||||
label_select_project: 项目
|
label_select_project: 项目
|
||||||
label_select_course: 课程
|
label_select_course: 课程
|
||||||
|
|
|
@ -645,6 +645,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'admin/web_footer_made', as: :web_footer_made
|
match 'admin/web_footer_made', as: :web_footer_made
|
||||||
match 'admin/enterprise_page_made', as: :enterprise_page_made
|
match 'admin/enterprise_page_made', as: :enterprise_page_made
|
||||||
match 'admin/mobile_version', as: :mobile_version
|
match 'admin/mobile_version', as: :mobile_version
|
||||||
|
match 'admin/create_version', as: :create_version
|
||||||
match 'admin/search', :via => [:get, :post]
|
match 'admin/search', :via => [:get, :post]
|
||||||
match 'admin/plugins', :via => :get
|
match 'admin/plugins', :via => :get
|
||||||
match 'admin/info', :via => :get
|
match 'admin/info', :via => :get
|
||||||
|
|
|
@ -119,7 +119,7 @@ module Redmine
|
||||||
#else
|
#else
|
||||||
# e += [cur_obj]
|
# e += [cur_obj]
|
||||||
#end
|
#end
|
||||||
if cur_obj.project.respond_to?("Project") && cur_obj.project != nil && cur_obj.project.project_status != nil && cur_obj.project.is_public == true
|
if cur_obj.project != nil && cur_obj.project.project_status != nil && cur_obj.project.is_public == true
|
||||||
e += [cur_obj]
|
e += [cur_obj]
|
||||||
#else
|
#else
|
||||||
# e += [cur_obj]
|
# e += [cur_obj]
|
||||||
|
|
Loading…
Reference in New Issue