Merge branch 'szzh' into develop
This commit is contained in:
commit
a337f06a69
|
@ -27,7 +27,7 @@ class AccountController < ApplicationController
|
|||
if request.get?
|
||||
@login = params[:login] || true
|
||||
if User.current.logged?
|
||||
redirect_to home_url
|
||||
redirect_to user_path(User.current)
|
||||
else
|
||||
render :layout => 'login'
|
||||
end
|
||||
|
@ -58,7 +58,7 @@ class AccountController < ApplicationController
|
|||
|
||||
# Lets user choose a new password
|
||||
def lost_password
|
||||
(redirect_to(home_url); return) unless Setting.lost_password?
|
||||
(redirect_to(signin_path); return) unless Setting.lost_password?
|
||||
if params[:token]
|
||||
@token = Token.find_token("recovery", params[:token].to_s)
|
||||
if @token.nil? || @token.expired?
|
||||
|
@ -110,7 +110,7 @@ class AccountController < ApplicationController
|
|||
|
||||
# User self-registration
|
||||
def register
|
||||
(redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration]
|
||||
(redirect_to(signin_path); return) unless Setting.self_registration? || session[:auth_source_registration]
|
||||
if request.get?
|
||||
session[:auth_source_registration] = nil
|
||||
@user = User.new(:language => current_language.to_s)
|
||||
|
@ -187,11 +187,11 @@ class AccountController < ApplicationController
|
|||
|
||||
# Token based account activation
|
||||
def activate
|
||||
(redirect_to(home_url); return) unless Setting.self_registration? && params[:token].present?
|
||||
(redirect_to(signin_path); return) unless Setting.self_registration? && params[:token].present?
|
||||
token = Token.find_token('register', params[:token].to_s)
|
||||
(redirect_to(home_url); return) unless token and !token.expired?
|
||||
(redirect_to(signin_path); return) unless token and !token.expired?
|
||||
user = token.user
|
||||
(redirect_to(home_url); return) unless user.registered?
|
||||
(redirect_to(signin_path); return) unless user.registered?
|
||||
user.activate
|
||||
if user.save
|
||||
token.destroy
|
||||
|
@ -278,7 +278,7 @@ class AccountController < ApplicationController
|
|||
user = User.find_or_initialize_by_identity_url(identity_url)
|
||||
if user.new_record?
|
||||
# Self-registration off
|
||||
(redirect_to(home_url); return) unless Setting.self_registration?
|
||||
(redirect_to(signin_path); return) unless Setting.self_registration?
|
||||
|
||||
# Create on the fly
|
||||
user.login = registration['nickname'] unless registration['nickname'].nil?
|
||||
|
@ -365,14 +365,15 @@ class AccountController < ApplicationController
|
|||
|
||||
def invalid_credentials
|
||||
logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} at #{Time.now.utc}"
|
||||
flash.now[:error] = l(:notice_account_invalid_creditentials)
|
||||
render :layout => 'login'
|
||||
flash[:error] = l(:notice_account_invalid_creditentials)
|
||||
# render :layout => 'login'
|
||||
redirect_to signin_path(:login=>true)
|
||||
end
|
||||
|
||||
def invalid_credentials_new
|
||||
logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} at #{Time.now.utc}"
|
||||
flash.now[:error] = l(:notice_account_invalid_creditentials_new)
|
||||
render :layout => 'login'
|
||||
flash[:error] = l(:notice_account_invalid_creditentials_new)
|
||||
render signin_path(:login=>true)
|
||||
end
|
||||
|
||||
# Register a user for email activation.
|
||||
|
|
|
@ -557,7 +557,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def redirect_back_or_default(default, options={})
|
||||
back_url = params[:back_url].to_s
|
||||
back_url = '' #params[:back_url].to_s
|
||||
if back_url.present?
|
||||
begin
|
||||
uri = URI.parse(back_url)
|
||||
|
|
|
@ -174,7 +174,7 @@ class MyController < ApplicationController
|
|||
logout_user
|
||||
flash.now[:notice] = l(:notice_account_deleted)
|
||||
end
|
||||
redirect_to home_url
|
||||
redirect_to signin_path
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ class SoftapplicationsController < ApplicationController
|
|||
@softapplication.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to home_url }
|
||||
format.html { redirect_to signin_path }
|
||||
format.json { head :no_content }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -627,14 +627,15 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
@type = params[:type]
|
||||
|
||||
user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
|
||||
user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','poll')"
|
||||
project_types = "('Message','Issue')"
|
||||
if @type
|
||||
case @type
|
||||
if params[:type].present?
|
||||
case params[:type]
|
||||
when "course_homework"
|
||||
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'HomeworkCommon'").order('created_at desc').limit(10).offset(@page * 10)
|
||||
when "course_news"
|
||||
|
@ -654,6 +655,7 @@ class UsersController < ApplicationController
|
|||
@user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids}) and act_type in #{course_types}").order('created_at desc').limit(10).offset(@page * 10)
|
||||
end
|
||||
# @user_activities = paginateHelper @user_activities,500
|
||||
@type = params[:type]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'new_base_user'}
|
||||
|
|
|
@ -27,7 +27,8 @@ class WelcomeController < ApplicationController
|
|||
|
||||
def index
|
||||
# 企业版定制: params[:project]为传过来的参数
|
||||
|
||||
redirect_to signin_path
|
||||
return
|
||||
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
|
||||
|
@ -171,7 +172,7 @@ class WelcomeController < ApplicationController
|
|||
redirect_to users_search_url(:name => search_condition, :search_by => search_by, :role => :student)
|
||||
else
|
||||
#redirect_to home_path, :alert => l(:label_sumbit_empty)
|
||||
(redirect_to home_url, :notice => l(:label_sumbit_empty);return) #if params[:name].blank?
|
||||
(redirect_to signin_path, :notice => l(:label_sumbit_empty);return) #if params[:name].blank?
|
||||
end
|
||||
}
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%= stylesheet_link_tag 'new_user'%>
|
||||
<%= stylesheet_link_tag 'leftside'%>
|
||||
|
||||
<script>
|
||||
<script type="text/javascript">
|
||||
|
||||
// $(document).ready(function(){
|
||||
// $("#loginSignButton").click(function(){
|
||||
|
@ -12,6 +12,20 @@
|
|||
// $("#signUpBox").css({display:"none"});
|
||||
// $("#loginInBox").css({display:"block"});
|
||||
// });
|
||||
// });
|
||||
// $(function(){
|
||||
// $("#username").keypress(function(e){
|
||||
// alert(11);
|
||||
// if (e.keyCode == '13') {
|
||||
// $('#main_login_form').submit();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// $("#password").keypress(function(e){
|
||||
// if (e.keyCode == '13') {
|
||||
// $('#main_login_form').submit();
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
$(document).ready(function(){
|
||||
|
@ -162,6 +176,12 @@
|
|||
|
||||
});
|
||||
});
|
||||
|
||||
function user_name_keypress(e){
|
||||
if (e.keyCode == '13') {
|
||||
$('#main_login_form').submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="loginContentContainer">
|
||||
<div class="loginContent">
|
||||
|
@ -186,7 +206,7 @@
|
|||
<%= back_url_hidden_field_tag %>
|
||||
<div class="mb20">
|
||||
<%= text_field_tag 'username', params[:username], :tabindex => '1' ,
|
||||
:class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称'%>
|
||||
:class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称', :onkeypress => "user_name_keypress(event);"%>
|
||||
<!--<input type="text" placeholder="请输入邮箱地址或昵称" class="loginSignBox" />-->
|
||||
</div>
|
||||
<% if Setting.openid? %>
|
||||
|
@ -196,7 +216,7 @@
|
|||
<% end %>
|
||||
<div>
|
||||
<!--<input type="text" placeholder="请输密码" class="loginSignBox" />-->
|
||||
<%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码'%>
|
||||
<%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%>
|
||||
</div>
|
||||
<div class="loginSignOption">
|
||||
<% if Setting.autologin? %>
|
||||
|
|
|
@ -33,12 +33,21 @@
|
|||
|
||||
$(function(){
|
||||
$("#navHomepageSearchInput").keypress(function(e){
|
||||
if (e.keyCode == '13') {
|
||||
var name = $.trim($('#navHomepageSearchInput').val());
|
||||
if (e.keyCode == '13' && name != "" && name.length != 0) {
|
||||
$('#type').val($('input[type=radio]:checked').val());
|
||||
$(this).parent().submit();
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function search_in_header(obj){
|
||||
var name = $.trim($('#navHomepageSearchInput').val());
|
||||
if (name != "" && name.length != 0) {
|
||||
$('#type').val($('input[type=radio]:checked').val());
|
||||
obj.parent().submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="fl" id="navHomepageSearch">
|
||||
<!--<form class="navHomepageSearchBox">-->
|
||||
|
@ -46,9 +55,10 @@
|
|||
|
||||
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
|
||||
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词进行搜索"/>
|
||||
<input type="hidden" name="search_type" id="type" value=""/>
|
||||
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#type').val($('input[type=radio]:checked').val());$(this).parent().submit();"></a>
|
||||
<% end %>
|
||||
<input type="hidden" name="search_type" id="type" value=""/>
|
||||
<input type="text" style="display: none;"/>
|
||||
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
|
||||
<% end %>
|
||||
<div class="navSearchTypeBox" id="navHomepageSearchType">
|
||||
<div class="fl mr15 mt8">
|
||||
<input type="radio" value="courses" name="search_type" checked/>
|
||||
|
|
|
@ -9,45 +9,53 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
function search(doc){
|
||||
//alert(1)
|
||||
// val = $('input:radio[name="search_type"]:checked').val();
|
||||
// alert(2)
|
||||
// $("#search_type").val(val);
|
||||
// alert(3)
|
||||
$(doc).parent().submit();
|
||||
}
|
||||
<% type = type%>
|
||||
$(function (){
|
||||
if('<%= type %>' != null && '<%= type %>' == 'courses' ){
|
||||
$('input:radio[value="courses"]').attr('checked','checked');
|
||||
}
|
||||
if('<%= type %>' != null && '<%= type %>' == 'projects' ){
|
||||
$('input:radio[value="projects"]').attr('checked','checked');
|
||||
}
|
||||
if('<%= type %>' != null && '<%= type %>' == 'users' ){
|
||||
$('input:radio[value="users"]').attr('checked','checked');
|
||||
}
|
||||
});
|
||||
<script>
|
||||
function search(doc){
|
||||
//alert(1)
|
||||
// val = $('input:radio[name="search_type"]:checked').val();
|
||||
// alert(2)
|
||||
// $("#search_type").val(val);
|
||||
// alert(3)
|
||||
$(doc).parent().submit();
|
||||
}
|
||||
<% type = type%>
|
||||
$(function (){
|
||||
if('<%= type %>' != null && '<%= type %>' == 'courses' ){
|
||||
$('input:radio[value="courses"]').attr('checked','checked');
|
||||
}
|
||||
if('<%= type %>' != null && '<%= type %>' == 'projects' ){
|
||||
$('input:radio[value="projects"]').attr('checked','checked');
|
||||
}
|
||||
if('<%= type %>' != null && '<%= type %>' == 'users' ){
|
||||
$('input:radio[value="users"]').attr('checked','checked');
|
||||
}
|
||||
});
|
||||
|
||||
$(function(){
|
||||
$("#navHomepageSearchInput").keypress(function(e){
|
||||
if (e.keyCode == '13') {
|
||||
$('#type').val($('input[type=radio]:checked').val());
|
||||
$(this).parent().submit();
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
function search_in_header(obj){
|
||||
var name = $.trim($('#navHomepageSearchInput').val());
|
||||
if (name != "" && name.length != 0) {
|
||||
$('#type').val($('input[type=radio]:checked').val());
|
||||
obj.parent().submit();
|
||||
}
|
||||
}
|
||||
|
||||
function search_in_header_I(e,obj){
|
||||
var name = $.trim($('#navHomepageSearchInput').val());
|
||||
if (e.keyCode == '13' && name != "" && name.length != 0) {
|
||||
$('#type').val($('input[type=radio]:checked').val());
|
||||
obj.parent().submit();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="fl" id="navHomepageSearch">
|
||||
<!--<form class="navHomepageSearchBox">-->
|
||||
<% name = name%>
|
||||
|
||||
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
|
||||
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词进行搜索" />
|
||||
<input type="hidden" name="search_type" id="type" value=""/>
|
||||
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#type').val($('input[type=radio]:checked').val());$(this).parent().submit();"></a>
|
||||
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="navHomepageSearchInput" placeholder="请输入关键词进行搜索" onkeypress="search_in_header_I(event,$(this));"/>
|
||||
<input type="hidden" name="search_type" id="type" value=""/>
|
||||
<input type="text" style="display: none;"/>
|
||||
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
|
||||
<% end %>
|
||||
<div class="navSearchTypeBox" id="navHomepageSearchType">
|
||||
<div class="fl mr15 mt8">
|
||||
|
|
|
@ -15,18 +15,6 @@
|
|||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(function() {
|
||||
$(document).keyup(function (e) {
|
||||
var e = e || event,
|
||||
code = e.which || e.keyCode;
|
||||
if (code == 13 && $("#loginInBox").css('display') == 'block') {
|
||||
e.preventDefault();
|
||||
$('#main_login_form').submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="navContainer">
|
||||
<% is_current_user = User.current.logged? && User.current == @user%>
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo">
|
||||
<div class="homepagePostTo mb12">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.container_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
||||
</div>
|
||||
<div class="homepagePostTitle">
|
||||
<div class="homepagePostTitle mb12">
|
||||
<a href="javascript:void(0);" class="postGrey"><%=activity.filename.to_s(附件名称)%></a>
|
||||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mb8" style="word-break:break-all;">
|
||||
<div class="homepagePostTo mb8 break_word">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<% end %> TO <!--+"(课程名称)" -->
|
||||
<%= link_to activity.course.name.to_s+" | 课程作业", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle mb8" style="word-break:break-all;"> <!--+"(作业名称)"-->
|
||||
<div class="homepagePostTitle mb8 break_word"> <!--+"(作业名称)"-->
|
||||
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
|
||||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mb12" style="word-break:break-all;">
|
||||
<div class="homepagePostTo mb12 break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -14,7 +14,7 @@
|
|||
<%= link_to activity.course.name.to_s+" | 课程讨论区", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
|
||||
<%#= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle mb12" style="word-break:break-all;">
|
||||
<div class="homepagePostTitle mb12 break_word">
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
|
||||
<% else %>
|
||||
|
@ -106,7 +106,7 @@
|
|||
) if reply.course_destroyable_by?(User.current) %>
|
||||
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent"><%= reply.content.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word"><%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mb12" style="word-break:break-all;">
|
||||
<div class="homepagePostTo mb12 break_word">
|
||||
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<% end %> TO <!--+"(课程名称)"-->
|
||||
<%= link_to activity.course.name.to_s+" | 课程通知", course_path(activity.course), :class => "newsBlue ml15", :style => "word-break:break-all" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle mb12" style="word-break:break-all;"> <!--+"(通知标题)"-->
|
||||
<div class="homepagePostTitle mb12 break_word"> <!--+"(通知标题)"-->
|
||||
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey", :style => "word-break:break-all" %>
|
||||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
|
@ -83,7 +83,7 @@
|
|||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
|
||||
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent"><%= comment.comments.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word"><%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo" style="word-break:break-all;">
|
||||
<div class="homepagePostTo mb12 break_word">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<%= link_to Course.find(activity.polls_group_id).name.to_s+" | 问卷", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
||||
</div>
|
||||
<div class="homepagePostTitle" style="word-break:break-all;">
|
||||
<div class="homepagePostTitle break_word" >
|
||||
<%#= link_to activity.polls_name.to_s/*+"(问卷名称)"*/, %>
|
||||
<% if has_commit %>
|
||||
<%= link_to poll_name, poll_result_poll_path(activity.id), :class => "postGrey"%>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mb12" style="word-break:break-all;">
|
||||
<div class="homepagePostTo mb12 break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<% end %> TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目缺陷", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle mb12" style="word-break:break-all;">
|
||||
<div class="homepagePostTitle mb12 break_word">
|
||||
<%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %>
|
||||
<span class='<%= get_issue_priority(activity.priority_id)[0] %>'><%= get_issue_priority(activity.priority_id)[1] %></span>
|
||||
</div>
|
||||
|
@ -28,11 +28,11 @@
|
|||
</div>
|
||||
<div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div>
|
||||
</div>
|
||||
<div class="homepagePostIntro" id="activity_description_<%= user_activity.id %>">缺陷描述:<%= activity.description.html_safe %></div>
|
||||
<div class="homepagePostIntro break_word" id="activity_description_<%= user_activity.id %>">缺陷描述:<%= activity.description.html_safe %></div>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<% if activity.attachments.any? %>
|
||||
<% activity.attachments.each do |attachment| %>
|
||||
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
||||
<div class="break_word">
|
||||
<span title="<%= attachment.filename %>" id="attachment_">
|
||||
<%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
|
||||
</span>
|
||||
|
@ -116,10 +116,10 @@
|
|||
</div>
|
||||
<% if reply.details.any? %>
|
||||
<% details_to_strings(reply.details).each do |string| %>
|
||||
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%= string %></div>
|
||||
<div class="homepagePostReplyContent break_word"><%= string %></div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="homepagePostReplyContent"><%= reply.notes.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word"><%= reply.notes.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostBrief mt10" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div class="resources mt10">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostBrief mt10">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mb12" style="word-break:break-all;">
|
||||
<div class="homepagePostTo mb12 break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
@ -14,7 +14,7 @@
|
|||
<%= link_to activity.project.name.to_s+" | 项目讨论区",project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
|
||||
<!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>-->
|
||||
</div>
|
||||
<div class="homepagePostTitle mb12" style="word-break:break-all;">
|
||||
<div class="homepagePostTitle mb12 break_word">
|
||||
<% if activity.parent_id.nil? %>
|
||||
<%= link_to activity.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
|
||||
<% else %>
|
||||
|
@ -24,7 +24,7 @@
|
|||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
|
||||
</div>
|
||||
<div class="homepagePostIntro" id="activity_description_<%= user_activity.id%>">帖子描述:
|
||||
<div class="homepagePostIntro break_word" id="activity_description_<%= user_activity.id%>">帖子描述:
|
||||
<% if activity.parent_id.nil? %>
|
||||
<%= activity.content.to_s.html_safe%>
|
||||
<% else %>
|
||||
|
@ -103,7 +103,7 @@
|
|||
) if reply.course_destroyable_by?(User.current) %>
|
||||
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
|
||||
</div>
|
||||
<div class="homepagePostReplyContent"><%= reply.content.html_safe %></div>
|
||||
<div class="homepagePostReplyContent break_word"><%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:600px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:555px;margin-top:5px;}
|
||||
</style>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
$(window).scroll(scrollHandler);
|
||||
</script>
|
||||
|
||||
<input type="hidden" value="<%= @type%>" id="user_activities_type">
|
||||
<input type="hidden" value="<%= @type%>" name="type" id="user_activities_type">
|
||||
<div class="resources">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">最新动态</div>
|
||||
|
|
|
@ -138,10 +138,10 @@
|
|||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<div class="homepagePostTo mb12"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15 mr5">黄井泉</a><span class="c_blue">,</span><a href="javascript:void(0);" class="newsBlue ml5">陈正东</a>
|
||||
</div>
|
||||
<div class="homepagePostTitle"><a href="javascript:void(0);" class="postGrey">假期开心吗?(讨论区内容)</a></div>
|
||||
<div class="homepagePostTitle mb12"><a href="javascript:void(0);" class="postGrey">假期开心吗?(讨论区内容)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostDeadline">时间:2015-07-31</div>
|
||||
</div>
|
||||
|
@ -205,9 +205,9 @@
|
|||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<div class="homepagePostTo mb12"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">Trustie Forge(项目名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<div class="homepagePostTitle mb12">
|
||||
<a href="javascript:void(0);" class="postGrey">上传资源未显示在项目动态中(缺陷标题)</a><span class="homepagePostProjectState">正常</span>
|
||||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
|
|
|
@ -938,7 +938,7 @@ img.ui-datepicker-trigger {
|
|||
#attachments_fields input.filename {
|
||||
border: 0;
|
||||
height: 1.8em;
|
||||
width: 630px;
|
||||
width: 200px;
|
||||
color: #7f7f7f;
|
||||
background-color: inherit;
|
||||
background: url(../images/pic_file.png) 0 3px no-repeat;
|
||||
|
|
Loading…
Reference in New Issue