Merge branch 'develop' into szzh
This commit is contained in:
commit
ac637d8bf0
|
@ -5,7 +5,7 @@
|
|||
*.swp
|
||||
/config/database.yml
|
||||
/config/configuration.yml
|
||||
/config/additional_environment.rb
|
||||
|
||||
/files/*
|
||||
/log/*
|
||||
/public/tmp/*
|
||||
|
|
|
@ -91,6 +91,7 @@ module Mobile
|
|||
desc '课程留言列表'
|
||||
params do
|
||||
optional :token, type: String
|
||||
optional :page,type:Integer,desc:'页数'
|
||||
end
|
||||
get ':id/course_message' do
|
||||
cs = CommentService.new
|
||||
|
|
|
@ -336,9 +336,11 @@ class AccountController < ApplicationController
|
|||
:expires => 1.month.from_now,
|
||||
:path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
|
||||
:secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false),
|
||||
:domain => Redmine::Configuration['cookie_domain'],
|
||||
:httponly => true
|
||||
}
|
||||
if Redmine::Configuration['cookie_domain'].present?
|
||||
cookie_options = cookie_options.merge(domain: Redmine::Configuration['cookie_domain'])
|
||||
end
|
||||
cookies[autologin_cookie_name] = cookie_options
|
||||
end
|
||||
|
||||
|
|
|
@ -199,7 +199,11 @@ class ApplicationController < ActionController::Base
|
|||
# Logs out current user
|
||||
def logout_user
|
||||
if User.current.logged?
|
||||
cookies.delete(autologin_cookie_name, domain: :all)
|
||||
if Redmine::Configuration['cookie_domain'].present?
|
||||
cookies.delete(autologin_cookie_name, domain: Redmine::Configuration['cookie_domain'])
|
||||
else
|
||||
cookies.delete autologin_cookie_name
|
||||
end
|
||||
# Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin'])
|
||||
self.logged_user = nil
|
||||
end
|
||||
|
|
|
@ -80,19 +80,19 @@ class BoardsController < ApplicationController
|
|||
if @project
|
||||
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
|
||||
@topics = @board.topics.
|
||||
reorder("#{Message.table_name}.sticky DESC").
|
||||
reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
|
||||
includes(:last_reply).
|
||||
limit(@topic_pages.per_page).
|
||||
offset(@topic_pages.offset).
|
||||
order("last_replies_messages.created_on desc").
|
||||
|
||||
preload(:author, {:last_reply => :author}).
|
||||
all
|
||||
elsif @course
|
||||
board_topics = @board ? @board.topics.reorder("#{Message.table_name}.sticky DESC").
|
||||
board_topics = @board ? @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
|
||||
includes(:last_reply).
|
||||
# limit(@topic_pages.per_page).
|
||||
# offset(@topic_pages.offset).
|
||||
order("last_replies_messages.created_on desc").
|
||||
|
||||
preload(:author, {:last_reply => :author}).
|
||||
all : []
|
||||
@topics = paginateHelper board_topics,10
|
||||
|
|
|
@ -193,7 +193,7 @@ class MessagesController < ApplicationController
|
|||
else
|
||||
redirect_to board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id))
|
||||
end
|
||||
elsif request.get?
|
||||
elsif request.get? || request.post?
|
||||
if params[:is_board]
|
||||
if @project
|
||||
redirect_to project_boards_path(@project)
|
||||
|
|
|
@ -243,14 +243,7 @@ class ProjectsController < ApplicationController
|
|||
# Author lizanle
|
||||
# Description 项目动态展示方法,删除了不必要的代码
|
||||
def show
|
||||
# params[:login]为邮箱邀请用户加入,主要功能:
|
||||
# 1、自动注册
|
||||
# 2、加入项目、创建角色
|
||||
# 3、用户得分
|
||||
if params[:mail]
|
||||
Member.create(:role_ids => [4], :user_id => params[:user],:project_id => params[:id])
|
||||
UserGrade.create(:user_id =>params[:user], :project_id => params[:id])
|
||||
end
|
||||
|
||||
if params[:jump] && redirect_to_project_menu_item(@project, params[:jump])
|
||||
return
|
||||
end
|
||||
|
@ -399,6 +392,26 @@ class ProjectsController < ApplicationController
|
|||
# by young
|
||||
# include CoursesHelper
|
||||
def member
|
||||
# params[:login]为邮箱邀请用户加入,主要功能:
|
||||
# 1、自动注册
|
||||
# 2、加入项目、创建角色
|
||||
# 3、用户得分
|
||||
if params[:mail]
|
||||
user = User.find(params[:user_id])
|
||||
user.activate!
|
||||
Member.create(:role_ids => [4], :user_id => params[:user_id],:project_id => params[:id])
|
||||
UserGrade.create(:user_id => params[:user_id], :project_id => params[:id])
|
||||
token = Token.get_token_from_user(user, 'autologin')
|
||||
#user = User.try_to_autologin(token.value)
|
||||
if user
|
||||
start_user_session(user)
|
||||
user.save
|
||||
redirect_to project_member_path(params[:id])
|
||||
return
|
||||
# account_ project_member_path(params[:id])
|
||||
flash[:notice] = l(:label_mail_invite_success)
|
||||
end
|
||||
end
|
||||
## 有角色参数的才是课程,没有的就是项目
|
||||
@render_file = 'project_member_list'
|
||||
# 判断是否课程
|
||||
|
|
|
@ -16,16 +16,18 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class WelcomeController < ApplicationController
|
||||
# layout "base_welcome"
|
||||
include ApplicationHelper
|
||||
include WelcomeHelper
|
||||
helper :project_score
|
||||
caches_action :robots
|
||||
caches_action :robots, :course, :contest, expires_in: 2.hours, layout: false
|
||||
#before_filter :find_first_page, :only => [:index]
|
||||
# before_filter :fake, :only => [:index, :course]
|
||||
before_filter :entry_select, :only => [:index]
|
||||
|
||||
def index
|
||||
# 企业版定制: params[:project]为传过来的参数
|
||||
|
||||
unless params[:organization].nil?
|
||||
@organization = Organization.find params[:organization]
|
||||
# @organization_projects = Project.joins(:project_status).joins("LEFT JOIN project_scores ON projects.id = project_scores.project_id").where("projects.organization_id = ?", @organization.id).order("score DESC").limit(10).all
|
||||
|
@ -84,6 +86,7 @@ class WelcomeController < ApplicationController
|
|||
@projects = @projects_all.order("score desc")
|
||||
end
|
||||
end
|
||||
|
||||
rescue Exception => e
|
||||
render_404
|
||||
end
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class InviteList < ActiveRecord::Base
|
||||
attr_accessible :project_id, :user_id
|
||||
# belongs_to :user
|
||||
# belongs_to :project
|
||||
end
|
|
@ -60,8 +60,8 @@ class Mailer < ActionMailer::Base
|
|||
user = us.register_auto(login, @email, @password)
|
||||
User.current = user unless User.current.nil?
|
||||
@user = user
|
||||
@token = Token.get_token_from_user(user, 'autologin')
|
||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => project.id, :user => user.id, :mail => true, :token => @token.value)
|
||||
|
||||
@project_url = url_for(:controller => 'projects', :action => 'member', :id => project.id, :user_id => user.id, :mail => true)
|
||||
mail :to => email, :subject => @subject
|
||||
end
|
||||
|
||||
|
@ -72,8 +72,9 @@ class Mailer < ActionMailer::Base
|
|||
@invitor_name = "#{invitor.name}"
|
||||
@project_name = "#{project.name}"
|
||||
@user = user
|
||||
@project = project
|
||||
@token = Token.get_token_from_user(user, 'autologin')
|
||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => project.id, :user => user.id, :mail => true, :token => @token.value)
|
||||
@project_url = url_for(:controller => 'projects', :action => 'member', :id => project.id, :user_id => user.id, :mail => true, :token => @token.value)
|
||||
mail :to => email, :subject => @subject
|
||||
end
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ class Project < ActiveRecord::Base
|
|||
has_many :student, :through => :students_for_courses, :source => :user
|
||||
has_one :course_extra, :class_name => 'Course', :foreign_key => :extra,:primary_key => :identifier, :dependent => :destroy
|
||||
has_many :applied_projects
|
||||
|
||||
# has_many :invite_lists
|
||||
|
||||
# end
|
||||
#ADDED BY NIE
|
||||
|
|
|
@ -125,6 +125,10 @@ class User < Principal
|
|||
has_many :documents # 项目中关联的文档再次与人关联
|
||||
# end
|
||||
|
||||
# 邮件邀请状态
|
||||
# has_many :invite_lists
|
||||
# end
|
||||
|
||||
######added by nie
|
||||
has_many :project_infos, :dependent => :destroy
|
||||
has_one :user_status, :dependent => :destroy
|
||||
|
|
|
@ -94,7 +94,7 @@ class CommentService
|
|||
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')
|
||||
@jours = @course.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC').page(params[:page] ||= 1).per(10)
|
||||
else
|
||||
raise '403'
|
||||
end
|
||||
|
|
|
@ -62,7 +62,7 @@ class UsersService
|
|||
else
|
||||
@user.password = ""
|
||||
end
|
||||
@user = automatically_register(@user)
|
||||
@user = automatically_register_lock(@user)
|
||||
if @user.id != nil
|
||||
ue = @user.user_extensions ||= UserExtensions.new
|
||||
ue.user_id = @user.id
|
||||
|
@ -292,6 +292,7 @@ class UsersService
|
|||
jours
|
||||
end
|
||||
|
||||
# 所有的与我相关
|
||||
def reply_my_messages params,current_user
|
||||
jours = my_personal_messages params,current_user
|
||||
jours1 = my_course_messages params,current_user
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
<%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, :html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
|
||||
|
||||
<%= render :partial => 'form_course', :locals => {:f => f, :topic => @message} %>
|
||||
<li>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk();" class="grey_btn fr ml10"><%= l(:button_cancel) %></a>
|
||||
<a href="#" onclick="submitProjectsBoard('<%= @message.id %>')" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
|
||||
<div class="ml55 fl" nhname="toolbar_container"></div>
|
||||
<a href="javascript:void(0);" nhname="cancelbtn" class="grey_btn fr ml10"><%= l(:button_cancel) %></a>
|
||||
<a href="javascript:void(0);" nhname="submitbtn" class="blue_btn fr " style="margin-left: 55px">
|
||||
<%= l(:button_submit)%>
|
||||
</a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
|
||||
<!--display the board-->
|
||||
<div nhname="container_board">
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2 fl">
|
||||
<% if User.current.language == "zh"%>
|
||||
|
@ -10,17 +8,22 @@
|
|||
<% end %>
|
||||
|
||||
</h2>
|
||||
<a href="javascript:void(0)" class="green_btn fr newtalk " onclick="show_newtalk();"><%= l(:label_message_new) %></a>
|
||||
<% if User.current.logged? %>
|
||||
<a href="javascript:void(0)" class="green_btn fr newtalk " id="new_topic_btn" nhname="showbtn"><%= l(:label_message_new) %></a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<!-- 发布新帖部分 -->
|
||||
<div class="cl"></div>
|
||||
<div class=" talklist_box" >
|
||||
<div class="talk_new ml15 mb10" id="about_newtalk" style="display:<%= !@flag.nil? && @flag=='true' ? 'block' : 'none' %>;" >
|
||||
<div class="talk_new ml15 mb10" nhname="about_talk" id="about_newtalk" style="display:none;" >
|
||||
<ul>
|
||||
<%= render :partial => 'course_new' %>
|
||||
</ul>
|
||||
</div><!--talknew end-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- 发布新帖部分 -->
|
||||
<div class=" talklist_box" >
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
|
@ -32,15 +35,19 @@
|
|||
<p class="c_dark mb5">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p>
|
||||
<% if @topics.any? %>
|
||||
<% @topics.each do |topic| %>
|
||||
<div class="talkmain_box" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;" id="topic<%= topic.id %>">
|
||||
<div class="talkmain_box" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;" id="topic<%= topic.id %>" nhname="container_board" mhname="container_board_reply">
|
||||
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
|
||||
<div class="talkmain_txt fl mt5">
|
||||
<% author = topic.author.to_s + ":" %>
|
||||
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %>
|
||||
<% author = topic.author.to_s %>
|
||||
<div style="max-width:60px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">
|
||||
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl ",:title=>author,
|
||||
:style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>
|
||||
</div>
|
||||
<p style="float:left;color:#ff5722;"> :</p>
|
||||
|
||||
<p class="talkmain_tit fl fb break_word"> <%= h(topic.subject) %></p>
|
||||
<p class="talkmain_tit fl fb break_word" title="<%= h(topic.subject) %>" style="width:auto;float:left;max-width:415px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;"> <%= h(topic.subject) %></p>
|
||||
<% if topic.course_editable_by?(User.current) %>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: right;
|
||||
<a href="javascript:void(0)" nhname="showbtn" style="color: #426e9a;float: right;
|
||||
margin-right: 10px;"><%= l(:button_edit) %></a>
|
||||
<% end %>
|
||||
|
||||
|
@ -59,7 +66,7 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<script>
|
||||
$(function(){if($("#contentmessage<%=topic.id %>").height()>55){$("#project_show_<%= topic.id%>").show();}});
|
||||
$(function(){if($("#contentmessage<%=topic.id %>").height()>182){$("#project_show_<%= topic.id%>").show();}});
|
||||
</script>
|
||||
<div class="project_board_content break_word" id="content_<%=topic.id%>">
|
||||
<div id="contentmessage<%=topic.id %>" class="upload_img">
|
||||
|
@ -70,7 +77,7 @@
|
|||
|
||||
|
||||
<p style="display: none" id="project_show_<%= topic.id%>">
|
||||
<label id="expend_more_information<%= topic.id%>" onclick="show_more_reply('#content_<%=topic.id%>','#expend_more_information<%= topic.id%>','#arrow<%=topic.id%>');" value="show_more">[展开]</label>
|
||||
<a id="expend_more_information<%= topic.id%>" href="javascript:void(0)" style="color: #0781b4;" onclick="show_more_reply('#content_<%=topic.id%>','#expend_more_information<%= topic.id%>','#arrow<%=topic.id%>');" value="show_more">[展开]</a>
|
||||
<span class="g-arr-down">
|
||||
<img id="arrow<%=topic.id%>" src="/images/jiantou.jpg" width="12" height="6" />
|
||||
</span>
|
||||
|
@ -81,83 +88,53 @@
|
|||
<%= l(:label_activity_time)%>: <%= format_time topic.created_on %>
|
||||
|
||||
</div>
|
||||
<%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => 'message_content',:class => ' c_dblue fr' %>
|
||||
<a href="javascript:void(0)" nhname="showbtn_reply" class="c_dblue fr" style="margin-right:10px;"><%= l(:button_reply) %></a>
|
||||
|
||||
<div class="cl"></div>
|
||||
|
||||
|
||||
</div><!--讨论主类容 end-->
|
||||
<div class="talk_new ml15 mb10" id="about_newtalk<%=topic.id%>" style="display: none">
|
||||
<div class="talk_new ml15 mb10" nhname='about_talk' id="about_newtalk<%=topic.id%>" style="display: none">
|
||||
<ul>
|
||||
<%= render :partial => 'edit',locals: {:topic => topic} %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="talkWrapBox">
|
||||
<% reply = Message.new(:subject => "RE: #{@message.subject}")%>
|
||||
<% reply = Message.new(:subject => "RE: #{topic.subject}")%>
|
||||
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<div class="talkWrapMsg" nhname="about_talk_reply" style="display: none;">
|
||||
<em class="talkWrapArrow"></em>
|
||||
<div class="cl"></div>
|
||||
<div class="talkConIpt ml15 mb10" style="display: none" id="reply<%= topic.id %>">
|
||||
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s} do |f| %>
|
||||
<div class="talkConIpt ml15 mb10" style="margin-left:30px;" id="reply<%= topic.id %>">
|
||||
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'},
|
||||
:html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
|
||||
|
||||
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
||||
<%= toggle_link l(:button_cancel), "reply" + topic.id.to_s, :focus => 'message_content',:class => 'grey_btn fr ml10' %>
|
||||
<a href="#" onclick="$('#message_form<%= topic.id%>').submit();" class="blue_btn fr " style=""><%= l(:label_memo_create)%></a>
|
||||
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<div style="padding-top:5px;" class="fr">
|
||||
<a href="javascript:void(0)" nhname="cancelbtn" class="grey_btn fr ml10" style=""><%= l(:button_cancel)%></a>
|
||||
<a href="javascript:void(0)" nhname="submitbtn" class="blue_btn fr " style=""><%= l(:button_submit)%></a>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% replies_all = topic.children.
|
||||
includes(:author, :attachments, {:board => :project}).
|
||||
reorder("#{Message.table_name}.created_on DESC").offset(2).
|
||||
all %>
|
||||
<% replies_show = topic.children.
|
||||
includes(:author, :attachments, {:board => :project}).
|
||||
reorder("#{Message.table_name}.created_on DESC").limit(2).
|
||||
all %>
|
||||
<% unless replies_show.empty? %>
|
||||
<% reply_count = 0 %>
|
||||
<div class="talkWrapMsg">
|
||||
<ul>
|
||||
<% replies_show.each do |message| %>
|
||||
|
||||
<li>
|
||||
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
|
||||
<div class="Msg_txt">
|
||||
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
||||
<br/>
|
||||
<p class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></p>
|
||||
|
||||
<br/>
|
||||
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>
|
||||
<%= link_to(
|
||||
|
||||
l(:button_delete),
|
||||
{:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete),
|
||||
:class => ' c_dblue fr'
|
||||
) if message.course_destroyable_by?(User.current) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
</li><!---留言内容-->
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="talkWrapMsg" id="talkWrapMsg<%= topic.id %>" style="display: none">
|
||||
<% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).
|
||||
reorder("#{Message.table_name}.created_on DESC").all %>
|
||||
<% unless replies_all.empty? %>
|
||||
<% replies_all_i = 0 %>
|
||||
<div class="talkWrapMsg" nhname="nh_reply_div" id="nh_reply_div_<%= topic.id %>">
|
||||
<ul>
|
||||
<% replies_all.each do |message| %>
|
||||
|
||||
<li>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>">
|
||||
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
|
||||
<div class="Msg_txt">
|
||||
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
||||
<br/>
|
||||
<p class="fl"><%= textAreailizable message,:content,:attachments => message.attachments %></p>
|
||||
|
||||
<br/>
|
||||
<div class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></div>
|
||||
<input nhname="nh_content_val" value="<%= message.content %>" type="hidden"/>
|
||||
<br/><div class="cl"></div>
|
||||
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>
|
||||
<%= link_to(
|
||||
|
||||
|
@ -168,6 +145,13 @@
|
|||
:title => l(:button_delete),
|
||||
:class => ' c_dblue fr'
|
||||
) if message.course_destroyable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
'javascript:;',
|
||||
:nhname =>'showbtn_child_reply',
|
||||
:class => ' c_dblue fr',
|
||||
:style => 'margin-right: 10px;',
|
||||
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
@ -175,11 +159,14 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<%if replies_all.first %>
|
||||
<div class="talkWrapMsg"><a class=" ml258" id="showgithelp<%= topic.id%>" value="show_help" onclick ="showhelpAndScrollToMessage('talkWrapMsg<%= topic.id %>','#showgithelp<%= topic.id%>','<%=topic.replies_count%>'); " class="c_dblue lh23">展开回复(<%= topic.replies_count.to_s%>)</a></div>
|
||||
<%if topic.replies_count>2 %>
|
||||
<div class="talkWrapMsg"><a nhname="reply_ex_btn" data-count="<%= topic.replies_count %>" data-init="0" class=" ml258" href="javascript:void(0)" id="showgithelp<%= topic.id%>" value="show_help" class="c_dblue lh23" style="color: #0781b4;" >展开回复(<%= topic.replies_count.to_s%>)</a></div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--讨论主类容 end-->
|
||||
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
|
@ -196,3 +183,81 @@
|
|||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@course}: #{@board}") %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div style="display:none;"><a href="#" id="nhjump"></a></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$(".talkmain_box").each(function(){
|
||||
var target = $("li[nhname='reply_rec']",$(this));
|
||||
var btn = $("a[nhname='reply_ex_btn']",$(this));
|
||||
var jumpobj = $("div[nhname='nh_reply_div']",$(this));
|
||||
btn.click(function(){
|
||||
if($(this).data('init')=='0'){
|
||||
$(this).data('init',1);
|
||||
$(this).html('收起回复('+$(this).data('count')+')');
|
||||
target.show();
|
||||
}else{
|
||||
$(this).data('init',0);
|
||||
$(this).html('展开回复('+$(this).data('count')+')');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
$("#nhjump").attr('href','#'+jumpobj.attr('id'));
|
||||
$("#nhjump")[0].click();
|
||||
}
|
||||
});
|
||||
});
|
||||
KindEditor.ready(function(K){
|
||||
$("div[nhname='container_board']").each(function(){
|
||||
var container = $(this);
|
||||
var about_talk = $("div[nhname='about_talk']",container);
|
||||
var params = ({
|
||||
kindutil:K,
|
||||
showbtn:$("a[nhname='showbtn']",container),
|
||||
about_talk:about_talk,
|
||||
inputsubject:$("input[nhname='inputsubject']",about_talk),
|
||||
subjectmsg:$("p[nhname='subjectmsg']",about_talk),
|
||||
textarea:$("textarea[nhname='textarea']",about_talk),
|
||||
contentmsg:$("p[nhname='contentmsg']",about_talk),
|
||||
submitbtn:$("a[nhname='submitbtn']",about_talk),
|
||||
cancelbtn:$("a[nhname='cancelbtn']",about_talk),
|
||||
form:$("form[nhname='form']",about_talk),
|
||||
toolbar_container:$("div[nhname='toolbar_container']",about_talk),
|
||||
init_content_val:$("input[nhname='init_content_val']",about_talk)
|
||||
});
|
||||
nh_init_board(params);
|
||||
});
|
||||
$("div[mhname='container_board_reply']").each(function(){
|
||||
var container = $(this);
|
||||
var about_talk = $("div[nhname='about_talk_reply']",container);
|
||||
var params = {
|
||||
type:'reply',
|
||||
kindutil:K,
|
||||
showbtn:$("a[nhname='showbtn_reply']",container),
|
||||
showbtn_child:$("a[nhname='showbtn_child_reply']",container),
|
||||
about_talk:about_talk,
|
||||
inputsubject:$("input[nhname='inputsubject']",about_talk),
|
||||
subjectmsg:$("p[nhname='subjectmsg']",about_talk),
|
||||
textarea:$("textarea[nhname='textarea']",about_talk),
|
||||
contentmsg:$("p[nhname='contentmsg']",about_talk),
|
||||
submitbtn:$("a[nhname='submitbtn']",about_talk),
|
||||
cancelbtn:$("a[nhname='cancelbtn']",about_talk),
|
||||
form:$("form[nhname='form']",about_talk),
|
||||
quote_show:$("div[nhname='quote_show']",about_talk),
|
||||
quote_input:$("textarea[nhname='quote_input']",about_talk),
|
||||
toolbar_container:$("div[nhname='toolbar_container']",about_talk),
|
||||
jumphref:$("#nhjump")
|
||||
};
|
||||
params.get_ref_str_call=function(btn){
|
||||
var div = btn.parent('div');
|
||||
var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'</blockquote>';
|
||||
return str;
|
||||
}
|
||||
nh_init_board(params);
|
||||
});
|
||||
<% if(!@flag.nil? && @flag=='true') %>
|
||||
if($("#new_topic_btn")!=undefined)$("#new_topic_btn").click();
|
||||
<% end %>
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -2,18 +2,19 @@
|
|||
<% if topic.project %>
|
||||
<%#= board_breadcrumb(@message) %>
|
||||
<!--<h3><%#= avatar(@topic.author, :size => "24") %><span style = "width:100%;word-break:break-all;word-wrap: break-word;"><%#=h @topic.subject %></span></h3>-->
|
||||
<div class="talk_new ml15" name='containerxxoo'>
|
||||
<div class="talk_new ml15">
|
||||
<ul>
|
||||
<%= form_for topic, { :as => :message,
|
||||
:url => {:controller => 'messages',:action => 'edit', :is_board => 'true',:id => topic.id, :board_id => topic.board_id},
|
||||
:html => {:multipart => true, :name=>'message-form',
|
||||
:id => 'message-form' + topic.id.to_s,
|
||||
:method => :post}
|
||||
:method => :post,:nhname=>'form'}
|
||||
} do |f| %>
|
||||
<%= render :partial => 'form_project',
|
||||
:locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
|
||||
<a href="javascript:void(0)" name='submitbtn' class="blue_btn fl c_white" ><%= l(:button_submit)%></a>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" class="blue_btn grey_btn fl c_white"><%= l(:button_cancel) %></a>
|
||||
<div class="ml55 fl" nhname="toolbar_container"></div>
|
||||
<a href="javascript:void(0)" nhname='cancelbtn' class="blue_btn grey_btn fr c_white ml10"><%= l(:button_cancel) %></a>
|
||||
<a href="javascript:void(0)" nhname='submitbtn' class="blue_btn fr c_white" ><%= l(:button_submit)%></a>
|
||||
<%#= link_to l(:button_cancel), board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "blue_btn grey_btn fl c_white" %>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -25,14 +26,15 @@
|
|||
<%= form_for topic, {
|
||||
:as => :message,
|
||||
:url => {:controller => 'messages',:action => 'edit', :is_board => 'true',:id => topic.id, :board_id => topic.board_id},
|
||||
:html => {:multipart => true,
|
||||
:html => {:multipart => true, :name=>'message-form',
|
||||
:id => 'message-form' + topic.id.to_s,
|
||||
:method => :post}
|
||||
:method => :post,:nhname=>'form'}
|
||||
} do |f| %>
|
||||
<%= render :partial => 'form_course',
|
||||
:locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
|
||||
<a href="javascript:void(0)" onclick="submitProjectsBoard('<%= topic.id%>');"class="blue_btn fl c_white"><%= l(:button_submit)%></a>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" class="blue_btn grey_btn fl c_white"><%= l(:button_cancel) %></a>
|
||||
<div class="ml55 fl" nhname="toolbar_container"></div>
|
||||
<a href="javascript:void(0)" nhname='cancelbtn' class="blue_btn grey_btn fr c_white ml10"><%= l(:button_cancel) %></a>
|
||||
<a href="javascript:void(0)" nhname='submitbtn' class="blue_btn fr c_white"><%= l(:button_submit)%></a>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
<li style="display: none">
|
||||
<label><span class="c_red">*</span> <%= l(:field_subject) %> :</label>
|
||||
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
|
||||
|
||||
|
||||
<p id="subject_span<%= topic.id%>" class="ml55"></p>
|
||||
<p nhname="subjectmsg" class="ml55"></p>
|
||||
</li>
|
||||
<% else %>
|
||||
<li >
|
||||
<label><span class="c_red">*</span> <%= l(:field_subject) %> :</label>
|
||||
|
||||
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
|
||||
|
||||
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
|
||||
<p nhname="subjectmsg" class="ml55"></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="ml60 mb5">
|
||||
|
@ -34,18 +34,42 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<div nhname="quote_show" id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<% unless replying %>
|
||||
<label class="fl ml3" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||||
<% end %>
|
||||
<%= text_area :quote,:quote,:style => 'display:none' %>
|
||||
<%= text_area :quote,:quote,:style => 'display:none',:nhname=>"quote_input" %>
|
||||
<div class="content">
|
||||
<% if replying%>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => "message_content#{f.object.id}", :onkeyup => "regexContent('#{f.object.id}');", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)", :style=>"width: 575px;" %>
|
||||
|
||||
<%= f.text_area :content,
|
||||
:width => '89%',
|
||||
:height => 300,
|
||||
:id => "message_content#{f.object.id}",
|
||||
:nhname => 'textarea',
|
||||
:onkeyup => "regexContent('#{f.object.id}');",
|
||||
:class => 'talk_text fl',
|
||||
:placeholder => "最多3000个汉字(或6000个英文字符)",
|
||||
:maxlength => 5000 %>
|
||||
|
||||
<% else %>
|
||||
<%= f.text_area :content, :class => 'talk_text fl', :id => "message_content#{f.object.id}", :onkeyup => "regexContent('#{f.object.id}');", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %>
|
||||
<input nhname="init_content_val" value="<%=topic.content%>" type="hidden"/>
|
||||
<%= f.text_area :content,
|
||||
:width => '90%',
|
||||
:height => 300,
|
||||
:class => 'talk_text fl',
|
||||
:editor_id => "message_content#{f.object.id}_edit",
|
||||
:id => "message_content#{f.object.id}",
|
||||
:onkeyup => "regexContent('#{f.object.id}');",
|
||||
:class => 'talk_text fl',
|
||||
:nhname => 'textarea',
|
||||
:placeholder => "最多3000个汉字(或6000个英文字符)",
|
||||
:maxlength => 5000 %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p id="message_content_span<%= f.object.id%>" class="ml55"></p>
|
||||
<p id="message_content_span<%= f.object.id%>" nhname="contentmsg" class="ml55"></p>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor-min" %>
|
||||
<style>
|
||||
.comment{
|
||||
position: relative;
|
||||
|
@ -15,22 +14,22 @@
|
|||
<% replying ||= false %>
|
||||
<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
|
||||
<% if replying %>
|
||||
<li style="display: none">
|
||||
<li style="display: none;">
|
||||
<label><span class="c_red">*</span> <%= l(:field_subject) %> :</label>
|
||||
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}",:class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
|
||||
|
||||
|
||||
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
|
||||
<p nhname="subjectmsg" class="ml55"></p>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<label><span class="c_red">*</span> <%= l(:field_subject) %> :</label>
|
||||
|
||||
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585" }.merge(extra_option) %>
|
||||
<%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", :class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
|
||||
|
||||
<p id="subject_span<%= f.object.id%>" class="ml55"></p>
|
||||
<p nhname="subjectmsg" class="ml55"></p>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="ml60 mb5">
|
||||
|
@ -47,25 +46,27 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<div nhname="quote_show" id="message_quote" class="wiki" style="width: 100%;word-break: break-all;word-wrap: break-word;"></div>
|
||||
<% unless replying %>
|
||||
<label class="fl ml3" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||||
<% end %>
|
||||
<%= f.text_area :quote,:quote,:style => 'display:none' %>
|
||||
<div class="content">
|
||||
<%= text_area :quote,:quote,:style => 'display:none',:nhname=>"quote_input" %>
|
||||
|
||||
<div class="content <%= replying ? '':'ml55' %>">
|
||||
<% if replying%>
|
||||
|
||||
<%= f.text_area :content,
|
||||
:width => '89%',
|
||||
:height => 300,
|
||||
:id => "message_content#{f.object.id}",
|
||||
:name => 'content',
|
||||
:nhname => 'textarea',
|
||||
:onkeyup => "regexContent('#{f.object.id}');",
|
||||
:class => 'talk_text fl',
|
||||
:placeholder => "最多3000个汉字(或6000个英文字符)",
|
||||
:maxlength => 5000 %>
|
||||
|
||||
<% else %>
|
||||
<input nhname="init_content_val" value="<%=topic.content%>" type="hidden"/>
|
||||
<%= f.text_area :content,
|
||||
:width => '90%',
|
||||
:height => 300,
|
||||
|
@ -74,14 +75,18 @@
|
|||
:id => "message_content#{f.object.id}",
|
||||
:onkeyup => "regexContent('#{f.object.id}');",
|
||||
:class => 'talk_text fl',
|
||||
:name => 'content',
|
||||
:nhname => 'textarea',
|
||||
:placeholder => "最多3000个汉字(或6000个英文字符)",
|
||||
:maxlength => 5000 %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p id="message_content_span<%= f.object.id%>" class="ml55"></p>
|
||||
<% if replying%>
|
||||
<p nhname="contentmsg"></p>
|
||||
<% else %>
|
||||
<p nhname="contentmsg" class="ml55"></p>
|
||||
<%end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message-form', :name=>'message-form'} do |f| %>
|
||||
<%= form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'},:html => {:nhname=>'form', :multipart => true, :id => 'message-form', :name=>'message-form'} do |f| %>
|
||||
|
||||
<%= render :partial => 'form_project', :locals => {:f => f, :topic => @message} %>
|
||||
<li>
|
||||
<a href="javascript:void(0)" onclick="show_newtalk();" class="grey_btn fr ml10"><%= l(:button_cancel) %></a>
|
||||
<div class="ml55 fl" nhname="toolbar_container"></div>
|
||||
<a href="javascript:void(0)" nhname="cancelbtn" class="grey_btn fr ml10"><%= l(:button_cancel) %></a>
|
||||
|
||||
<a href="javascript:;" name="submitbtn" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
|
||||
<a href="javascript:void(0)" nhname="submitbtn" class="blue_btn fr " style="margin-left: 55px"><%= l(:button_submit)%></a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
|
@ -1,3 +1,4 @@
|
|||
<div nhname="container_board">
|
||||
<div class="project_r_h" xmlns="http://www.w3.org/1999/html">
|
||||
<h2 class="project_h2 fl">
|
||||
<% if User.current.language == "zh"%>
|
||||
|
@ -5,47 +6,46 @@
|
|||
<% else %>
|
||||
<%= l(:project_module_boards) %>
|
||||
<% end %>
|
||||
|
||||
</h2>
|
||||
<a href="javascript:void(0)" class="green_btn fr newtalk " onclick="show_newtalk();"><%= l(:label_message_new) %></a>
|
||||
<% if User.current.logged? %>
|
||||
<a href="javascript:void(0)" class="green_btn fr newtalk " id="new_topic_btn" nhname="showbtn"><%= l(:label_message_new) %></a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<!--display the board-->
|
||||
<% if !User.current.logged? %>
|
||||
<div class="c_grey f14">
|
||||
<%= l(:label_user_login_project_board) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!-- 发布新帖部分 -->
|
||||
<div class="cl"></div>
|
||||
<div class=" talklist_box" >
|
||||
<div class="talk_new ml15 mb10" name="containerxxoo" id="about_newtalk" style="display:<%= !@flag.nil? && @flag=='true' ? 'block' : 'none' %>;">
|
||||
<div class="talk_new ml15 mb10" nhname="about_talk" style="display:none;">
|
||||
<ul>
|
||||
<%= render :partial => 'project_new_topic' %>
|
||||
</ul>
|
||||
</div><!--talknew end-->
|
||||
|
||||
<!-- 帖子内容显示 -->
|
||||
</div>
|
||||
</div>
|
||||
<div class=" talklist_box" >
|
||||
<p class="c_dark mb5">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p>
|
||||
<% if @topics.any? %>
|
||||
<% @topics.each do |topic| %>
|
||||
|
||||
<div class="talkmain_box" id="topic<%= topic.id %>" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;">
|
||||
<div class="talkmain_box" id="topic<%= topic.id %>" nhname="container_board" mhname="container_board_reply" style="border:none; margin-bottom:0; border-bottom: 1px dashed #d9d9d9;">
|
||||
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
|
||||
<div class="talkmain_txt fl mt5">
|
||||
<% author = topic.author.to_s + ":" %>
|
||||
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %>
|
||||
<% author = topic.author.to_s %>
|
||||
<div style="max-width:60px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">
|
||||
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl ",:title=>author,
|
||||
:style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>
|
||||
</div>
|
||||
<p style="float:left;color:#ff5722;"> :</p>
|
||||
|
||||
<p class="talkmain_tit fl fb break_word"> <%= h(topic.subject) %></p>
|
||||
<p class="talkmain_tit fl fb break_word" title="<%= h(topic.subject) %>" style="width:auto;float:left;max-width:415px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;"> <%= h(topic.subject) %></p>
|
||||
<div style="float:right;max-width:110px;">
|
||||
<% if topic.editable_by?(User.current) %>
|
||||
|
||||
<a href="javascript:void(0)" onclick="show_newtalk1('#about_newtalk<%= topic.id%>');" style="color: #426e9a;float: right;
|
||||
margin-right: 10px;"><%= l(:button_edit) %></a>
|
||||
<a href="javascript:void(0)" nhname="showbtn" style="color: #426e9a;float: right;margin-right: 10px;"><%= l(:button_edit) %></a>
|
||||
<% end %>
|
||||
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
|
||||
|
@ -54,124 +54,75 @@
|
|||
:class => 'talk_edit fr',
|
||||
:style => ' margin-right: 10px;'
|
||||
) if topic.destroyable_by?(User.current) %>
|
||||
|
||||
<% if topic.sticky? %>
|
||||
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<script>
|
||||
$(function(){if($("#contentmessage<%=topic.id %>").height()>55){$("#project_show_<%= topic.id%>").show();}});
|
||||
$(function(){if($("#contentmessage<%=topic.id %>").height()>182){$("#project_show_<%= topic.id%>").show();}});
|
||||
</script>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="project_board_content break_word" id="content_<%=topic.id%>">
|
||||
<div id="contentmessage<%=topic.id %>" class="upload_img">
|
||||
<%= topic.content %>
|
||||
<%= topic.content.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p style="display: none" id="project_show_<%= topic.id%>">
|
||||
<label id="expend_more_information<%= topic.id%>" onclick="show_more_reply('#content_<%=topic.id%>','#expend_more_information<%= topic.id%>','#arrow<%=topic.id%>');" value="show_more">[展开]</label>
|
||||
<p style="display: none;" id="project_show_<%= topic.id%>">
|
||||
<a id="expend_more_information<%= topic.id%>" style="color: #0781b4;" href="javascript:void(0)" onclick="show_more_reply('#content_<%=topic.id%>','#expend_more_information<%= topic.id%>','#arrow<%=topic.id%>');" value="show_more">[展开]</a>
|
||||
<span class="g-arr-down">
|
||||
<img id="arrow<%=topic.id%>" src="/images/jiantou.jpg" width="12" height="6" />
|
||||
</span>
|
||||
|
||||
</p>
|
||||
|
||||
<%= link_to_attachments_course topic, :author => false %>
|
||||
|
||||
<%= l(:label_activity_time)%>: <%= format_time topic.created_on %>
|
||||
|
||||
</div>
|
||||
<%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => "about_newtalk#{topic.id}",:class => ' c_dblue fr' %>
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<a href="javascript:void(0)" nhname="showbtn_reply" class="c_dblue fr" style="margin-right:10px;"><%= l(:button_reply) %></a>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
||||
</div><!--讨论主类容 end-->
|
||||
|
||||
<div class="talk_new ml15 mb10" id="about_newtalk<%=topic.id%>" style="display: none">
|
||||
<div class="talk_new ml15 mb10" nhname='about_talk' id="about_newtalk<%=topic.id%>" style="display: none">
|
||||
<ul>
|
||||
<%= render :partial => 'edit',locals: {:topic => topic} %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="talkWrapBox">
|
||||
<% reply = Message.new(:subject => "RE: #{@message.subject}")%>
|
||||
<% reply = Message.new(:subject => "RE: #{topic.subject}")%>
|
||||
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
<div class="talkWrapMsg" nhname="about_talk_reply" style="display: none;">
|
||||
<em class="talkWrapArrow"></em>
|
||||
<div class="cl"></div>
|
||||
<div class="talkConIpt ml15 mb10" style="display: none" name="containerxxoo" id="reply<%= topic.id %>">
|
||||
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
|
||||
|
||||
<div class="talkConIpt ml15 mb10" style="margin-left:30px;" id="reply<%= topic.id %>">
|
||||
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'},
|
||||
:html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
|
||||
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
||||
<%= toggle_link l(:button_cancel), "reply" + topic.id.to_s, :focus => 'message_content',:class => 'grey_btn fr ml10' %>
|
||||
<a href="javascript:(0)" name="submitbtn" class="blue_btn fr " style=""><%= l(:label_memo_create)%></a>
|
||||
|
||||
|
||||
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<div style="padding-top:5px;" class="fr">
|
||||
<a href="javascript:void(0)" nhname="cancelbtn" class="grey_btn fr ml10" style=""><%= l(:button_cancel)%></a>
|
||||
<a href="javascript:void(0)" nhname="submitbtn" class="blue_btn fr " style=""><%= l(:button_submit)%></a>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% replies_all = topic.children.
|
||||
includes(:author, :attachments, {:board => :project}).
|
||||
reorder("#{Message.table_name}.id asc").offset(2).
|
||||
all %>
|
||||
<% replies_show = topic.children.
|
||||
includes(:author, :attachments, {:board => :project}).
|
||||
reorder("#{Message.table_name}.id asc").limit(2).
|
||||
all %>
|
||||
<% unless replies_show.empty? %>
|
||||
<% reply_count = 0 %>
|
||||
<div class="talkWrapMsg">
|
||||
<ul>
|
||||
<% replies_show.each do |message| %>
|
||||
|
||||
<li>
|
||||
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
|
||||
<div class="Msg_txt">
|
||||
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
||||
<br/>
|
||||
<p class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></p>
|
||||
|
||||
<br/>
|
||||
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>
|
||||
<%= link_to(
|
||||
|
||||
l(:button_delete),
|
||||
{:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete),
|
||||
:class => ' c_dblue fr'
|
||||
) if message.course_destroyable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
l(:button_quote),
|
||||
{:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
|
||||
:class => ' c_dblue fr',
|
||||
:style => 'margin-right: 10px;',
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:onclick => "$('#reply#{topic.id}').slideToggle(); return false;",
|
||||
:focus => "about_newtalk#{topic.id}",
|
||||
:title => l(:button_quote)) if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
||||
</li><!---留言内容-->
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="talkWrapMsg" id="talkWrapMsg<%= topic.id %>" style="display: none">
|
||||
<% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).
|
||||
reorder("#{Message.table_name}.id desc").all %>
|
||||
<% unless replies_all.empty? %>
|
||||
<div class="talkWrapMsg" nhname="nh_reply_div" id="nh_reply_div_<%= topic.id %>">
|
||||
<ul>
|
||||
<% replies_all_i = 0 %>
|
||||
<% replies_all.each do |message| %>
|
||||
|
||||
<li>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>">
|
||||
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
|
||||
<div class="Msg_txt">
|
||||
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
||||
<br/>
|
||||
<p class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></p>
|
||||
|
||||
<br/>
|
||||
<div class="fl break_word"><%= textAreailizable message,:content,:attachments => message.attachments %></div>
|
||||
<input nhname="nh_content_val" type="hidden" value="<%= message.content %>"/>
|
||||
<br/><div class="cl"></div>
|
||||
<span class=" c_grey fl"><%= format_time(message.created_on) %></span>
|
||||
<%= link_to(
|
||||
|
||||
|
@ -180,31 +131,29 @@
|
|||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete),
|
||||
|
||||
:class => ' c_dblue fr'
|
||||
) if message.course_destroyable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
l(:button_quote),
|
||||
{:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:focus => "about_newtalk#{topic.id}",
|
||||
l(:button_reply),
|
||||
'javascript:;',
|
||||
:nhname =>'showbtn_child_reply',
|
||||
:class => ' c_dblue fr',
|
||||
:style => 'margin-right: 10px;',
|
||||
:title => l(:button_quote)) if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
</li><!---留言内容-->
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<%if replies_all.first %>
|
||||
<div class="talkWrapMsg"><a class=" c_blue ml258" id="showgithelp<%= topic.id%>" value="show_help" onclick ="showhelpAndScrollToMessage('talkWrapMsg<%= topic.id %>','#showgithelp<%= topic.id%>','<%=topic.replies_count%>'); " class="c_dblue lh23">展开回复(<%= topic.replies_count.to_s%>)</a></div>
|
||||
<%if topic.replies_count>2 %>
|
||||
<div class="talkWrapMsg">
|
||||
<a nhname="reply_ex_btn" data-count="<%= topic.replies_count %>" data-init="0" href="javascript:void(0)" class="ml258 c_dblue lh23">展开回复(<%= topic.replies_count.to_s%>)</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
|
@ -217,54 +166,86 @@
|
|||
<%# other_formats_links do |f| %>
|
||||
<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<%# end %>
|
||||
|
||||
<% html_title @board.name %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
|
||||
<% end %>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
// var flag = false;
|
||||
// jQuery(document).ready(function($) {
|
||||
// transpotUrl('#content');
|
||||
// });
|
||||
function submit_message_replay()
|
||||
{
|
||||
if(flag)
|
||||
{
|
||||
$("#message_form").submit();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div style="display:none;"><a href="#" id="nhjump"></a></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//submitProjectsBoard()
|
||||
$(function(){
|
||||
$(".talkmain_box").each(function(){
|
||||
var target = $("li[nhname='reply_rec']",$(this));
|
||||
var btn = $("a[nhname='reply_ex_btn']",$(this));
|
||||
var jumpobj = $("div[nhname='nh_reply_div']",$(this));
|
||||
btn.click(function(){
|
||||
if($(this).data('init')=='0'){
|
||||
$(this).data('init',1);
|
||||
$(this).html('收起回复('+$(this).data('count')+')');
|
||||
target.show();
|
||||
}else{
|
||||
$(this).data('init',0);
|
||||
$(this).html('展开回复('+$(this).data('count')+')');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
$("#nhjump").attr('href','#'+jumpobj.attr('id'));
|
||||
$("#nhjump")[0].click();
|
||||
}
|
||||
});
|
||||
});
|
||||
KindEditor.ready(function(K){
|
||||
$("div[name='containerxxoo']").each(function(){
|
||||
$("div[nhname='container_board']").each(function(){
|
||||
var container = $(this);
|
||||
|
||||
var textarea= $("textarea[name='content']",container);
|
||||
var editor = K.create(textarea, {
|
||||
resizeType : 1,
|
||||
allowPreviewEmoticons : false,
|
||||
allowImageUpload : false,
|
||||
width:"89%",
|
||||
items : ['emoticons']
|
||||
var about_talk = $("div[nhname='about_talk']",container);
|
||||
var params = ({
|
||||
kindutil:K,
|
||||
showbtn:$("a[nhname='showbtn']",container),
|
||||
about_talk:about_talk,
|
||||
inputsubject:$("input[nhname='inputsubject']",about_talk),
|
||||
subjectmsg:$("p[nhname='subjectmsg']",about_talk),
|
||||
textarea:$("textarea[nhname='textarea']",about_talk),
|
||||
contentmsg:$("p[nhname='contentmsg']",about_talk),
|
||||
submitbtn:$("a[nhname='submitbtn']",about_talk),
|
||||
cancelbtn:$("a[nhname='cancelbtn']",about_talk),
|
||||
form:$("form[nhname='form']",about_talk),
|
||||
toolbar_container:$("div[nhname='toolbar_container']",about_talk),
|
||||
init_content_val:$("input[nhname='init_content_val']",about_talk)
|
||||
});
|
||||
|
||||
$("a[name='submitbtn']",container).click(function(){
|
||||
textarea[0].value = editor.html();
|
||||
var id = textarea[0].id.toString().substr(15);
|
||||
|
||||
if(this.parentNode.name == 'message-form') {
|
||||
this.parentNode.submit();
|
||||
nh_init_board(params);
|
||||
});
|
||||
$("div[mhname='container_board_reply']").each(function(){
|
||||
var container = $(this);
|
||||
var about_talk = $("div[nhname='about_talk_reply']",container);
|
||||
var params = {
|
||||
type:'reply',
|
||||
kindutil:K,
|
||||
showbtn:$("a[nhname='showbtn_reply']",container),
|
||||
showbtn_child:$("a[nhname='showbtn_child_reply']",container),
|
||||
about_talk:about_talk,
|
||||
inputsubject:$("input[nhname='inputsubject']",about_talk),
|
||||
subjectmsg:$("p[nhname='subjectmsg']",about_talk),
|
||||
textarea:$("textarea[nhname='textarea']",about_talk),
|
||||
contentmsg:$("p[nhname='contentmsg']",about_talk),
|
||||
submitbtn:$("a[nhname='submitbtn']",about_talk),
|
||||
cancelbtn:$("a[nhname='cancelbtn']",about_talk),
|
||||
form:$("form[nhname='form']",about_talk),
|
||||
quote_show:$("div[nhname='quote_show']",about_talk),
|
||||
quote_input:$("textarea[nhname='quote_input']",about_talk),
|
||||
toolbar_container:$("div[nhname='toolbar_container']",about_talk),
|
||||
jumphref:$("#nhjump")
|
||||
};
|
||||
params.get_ref_str_call=function(btn){
|
||||
var div = btn.parent('div');
|
||||
var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'</blockquote>';
|
||||
return str;
|
||||
}
|
||||
else
|
||||
this.parentNode.parentNode.submit();
|
||||
nh_init_board(params);
|
||||
});
|
||||
|
||||
<% if(!@flag.nil? && @flag=='true') %>
|
||||
if($("#new_topic_btn")!=undefined)$("#new_topic_btn").click();
|
||||
<% end %>
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -1,3 +1,13 @@
|
|||
<style>
|
||||
.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
.ke-toolbar-icon-url{background-image:url( '/images/public_icon.png' )}
|
||||
.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
.ke-toolbar .ke-outline{border:none;}
|
||||
.break_word {width:100%;}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
//头部导航
|
||||
var menuids=["TopUserNav"] //Enter id(s) of SuckerTree UL menus, separated by commas
|
||||
|
@ -21,54 +31,182 @@
|
|||
else if (window.attachEvent)
|
||||
window.attachEvent("onload", buildsubmenus)
|
||||
</script>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor-min" %>
|
||||
|
||||
<script type="text/javascript">//侧导航
|
||||
|
||||
window.onload = function () {
|
||||
var topic_id = getParam('topic_id');
|
||||
document.getElementById(topic_id).focus();
|
||||
}
|
||||
|
||||
var getParam = function(name){
|
||||
var search = document.location.search;
|
||||
var pattern = new RegExp("[?&]"+name+"\=([^&]+)", "g");
|
||||
var matcher = pattern.exec(search);
|
||||
var items = null;
|
||||
if(null != matcher){
|
||||
try{
|
||||
items = decodeURIComponent(decodeURIComponent(matcher[1]));
|
||||
}catch(e){
|
||||
try{
|
||||
items = decodeURIComponent(matcher[1]);
|
||||
}catch(e){
|
||||
items = matcher[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
return items;
|
||||
};
|
||||
|
||||
function show_newtalk()
|
||||
{
|
||||
$("#about_newtalk").toggle();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function show_newtalk1(id)
|
||||
{
|
||||
$(id).toggle();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<% if @project %>
|
||||
<%= render :partial => 'project_show', locals: {project: @project} %>
|
||||
<% elsif @course %>
|
||||
<%= render :partial => 'course_show', locals: {course: @course} %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<script type="text/javascript">//侧导航
|
||||
|
||||
//window.onload = function () {
|
||||
// var topic_id = getParam('topic_id');
|
||||
// document.getElementById(topic_id).focus();
|
||||
//}
|
||||
//
|
||||
//var getParam = function(name){
|
||||
// var search = document.location.search;
|
||||
// var pattern = new RegExp("[?&]"+name+"\=([^&]+)", "g");
|
||||
// var matcher = pattern.exec(search);
|
||||
// var items = null;
|
||||
// if(null != matcher){
|
||||
// try{
|
||||
// items = decodeURIComponent(decodeURIComponent(matcher[1]));
|
||||
// }catch(e){
|
||||
// try{
|
||||
// items = decodeURIComponent(matcher[1]);
|
||||
// }catch(e){
|
||||
// items = matcher[1];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return items;
|
||||
//};
|
||||
//
|
||||
//function show_newtalk()
|
||||
//{
|
||||
// $("#about_newtalk").toggle();
|
||||
//
|
||||
//
|
||||
//
|
||||
//}
|
||||
//
|
||||
//function show_newtalk1(id)
|
||||
//{
|
||||
// $(id).toggle();
|
||||
// $(id).focus();
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.subject!=undefined){
|
||||
if($.trim(params.subject.val()) == ""){
|
||||
params.subjectmsg.html('主题不能为空');
|
||||
params.subjectmsg.css({color:'#ff0000'});
|
||||
result=false;
|
||||
}else{
|
||||
params.subjectmsg.html('填写正确');
|
||||
params.subjectmsg.css({color:'#008000'});
|
||||
}
|
||||
params.subjectmsg.show();
|
||||
}
|
||||
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
function nh_init_board(params){
|
||||
//发帖/编辑/回复按钮的click
|
||||
params.showbtn.click(function(){
|
||||
if(params.textarea.data('init') == undefined){
|
||||
//初始化编辑器
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,
|
||||
allowPreviewEmoticons : false,
|
||||
allowImageUpload : false,
|
||||
minWidth:"1px",
|
||||
width:"565px",
|
||||
items : ['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.about_talk);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
});
|
||||
|
||||
//主题输入框按键事件
|
||||
params.inputsubject.keyup(function(){
|
||||
nh_check_field({subject:params.inputsubject,subjectmsg:params.subjectmsg});
|
||||
})
|
||||
//表单提交
|
||||
params.form.submit(function(){
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
subject:params.inputsubject,
|
||||
subjectmsg:params.subjectmsg,
|
||||
content:editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea
|
||||
});
|
||||
if(is_checked){
|
||||
//return true 居然不提交 fuck your sister
|
||||
$(this)[0].submit();
|
||||
// return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
//提交按钮click
|
||||
params.submitbtn.click(function(){
|
||||
params.form.submit();
|
||||
});
|
||||
//取消按钮click
|
||||
params.cancelbtn.click(function(){
|
||||
params.about_talk.toggle();//显示/隐藏编辑区
|
||||
if(params.about_talk.is(':hidden')){//隐藏时reset表单数据
|
||||
params.form[0].reset();
|
||||
if(params.type=='reply'){
|
||||
params.textarea.empty();
|
||||
}else{
|
||||
params.textarea.html(params.init_content_val.val());
|
||||
}
|
||||
var str = params.textarea.html();
|
||||
str=str.replace(new RegExp(/</g),'<');
|
||||
str=str.replace(new RegExp(/>/g),'>');
|
||||
editor.html(str);
|
||||
params.subjectmsg.hide();
|
||||
params.contentmsg.hide();
|
||||
if(params.quote_show!=undefined)params.quote_show.empty();
|
||||
if(params.quote_input!=undefined)params.quote_input.empty();
|
||||
}else{
|
||||
if(params.type=='reply'){
|
||||
params.jumphref.attr('href','#'+params.form.attr('id'));
|
||||
params.jumphref[0].click();
|
||||
}else params.inputsubject.focus();
|
||||
}
|
||||
});
|
||||
params.textarea.data('init','1');//标记为已经初始化
|
||||
}
|
||||
params.cancelbtn.click();//显示/隐藏编辑区
|
||||
});
|
||||
if(params.type == 'reply'){
|
||||
params.showbtn_child.click(function(){
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.showbtn.click();
|
||||
}else{
|
||||
params.cancelbtn.click();
|
||||
if(params.about_talk.is(':hidden')){
|
||||
params.cancelbtn.click();
|
||||
}
|
||||
}
|
||||
var ref_str = params.get_ref_str_call($(this));
|
||||
params.quote_show.html(ref_str);
|
||||
params.quote_input.html(ref_str);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
|
@ -31,7 +31,7 @@
|
|||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<script>
|
||||
$(function(){if($("#bid_description_<%= bid.id%>_content").height()>38){$("#bid_show_more_des_button<%= bid.id%>").show();}});
|
||||
$(function(){if($("#bid_description_<%= bid.id%>_content").height()>360){$("#bid_show_more_des_button<%= bid.id%>").show();}});
|
||||
</script>
|
||||
<div id="bid_description_<%= bid.id%>" class="news_description mt5">
|
||||
<div id="bid_description_<%= bid.id%>_content" class="upload_img">
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<%= render :partial => "layouts/base_feedback" %>
|
||||
<div id="top-menu" style="background-color: #15bccf;height:40px;margin-top: 10px;margin-bottom: 10px;">
|
||||
|
||||
<div class="welcome_logo">
|
||||
<%=link_to image_tag("/images/logo.png",weight:"36px", height: "36px")%>
|
||||
</div>
|
||||
<div id="account">
|
||||
<%= render_menu :account_menu -%>
|
||||
</div>
|
||||
|
||||
<% if User.current.logged? -%>
|
||||
<div id="loggedas">
|
||||
<ul style="padding:0 0; margin:0 0;display:inline;">
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
<%=link_to l(:label_my_course), user_courses_user_path(User.current.id) %>
|
||||
<ul class="course_sub_menu">
|
||||
<% course_index = 0 %>
|
||||
|
||||
<% User.current.courses.each do |course| %>
|
||||
<% if !course_endTime_timeout?(course) %>
|
||||
<%= render :partial => 'layouts/user_homework_list', :locals => {:course => course,:course_index => course_index} %>
|
||||
<% course_index += 1 %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
|
@ -23,6 +23,7 @@
|
|||
<!--add by huang-->
|
||||
<body>
|
||||
<div id="Container">
|
||||
|
||||
<%= render :partial => 'layouts/new_header'%>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
@ -50,6 +51,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div><!--TopBar end-->
|
||||
|
||||
<div id="content">
|
||||
<div id="LSide" class="fl">
|
||||
<div class="project_info">
|
||||
|
@ -115,6 +117,7 @@
|
|||
<% end %><!--end-->
|
||||
<!--menu 左侧工具栏 -->
|
||||
<%#--project_new_type: 1为开发组;2为科研组;3为朋友圈子--%>
|
||||
|
||||
<div id="project_memu_list">
|
||||
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
|
||||
<%= render :partial => 'projects/development_group', :locals => {:project => @project, :attaments_num => attaments_num} %>
|
||||
|
@ -124,6 +127,7 @@
|
|||
<%= render :partial => 'projects/friend_group', :locals => {:project => @project, :attaments_num => attaments_num} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!-- end -->
|
||||
</div><!--项目侧导航 end-->
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
<title><%=h html_title %></title>
|
||||
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
||||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= stylesheet_link_tag 'public', 'pleft', 'project', :media => 'all' %>
|
||||
|
||||
<%= javascript_include_tag "jquery.leanModal.min" %>
|
||||
<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%>
|
||||
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
|
@ -18,32 +17,26 @@
|
|||
<!-- page specific tags -->
|
||||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<body class="<%=h body_css_classes %>">
|
||||
<div id="wrapper">
|
||||
<div id="wrapper2">
|
||||
<div id="wrapper3">
|
||||
<%=render :partial => 'layouts/base_header'%>
|
||||
<body id="Container">
|
||||
<div id="Container">
|
||||
<%= render :partial => 'layouts/new_header' %>
|
||||
<div class="cl"></div>
|
||||
<div id="main" class="nosidebar">
|
||||
<div id="content_">
|
||||
<%= render_flash_messages %>
|
||||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
<div style="clear:both;"></div>
|
||||
<%=render :partial => 'layouts/base_footer'%>
|
||||
<%=render :partial => 'layouts/new_footer'%>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
<span>
|
||||
<%= l(:label_loading) %>
|
||||
</span>
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<%= call_hook :view_layouts_base_body_bottom %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<% end %>
|
||||
|
||||
<div class="resource_sum" id="IE_resource_sum_css">
|
||||
<% @attach_array.each do |k|%>
|
||||
<% @attach_array.each_with_index do |k, index|%>
|
||||
<div class="line_block" >
|
||||
<p>
|
||||
<%= @str_arr.shift %>
|
||||
<%= @str_arr[index] %>
|
||||
</p>
|
||||
|
||||
<div class="table1">
|
||||
|
@ -24,10 +24,12 @@
|
|||
</div>
|
||||
|
||||
<div class="table1">
|
||||
<% if index == 2%>
|
||||
<% k.each do |c1|%>
|
||||
<div class="table_row1 <%= cycle 'odd', 'even' %>">
|
||||
<div class="filename table_cell1 filename1" >
|
||||
<%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
|
||||
|
||||
<%= link_to_attachment c1, {:download => true}%>
|
||||
</div>
|
||||
<div class="table_cell1 filedown1">
|
||||
<%= c1.downloads %>
|
||||
|
@ -37,6 +39,23 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end -%>
|
||||
<%else%>
|
||||
<% k.each do |c1|%>
|
||||
<div class="table_row1 <%= cycle 'odd', 'even' %>">
|
||||
<div class="filename table_cell1 filename1" >
|
||||
<%= link_to c1.filename, (attachFromUrl c1), {:title => c1.filename, :target => "_blank"} %>
|
||||
|
||||
</div>
|
||||
<div class="table_cell1 filedown1">
|
||||
<%= c1.downloads %>
|
||||
</div>
|
||||
<div class="table_cell1 downicon1 filename download_icon" >
|
||||
<%= link_to_attachment c1, {:download => true, :text => image_tag("/images/button/download.png", width: "22px", alt: l(:button_download)) }%>
|
||||
</div>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<%= link_to course.school.name.try(:gsub, /(.+)$/, '\1'), options={:action => 'course', :school_id => course.school.id}, html_options={:method => 'get'} %>
|
||||
<% end %>
|
||||
(<%= course.members.count %>人)
|
||||
<% files_count = course.attachments.count %>
|
||||
<% files_count = visable_attachemnts_incourse(course).count %>
|
||||
<% if files_count > 0%>
|
||||
(<%= link_to "#{files_count.to_s}份", course_files_path(course) %>公开资料)
|
||||
<% end %>
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
<%# User.current.logged? ? course_count = 9 : course_count = 10 %>
|
||||
<% course_count = 9 %>
|
||||
<% all_new_hot_course = find_all_new_hot_course(course_count, @school_id, year_now, course_term)%>
|
||||
|
||||
<% while all_new_hot_course.count < course_count%>
|
||||
<% if course_term == "春季学期"
|
||||
year_now -= 1
|
||||
|
@ -139,10 +140,13 @@
|
|||
<%break if Time.new.strftime("%Y").to_i - year_now >= 2%>
|
||||
<% all_new_hot_course += find_all_new_hot_course(course_count-all_new_hot_course.count, @school_id, year_now, course_term)%>
|
||||
<% end%>
|
||||
<% cache all_new_hot_course.max().created_at do %>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% else %>
|
||||
|
||||
<% if cur_school_course.count < 9 %>
|
||||
<span>
|
||||
<%= render :partial => 'more_course', :locals => {:school_id => nil}%>
|
||||
|
@ -160,6 +164,7 @@
|
|||
<%= render :partial => 'no_course_title', :locals => {:course_title => l(:label_school_less_course)} %>
|
||||
</li>
|
||||
<% all_new_hot_course = find_all_new_hot_course(9-cur_school_course.count, @school_id, year_now, course_term)%>
|
||||
|
||||
<% while (all_new_hot_course.count + cur_school_course.count) < 9%>
|
||||
<% if course_term == "春季学期"
|
||||
year_now -= 1
|
||||
|
@ -170,10 +175,13 @@
|
|||
<%break if Time.new.strftime("%Y").to_i - year_now >= 2%>
|
||||
<% all_new_hot_course += find_all_new_hot_course(9-(all_new_hot_course.count + cur_school_course.count), @school_id, year_now, course_term)%>
|
||||
<% end%>
|
||||
<% cache all_new_hot_course.max().created_at do %>
|
||||
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
@ -186,10 +194,12 @@
|
|||
|
||||
</h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"><%= link_to "更多>>", forums_path %></span>
|
||||
|
||||
<% topics = find_new_forum_topics(10) %>
|
||||
<%# cache topics.maximum(:created_at) do%>
|
||||
<div class="d-p-projectlist-box">
|
||||
<ul class="d-p-projectlist">
|
||||
<% find_new_forum_topics(10).each do |topic| %>
|
||||
|
||||
<% topics.each do |topic| %>
|
||||
<li class="message-brief-intro" style="min-height: 65px; line-height:2em; border-bottom: 1px dashed; padding-bottom: 3px">
|
||||
<div style="display: inline-block; width: 100%;">
|
||||
<span class="memo_activity text_nowrap" title="<%= topic.subject%>"
|
||||
|
@ -220,8 +230,10 @@
|
|||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<%# end %>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</div>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
|
||||
<% cache :expire_in => 2.hours do%>
|
||||
<div id="J_Slide" class="d-p-index-box d-p-index-hot">
|
||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong> <%= l(:lable_hot_projects)%> </strong></h3>
|
||||
<span style="margin-top: -20px;float: right; display: block;"> <% if User.current.logged? %>
|
||||
|
@ -113,7 +113,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<div class="right" style="float: right; width: 48%; padding-top: 8px;">
|
||||
<ul class="welcome-message-list">
|
||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
||||
|
@ -123,6 +123,7 @@
|
|||
</div>
|
||||
<div class="welcome-box-list-new memo_activity">
|
||||
<% topics = find_new_forum_topics(12) %>
|
||||
<% cache topics.maximum(:created_at) do%>
|
||||
<% topics.includes(:forum, :last_reply, :author).each do |topic|%>
|
||||
<li class="message-brief-intro" style="line-height:1.4em;">
|
||||
<div class='memo_title text_nowrap'>
|
||||
|
@ -151,6 +152,7 @@
|
|||
</span>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</ul>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
if Rails.env.production?
|
||||
config.cache_store = :redis_store, 'redis://localhost:6379/0/cache', { expires_in: 90.minutes }
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
# Copy this file to additional_environment.rb and add any statements
|
||||
# that need to be passed to the Rails::Initializer. `config` is
|
||||
# available in this context.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# config.log_level = :debug
|
||||
# ...
|
||||
#
|
||||
|
|
@ -31,7 +31,7 @@ module RedmineApp
|
|||
end
|
||||
# Custom directories with classes and modules you want to be autoloadable.
|
||||
config.autoload_paths += %W(#{config.root}/lib)
|
||||
|
||||
config.autoload_paths += %w(#{RAILS_ROOT}/app/sweepers)
|
||||
# Only load the plugins named here, in the order given (default is alphabetical).
|
||||
# :all can be used as a placeholder for all plugins not explicitly named.
|
||||
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
||||
|
|
|
@ -90,7 +90,6 @@ default:
|
|||
user_name: "huang.jingquan@163.com"
|
||||
password: 'xinhu1ji2qu366'
|
||||
|
||||
cookie_domain: ".trustie.net"
|
||||
# Absolute path to the directory where attachments are stored.
|
||||
# The default is the 'files' directory in your Redmine instance.
|
||||
# Your Redmine instance needs to have write permission on this
|
||||
|
@ -104,7 +103,7 @@ default:
|
|||
# autologin_cookie_name: the name of the cookie (default: autologin)
|
||||
# autologin_cookie_path: the cookie path (default: /)
|
||||
# autologin_cookie_secure: true sets the cookie secure flag (default: false)
|
||||
autologin_cookie_name:
|
||||
autologin_cookie_name: "autologin_trustie"
|
||||
autologin_cookie_path:
|
||||
autologin_cookie_secure:
|
||||
|
||||
|
@ -201,7 +200,7 @@ default:
|
|||
# specific configuration options for production environment
|
||||
# that overrides the default ones
|
||||
production:
|
||||
# CJK support
|
||||
cookie_domain: ".trustie.net"
|
||||
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||
email_delivery:
|
||||
delivery_method: :smtp
|
||||
|
|
|
@ -10,8 +10,9 @@ RedmineApp::Application.configure do
|
|||
config.logger = Logger.new('log/development.log', 'daily') # daily, weekly or monthly
|
||||
# Show full error reports and disable caching
|
||||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
config.action_controller.perform_caching = true
|
||||
config.cache_store = :file_store, "#{Rails.root }/files/cache_store/"
|
||||
#config.cache_store = :dalli_store
|
||||
# Don't care if the mailer can't send
|
||||
config.action_mailer.raise_delivery_errors = true
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
$redis = Redis.new(:host => "127.0.0.1", :port => 6379)
|
|
@ -342,6 +342,7 @@ zh:
|
|||
label_invite_trustie_user_tips: "输入姓名、邮箱、昵称"
|
||||
label_user_role_null: 用户和角色不能留空!
|
||||
label_invite_project: 邀请您加入项目
|
||||
label_mail_invite_success: 您已成功加入项目!
|
||||
label_invite_success: 邀请成功
|
||||
label_invite_members: 邀请用户
|
||||
#
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
class CreateInviteLists < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :invite_lists do |t|
|
||||
t.integer :project_id
|
||||
t.integer :user_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
17
db/schema.rb
17
db/schema.rb
|
@ -438,13 +438,6 @@ ActiveRecord::Schema.define(:version => 20150514133640) do
|
|||
|
||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||
|
||||
create_table "discuss_demos", :force => true do |t|
|
||||
t.string "title"
|
||||
t.text "body"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "documents", :force => true do |t|
|
||||
t.integer "project_id", :default => 0, :null => false
|
||||
t.integer "category_id", :default => 0, :null => false
|
||||
|
@ -659,16 +652,6 @@ ActiveRecord::Schema.define(:version => 20150514133640) do
|
|||
|
||||
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
|
||||
|
||||
create_table "journal_details_copy", :force => true do |t|
|
||||
t.integer "journal_id", :default => 0, :null => false
|
||||
t.string "property", :limit => 30, :default => "", :null => false
|
||||
t.string "prop_key", :limit => 30, :default => "", :null => false
|
||||
t.text "old_value"
|
||||
t.text "value"
|
||||
end
|
||||
|
||||
add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
|
||||
|
||||
create_table "journal_replies", :id => false, :force => true do |t|
|
||||
t.integer "journal_id"
|
||||
t.integer "user_id"
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 12 KiB |
|
@ -67,15 +67,34 @@ function show_more_reply(contentid, id2, id3) {
|
|||
if (val == "show_more") {
|
||||
$(id2).text("[收起]");
|
||||
information.attr("value", "hide_more");
|
||||
information.attr("style", "color:#3ca5c6");
|
||||
arrow.attr("src", "/images/jiantouup.jpg")
|
||||
}
|
||||
else {
|
||||
$(id2).text("[展开]");
|
||||
information.attr("value", "show_more");
|
||||
arrow.attr("src", "/images/jiantou.jpg")
|
||||
information.attr("style", "color:#0781b4;");
|
||||
}
|
||||
}
|
||||
function show_more_reply1(contentid, id2, id3) {
|
||||
$(contentid).toggleClass("course_description_none");
|
||||
var information = $(id2);
|
||||
var arrow = $(id3);
|
||||
var val = information.attr("value");
|
||||
if (val == "show_more") {
|
||||
$(id2).text("[收起]");
|
||||
information.attr("value", "hide_more");
|
||||
information.attr("style", "color:#3ca5c6");
|
||||
arrow.attr("src", "/images/jiantouup.jpg")
|
||||
}
|
||||
else {
|
||||
$(id2).text("[展开]");
|
||||
information.attr("value", "show_more");
|
||||
arrow.attr("src", "/images/jiantou.jpg")
|
||||
information.attr("style", "color:#0781b4;");
|
||||
}
|
||||
}
|
||||
|
||||
//项目版本库git帮助文档显示
|
||||
function showhelpAndScrollTo(id) {
|
||||
$('#' + id).toggle();
|
||||
|
@ -116,11 +135,13 @@ function showhelpAndScrollToMessage(id, id1, count) {
|
|||
{
|
||||
$(id1).text("收起回复(" + count + ")" );
|
||||
information.attr("value", "hide_help");
|
||||
information.attr("style", "color:#3ca5c6");
|
||||
}
|
||||
else
|
||||
{
|
||||
$(id1).text("展开回复(" + count + ")");
|
||||
information.attr("value", "show_help");
|
||||
information.attr("style", "color:#0781b4;");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ a:hover.project_name{ color:#016f33;}
|
|||
a.project_txt02{ color:#0781b4; width:618px; display:block; float:left; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
a:hover.project_txt{ color:#066e9a;}
|
||||
.noline{ border-bottom:none;}
|
||||
.news_description{max-height: 38px;overflow:hidden; }
|
||||
.news_description{max-height: 360px;overflow:hidden; }
|
||||
.news_description_none{max-height: none;}
|
||||
a.news_foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:600px; height:20px; padding-top:3px; cursor:pointer;}
|
||||
a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
|
||||
|
|
|
@ -45,7 +45,8 @@ a:hover.subnav_green{ background:#14ad5a;}
|
|||
/*简介*/
|
||||
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
|
||||
.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;}
|
||||
.project_board_content{overflow: hidden;max-height: 55px;word-break: break-all;word-wrap: break-word;}
|
||||
.project_board_content{overflow: hidden;max-height: 182px;word-break: break-all;word-wrap: break-word;}
|
||||
.project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;}
|
||||
.course_description_none{max-height: none;}
|
||||
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;}
|
||||
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
|
||||
|
|
|
@ -49,7 +49,8 @@ a:hover.subnav_green{ background:#14ad5a;}
|
|||
/*简介*/
|
||||
.project_intro{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; color:#6d6d6d; line-height:1.9;}
|
||||
.course_description{max-height: 112px;overflow:hidden; word-break: break-all;word-wrap: break-word;}
|
||||
.project_board_content{overflow: hidden;max-height: 55px;word-break: break-all;word-wrap: break-word;}
|
||||
.project_board_content{overflow: hidden;max-height: 182px;word-break: break-all;word-wrap: break-word;}
|
||||
.project_board_content1{overflow: hidden;max-height: 72px;word-break: break-all;word-wrap: break-word;}
|
||||
.course_description_none{max-height: none;}
|
||||
.lg-foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:220px; height:23px; cursor:pointer;display: none;}
|
||||
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
FactoryGirl.define do
|
||||
factory :invite_list do
|
||||
project_id 1
|
||||
user_id 1
|
||||
end
|
||||
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe InviteList, :type => :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Loading…
Reference in New Issue