Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
Conflicts: db/schema.rb
This commit is contained in:
commit
4de81605a4
|
@ -91,8 +91,12 @@ class BlogCommentsController < ApplicationController
|
|||
|
||||
def edit
|
||||
@article = BlogComment.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.html {render :layout=>'new_base_user'}
|
||||
if User.current.admin? || User.current.id == @article.author_id
|
||||
respond_to do |format|
|
||||
format.html { render :layout => 'new_base_user' }
|
||||
end
|
||||
else
|
||||
render_403
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -854,9 +854,7 @@ class FilesController < ApplicationController
|
|||
@result = visable_attachemnts @result
|
||||
if params[:other]
|
||||
@result = @result.select{|attachment|
|
||||
attachment.tag_list.exclude?('软件') &&
|
||||
attachment.tag_list.exclude?('媒体') &&
|
||||
attachment.tag_list.exclude?('代码')
|
||||
attachment.tag_list.index{|tag|tag != '软件' and tag != '媒体' and tag != '代码'}.present?
|
||||
}
|
||||
else
|
||||
@result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)} unless @tag_name.blank?
|
||||
|
|
|
@ -1555,7 +1555,7 @@ class UsersController < ApplicationController
|
|||
@user = User.find(params[:id])
|
||||
#@user.save_attachments(params[:attachments],User.current)
|
||||
# Container_type为Principal
|
||||
Attachment.attach_filesex(@user, params[:attachments], params[:attachment_type])
|
||||
attach = Attachment.attach_filesex_public(@user, params[:attachments], params[:attachment_type], is_public = true)
|
||||
if(params[:type].blank? || params[:type] == "1") # 我的资源
|
||||
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
|
||||
if params[:status] == 2
|
||||
|
@ -2340,9 +2340,7 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取公共资源
|
||||
def get_public_resources user_course_ids, user_project_ids
|
||||
attachments = Attachment.where("(is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course')) "+
|
||||
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" +
|
||||
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)" ).order("created_on desc")
|
||||
attachments = Attachment.where("(is_publish = 1 and is_public =1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course')) ").order("created_on desc")
|
||||
end
|
||||
|
||||
# 获取我的资源
|
||||
|
@ -2359,7 +2357,7 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取公共资源课程
|
||||
def get_course_resources_public user_course_ids
|
||||
attchments = Attachment.where("(container_type = 'Course' and is_publish = 1) or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1) ").order("created_on desc")
|
||||
attchments = Attachment.where("(container_type = 'Course'and container_id is not null and is_publish = 1 and is_public =1)").order("created_on desc")
|
||||
end
|
||||
|
||||
# 获取我的项目资源
|
||||
|
@ -2369,7 +2367,7 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取公共资源的项目资源
|
||||
def get_project_resources_public user_project_ids
|
||||
attchments = Attachment.where("(container_type = 'Project') or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1) ").order("created_on desc")
|
||||
attchments = Attachment.where("container_type = 'Project' and container_id is not null and is_public =1").order("created_on desc")
|
||||
end
|
||||
|
||||
# 获取我上传的附件
|
||||
|
@ -2379,7 +2377,7 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取公共资源中我上传的附件
|
||||
def get_attch_resources_public
|
||||
attchments = Attachment.where("container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon','OrgSubfield','Principal')").order("created_on desc")
|
||||
attchments = Attachment.where("container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon','OrgSubfield','Principal') and container_id is not null and is_public =1").order("created_on desc")
|
||||
end
|
||||
|
||||
# 获取我的用户类型资源
|
||||
|
@ -2389,7 +2387,7 @@ class UsersController < ApplicationController
|
|||
|
||||
# 获取我的用户类型资源
|
||||
def get_principal_resources_public
|
||||
attchments = Attachment.where("container_type = 'Principal'").order("created_on desc")
|
||||
attchments = Attachment.where("container_type = 'Principal'and container_id is not null and is_public =1").order("created_on desc")
|
||||
end
|
||||
|
||||
# 资源库 分为全部 课程资源 项目资源 附件
|
||||
|
@ -2621,9 +2619,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
elsif params[:type] == "6" #全部资源
|
||||
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||
@attachments = Attachment.where("((is_publish = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course')) "+
|
||||
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1 and container_id is not null)" +
|
||||
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1 and container_id is not null)) and (filename like :p)" ,:p => search).order("created_on desc")
|
||||
@attachments = Attachment.where("is_publish = 1 and is_public = 1 and container_id is not null and container_type in('Project','OrgSubfield','Principal','Course') and (filename like :p)" ,:p => search).order("created_on desc")
|
||||
end
|
||||
@type = params[:type]
|
||||
@limit = 25
|
||||
|
|
|
@ -2945,9 +2945,35 @@ end
|
|||
def user_url_in_org(user_id)
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/users/" + user_id.to_s
|
||||
elsif Rails.env.test?
|
||||
return "https://www.test.forge.trustie.net/users/" + user_id.to_s
|
||||
else
|
||||
return "https://www.trustie.net/users/" + user_id.to_s
|
||||
return "https://" + Setting.host_name + "/users/" + user_id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
def logout_url_without_domain
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/logout"
|
||||
else
|
||||
return "https://" + Setting.host_name + "/logout"
|
||||
end
|
||||
end
|
||||
|
||||
def signin_url_without_domain
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/login?login=true"
|
||||
elsif Rails.env.test?
|
||||
return "https://test.forge.trustie.net/login?login=true"
|
||||
else
|
||||
return "https://www.trustie.net/login?login=true"
|
||||
end
|
||||
end
|
||||
|
||||
def register_url_without_domain
|
||||
if Rails.env.development?
|
||||
return "http://localhost:3000/login?login=false"
|
||||
elsif Rails.env.test?
|
||||
return "https://test.forge.trustie.net/login?login=false"
|
||||
else
|
||||
return "https://www.trustie.net/login?login=false"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -499,6 +499,12 @@ class Attachment < ActiveRecord::Base
|
|||
result
|
||||
end
|
||||
|
||||
def self.attach_filesex_public(obj, attachments,attachment_type, is_public)
|
||||
result = obj.save_attachmentsex_public(attachments, User.current,attachment_type, is_public)
|
||||
obj.attach_saved_attachments
|
||||
result
|
||||
end
|
||||
|
||||
def self.latest_attach(attachments, filename)
|
||||
attachments.sort_by(&:created_on).reverse.detect {
|
||||
|att| att.filename.downcase == filename.downcase
|
||||
|
|
|
@ -71,7 +71,8 @@ class CourseActivity < ActiveRecord::Base
|
|||
name = lead_message.subject
|
||||
content = lead_message.content
|
||||
# message的status状态为0为正常,为1表示创建课程时发送的message
|
||||
message = Message.create(:subject => name, :content => content, :board_id => self.course.boards.first.id, :author_id => self.course.tea_id , :sticky => true, :status => true )
|
||||
# author_id 默认为课程使者创建
|
||||
message = Message.create(:subject => name, :content => content, :board_id => self.course.boards.first.id, :author_id => 1 , :sticky => true, :status => true )
|
||||
# 更新的目的是为了排序,因为该条动态的时间可能与课程创建的动态创建时间一直
|
||||
message.course_acts.first.update_attribute(:updated_at, message.course_acts.first.updated_at + 1) if message.course_acts.first
|
||||
end
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<% if User.current.logged? && User.current.id == @user.id %>
|
||||
<%= form_for @article, :url =>{:controller=>'blog_comments',:action => 'update',:user_id=>@user.id , :blog_id => @article.id, :is_homepage => params[:is_homepage],:in_act => params[:in_act]},:method=>'PUT',
|
||||
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'blog_comments/edit', :locals => {:f => f, :article => @article, :edit_mode => true, :user => @user} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= form_for @article, :url =>{:controller=>'blog_comments',:action => 'update',:user_id=>@user.id , :blog_id => @article.id, :is_homepage => params[:is_homepage],:in_act => params[:in_act]},:method=>'PUT',
|
||||
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
|
||||
<%= render :partial => 'blog_comments/edit', :locals => {:f => f, :article => @article, :edit_mode => true, :user => @user} %>
|
||||
<% end %>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(@article.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@article.author) %>
|
||||
</div>
|
||||
<div class="postThemeWrap">
|
||||
<% if @article.author.id == User.current.id%>
|
||||
<% if @article.author.id == User.current.id || User.current.admin? %>
|
||||
<div class="homepagePostSetting" id="message_setting_<%= @article.id%>" style="display: none">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
|
@ -48,7 +48,7 @@
|
|||
l(:button_edit),
|
||||
{:action => 'edit', :id => @article.id,:in_act => params[:in_act]},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current && User.current.id == @article.author.id %>
|
||||
) if User.current.admin? || User.current.id == @article.author.id %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
|
@ -57,7 +57,7 @@
|
|||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current && User.current.id == @article.author.id %>
|
||||
) if User.current.admin? || User.current.id == @article.author.id %>
|
||||
</li>
|
||||
<li>
|
||||
<% if @article.id == @article.blog.homepage_id %>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<% if activity.author.id == User.current.id%>
|
||||
<% if activity.author.id == User.current.id || User.current.admin? %>
|
||||
<div class="homepagePostSetting" id="message_setting_<%= activity.id%>" style="display: none">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
|
@ -14,7 +14,7 @@
|
|||
l(:button_edit),
|
||||
{:controller => 'blog_comments',:action => 'edit',:user_id=>activity.author_id,:blog_id=>activity.blog_id, :id => activity.id},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current && User.current.id == activity.author.id %>
|
||||
) if User.current.admin? || User.current.id == activity.author.id %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
|
@ -23,7 +23,7 @@
|
|||
:method => :delete,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current && User.current.id == activity.author.id %>
|
||||
) if User.current.admin? || User.current.id == activity.author.id %>
|
||||
</li>
|
||||
<li>
|
||||
<% if activity.id == activity.blog.homepage_id %>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTitle break_word mt-4">
|
||||
<%= link_to file.is_public? ? truncate(file.filename, length: 70) : truncate(file.filename,length: 50, omission: '...'),
|
||||
<%= link_to file.is_public? ? truncate(file.filename, length: 45) : truncate(file.filename,length: 35, omission: '...'),
|
||||
download_named_attachment_path(file.id, file.filename),
|
||||
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14 f_l" %>
|
||||
<%= file_preview_eye(file, class: 'preview') %>
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
</li>
|
||||
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||
<li>
|
||||
<%= link_to "退出",signout_path,:class => "menuGrey",:method => "post"%>
|
||||
<%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post"%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -77,10 +77,10 @@
|
|||
|
||||
</div>
|
||||
<div id="loginInButton" class="fr ml20">
|
||||
<a href="<%= signin_path(:login=>true) %>" class="c_white db">登录</a>
|
||||
<a href="<%= signin_url_without_domain %>" class="c_white db">登录</a>
|
||||
</div>
|
||||
<div id="loginSignButton" class="fr">
|
||||
<a href="<%= signin_path(:login=>false) %>" class="c_white db">注册</a>
|
||||
<a href="<%= register_url_without_domain %>" class="c_white db">注册</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<li class="navOrgMenu fr" id="orgUser" style="cursor:pointer;">
|
||||
<%= link_to image_tag(url_to_avatar(User.current),:width => '23',:height => '23'), request.local? ? user_path(User.current):("https://www.trustie.net/users/" + User.current.id.to_s),:alt => '用户头像', :target => '_blank',:style=>'border-radius:3px; vertical-align:top; margin-top:3px; display:inline-block; margin-right:3px;' %>
|
||||
<%= link_to User.current, (request.local? || request.subdomain.blank?) ? user_path(User.current):("https://www.trustie.net/users/" + User.current.id.to_s),:id => "orgUserName",:class => 'fontGrey2 f14 mr5',:target => '_blank' %>
|
||||
<%= link_to "退出",(request.local? || request.subdomain.blank?) ? signout_path():"https://www.trustie.net/logout", :class =>"menuGrey", :method => 'post', :rel => "nofollow" %>
|
||||
<%= link_to "退出",logout_url_without_domain, :class =>"menuGrey", :method => 'post', :rel => "nofollow" %>
|
||||
</li>
|
||||
<!--<li class="navOrgMenu fr"><%#=link_to User.current, user_path(User.current), :class => "linkGrey8 f14" %></li>-->
|
||||
<% else %>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<%= link_to @memo.author.name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%></div>
|
||||
<div class="postDetailDate mb5"><%= format_date( @memo.created_at)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostIntro memo-content" id="message_description_<%= @memo.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content" id="activity_description_<%= @memo.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @memo.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -95,8 +95,21 @@
|
|||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher mt-4"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.name%></a><%= format_date(reply.created_at) %></div>
|
||||
<div class="homepagePostReplyContent"><%= reply.content.html_safe%></div>
|
||||
<div class="homepagePostReplyContent" id="activity_description_<%= reply.id %>"><%= reply.content.html_safe%></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#activity_description_<%= reply.id %> p,#activity_description__<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
|
||||
var postContent = $(this).html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
postContent= postContent.replace(/ {2}/g," ");
|
||||
postContent=postContent.replace(/ /g," ");
|
||||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
description_show_hide(<%= reply.id %>);
|
||||
});
|
||||
</script>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -126,7 +139,7 @@
|
|||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#message_description_<%= @memo.id %> p,#message_description_<%= @memo.id %> span,#message_description_<%= @memo.id %> em").each(function(){
|
||||
$("#activity_description_<%= @memo.id %> p,#activity_description__<%= @memo.id %> span,#activity_description_<%= @memo.id %> em").each(function(){
|
||||
var postContent = $(this).html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
postContent= postContent.replace(/ {2}/g," ");
|
||||
|
@ -134,5 +147,6 @@
|
|||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
description_show_hide(<%= @memo.id %>);
|
||||
});
|
||||
</script>
|
|
@ -34,11 +34,7 @@
|
|||
<div class="postRightContainer ml10" onmouseover="$('#message_setting_<%= @topic.id%>').show();" onmouseout="$('#message_setting_<%= @topic.id%>').hide();">
|
||||
<div class="postThemeContainer">
|
||||
<div class="postDetailPortrait">
|
||||
<% if @topic.status == 1 %>
|
||||
<%= image_tag("/images/trustie_logo1.png", width: "50px", height: "50px") %>
|
||||
<% else %>
|
||||
<%= link_to image_tag(url_to_avatar(@topic.author), :width => 50, :height => 50,:alt=>'图像' ), user_path(@topic.author) %>
|
||||
<% end %>
|
||||
<%= link_to image_tag(url_to_avatar(@topic.author), :width => 50, :height => 50,:alt=>'图像' ), user_path(@topic.author) %>
|
||||
</div>
|
||||
<div class="postThemeWrap">
|
||||
<% if User.current.logged? %>
|
||||
|
@ -74,16 +70,11 @@
|
|||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @topic.subject%></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="postDetailCreater">
|
||||
<% if @topic.status == 1 %>
|
||||
<span class="fontBlue2">确实团队</span>
|
||||
<% if @topic.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% else %>
|
||||
<% if @topic.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% end %>
|
||||
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>" onmouseover="$('#message_setting_<%= user_activity_id%>').show();" onmouseout="$('#message_setting_<%= user_activity_id%>').hide();">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<% if activity.status == 1 %>
|
||||
<%= image_tag("/images/trustie_logo1.png", width: "50px", height: "50px") %>
|
||||
<% else %>
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
<% end %>
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<% if activity.status == 1 %>
|
||||
<span class="fontBlue2">确实团队</span>
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to activity.course.name.to_s+" | 课程问答区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="userCard boxShadow" style="<%= User.current == user ? 'top:-153px;':'' %>">
|
||||
<div class="userAvatarWrap fl">
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_url_in_org(user), :alt => "用户头像", :target => '_blank' %>
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_url_in_org(user.id), :alt => "用户头像", :target => '_blank' %>
|
||||
<%#= image_tag(url_to_avatar(user), :width => "50", :height => "50") %>
|
||||
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="个人头像" />-->
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
class UpdateCourseLead < ActiveRecord::Migration
|
||||
def up
|
||||
Message.where("status =? ", 1).update_all(:author_id => 1)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -11,8 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160311072819) do
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160225031230) do
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
t.string "act_type", :null => false
|
||||
|
|
|
@ -99,6 +99,13 @@ module Redmine
|
|||
result
|
||||
end
|
||||
|
||||
def save_attachmentsex_public(attachments, author=User.current,attachment_type, is_public)
|
||||
@curattachment_type = attachment_type
|
||||
@is_public = true
|
||||
result = save_attachments(attachments,author)
|
||||
result
|
||||
end
|
||||
|
||||
def save_attachments(attachments, author=User.current)
|
||||
# 清除临时文件
|
||||
if attachments
|
||||
|
@ -142,7 +149,11 @@ module Redmine
|
|||
end
|
||||
|
||||
if a && !attachment['is_public_checkbox']
|
||||
a.is_public = false
|
||||
if @is_public
|
||||
a.is_public = true
|
||||
else
|
||||
a.is_public = false
|
||||
end
|
||||
elsif a && attachment['is_public_checkbox']
|
||||
a.is_public = true
|
||||
end
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -845,7 +845,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
|
|||
.postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;}
|
||||
.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;}
|
||||
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
|
||||
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;}
|
||||
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 23px !important;}
|
||||
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
|
||||
.postDetailDate {color:#888888; font-size:12px; float:left;}
|
||||
.postDetailReply { margin-top:28px; color:#888888; float:right;display: inline}
|
||||
|
|
|
@ -218,7 +218,7 @@ a.talk_btn{ background:#64bdd9; width:50px; height:20px; color:#fff; text-align:
|
|||
a:hover.talk_btn{ background:#2a9dc1;}
|
||||
/****讨论区内页***/
|
||||
.mt0{ margin-top:0px;}
|
||||
.talk_info{ color:#7d7d7d; margin-left:60px; margin-top:10px;}
|
||||
.talk_info{ margin-left:60px; margin-top:10px;}
|
||||
.issue_desc li{list-style-type: decimal;margin-left: 20px;}
|
||||
.talk_info img {max-width:100%;}
|
||||
a.talk_edit{ color:#426e9a; margin-right:5px;}
|
||||
|
|
|
@ -1133,4 +1133,4 @@ a.group-btn{ background: url(../images/course/hwork_icon.png) -2px -58px no-rep
|
|||
a.program-btn{background: url(../images/homepage_icon.png) -86px -393px no-repeat; width:30px; height:20px; display:block; padding-left:23px; color:#888888;}
|
||||
|
||||
/*视频播放默认图标*/
|
||||
.mediaIco{margin: 30px 0 30px 20px;}
|
||||
.mediaIco{margin: 30px 0 30px 20px;width: 200px;}
|
||||
|
|
Loading…
Reference in New Issue