Merge branch 'dev_hjq' into szzh

dev_cxt2
huang 10 years ago
commit 4c5127bc60

@ -22,6 +22,9 @@ class ActivityNotifysController < ApplicationController
list = query.order('is_read,id desc').limit(limit).offset(@obj_pages.offset).all(); list = query.order('is_read,id desc').limit(limit).offset(@obj_pages.offset).all();
events=[]; events=[];
for item in list for item in list
if item.activity.nil?
next
end
event = item.activity; event = item.activity;
event.set_notify_id(item.id) event.set_notify_id(item.id)
event.set_notify_is_read(item.is_read) event.set_notify_is_read(item.is_read)

@ -86,7 +86,7 @@ class ForumsController < ApplicationController
order(sort_clause). order(sort_clause).
preload(:author, {:last_reply => :author}). preload(:author, {:last_reply => :author}).
all all
@memos
flash.now[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}" flash.now[:error] = "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}"
# back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id) # back_error_page = @memo.parent_id.nil? ? forum_path(@forum) : forum_memo_path(@forum, @memo.parent_id)
format.html { render action: :show, layout: 'base_forums' }#, error: "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}" } format.html { render action: :show, layout: 'base_forums' }#, error: "#{l :label_memo_create_fail}: #{@memo.errors.full_messages[0]}" }
@ -122,14 +122,14 @@ class ForumsController < ApplicationController
@topic_count = @forum.topics.count @topic_count = @forum.topics.count
@topic_pages = Paginator.new @topic_count, per_page_option, params['page'] @topic_pages = Paginator.new @topic_count, per_page_option, params['page']
@memos = @forum.topics. @memos = @forum.topics.
reorder("#{Memo.table_name}.sticky DESC"). # reorder("#{Memo.table_name}.sticky DESC").
includes(:last_reply). includes(:last_reply).
limit(@topic_pages.per_page). limit(@topic_pages.per_page).
offset(@topic_pages.offset). offset(@topic_pages.offset).
order(sort_clause). order(sort_clause).
preload(:author, {:last_reply => :author}). preload(:author, {:last_reply => :author}).
all all
@memos
# @offset, @limit = api_offset_and_limit({:limit => 10}) # @offset, @limit = api_offset_and_limit({:limit => 10})
# @forum = Forum.find(params[:id]) # @forum = Forum.find(params[:id])
# @memos_all = @forum.topics # @memos_all = @forum.topics

@ -104,13 +104,20 @@ class UsersController < ApplicationController
#added by young #added by young
def user_projects def user_projects
if User.current.admin? if User.current.admin?
@memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}") @memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}")
else else
cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1" cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
@memberships = @user.memberships.all(:conditions => cond) @memberships = @user.memberships.all(:conditions => cond)
end end
@memberships = @memberships.sort {|a,b| b.created_on.to_i <=> a.created_on.to_i}
# unless @memberships.nil?
# @user_projects = []
# @memberships.each do |membership|
# @user_projects << membership.project
# end
# @user_projects = @user_projects.sort {|a,b| b.created_on.to_i <=> a.created_on.to_i}
# end
#events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 20) #events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 20)
#@events_by_day = events.group_by(&:event_date) #@events_by_day = events.group_by(&:event_date)
@state = 0 @state = 0
@ -256,9 +263,7 @@ class UsersController < ApplicationController
membership.sort! {|older, newer| newer.created_on <=> older.created_on } membership.sort! {|older, newer| newer.created_on <=> older.created_on }
@memberships = [] @memberships = []
membership.collect { |e| membership.collect { |e| @memberships.push(e)}
@memberships.push(e)
}
## 判断课程是否过期 [需封装] ## 判断课程是否过期 [需封装]
@memberships_doing = [] @memberships_doing = []
@memberships_done = [] @memberships_done = []

@ -83,16 +83,16 @@ module IssuesHelper
end end
end end
# 获取优先级样式 # 获取优先级样式 value值1 2 低
def get_issue_priority(value) def get_issue_priority(value)
issuetype = [] issuetype = []
if value == "紧急" || value == 1 if value == "紧急" || value == 4
issuetype << "red_btn_cir ml10" issuetype << "red_btn_cir ml10"
issuetype << "紧急" issuetype << "紧急"
elsif value == "正常" || value == 3 elsif value == "正常" || value == 2
issuetype << "green_btn_cir ml10" issuetype << "green_btn_cir ml10"
issuetype << "正常" issuetype << "正常"
elsif value == "" || value == 4 elsif value == "" || value == 3
issuetype << "orange_btn_cir ml10" issuetype << "orange_btn_cir ml10"
issuetype << "" issuetype << ""
else else

@ -66,9 +66,9 @@ class User < Principal
#每日一报、一事一报、不报 #每日一报、一事一报、不报
MAIL_NOTIFICATION_OPTIONS = [ MAIL_NOTIFICATION_OPTIONS = [
['all', :label_user_mail_option_all],
#['week', :label_user_mail_option_week], #['week', :label_user_mail_option_week],
['day', :label_user_mail_option_day], ['day', :label_user_mail_option_day],
['all', :label_user_mail_option_all],
['none', :label_user_mail_option_none] ['none', :label_user_mail_option_none]
] ]

@ -32,33 +32,31 @@
<hr/> <hr/>
</div> </div>
<% end %> <% end %>
<p class="c_dark mb5">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p> <p class="c_dark mb5 f14">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p>
<% if @topics.any? %> <% if @topics.any? %>
<% @topics.each do |topic| %> <% @topics.each do |topic| %>
<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"> <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' %> <%= 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"> <div class="talkmain_txt fl mt5 f14">
<% author = topic.author.to_s %> <% author = topic.author.to_s %>
<div style="max-width:60px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;"> <div style="max-width:120px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl ",:title=>author, <%= link_to User.current.member_of_course?(@board.course) ? "#{topic.author.show_name}(#{topic.author.login})" : "#{topic.author}" , user_path(topic.author),
:style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %> :class =>"talkmain_name fl f14",:title=>author,
:style=>'max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>
</div> </div>
<p style="float:left;color:#ff5722;">&nbsp;&nbsp;:</p> <p style="float:left;color:#ff5722;">&nbsp;&nbsp;:</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;">&nbsp;&nbsp;<%= h(topic.subject) %></p> <p class="talkmain_tit fl fb break_word f14" title="<%= h(topic.subject) %>" style="width:auto;float:left;max-width:415px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">&nbsp;&nbsp;<%= h(topic.subject) %></p>
<% if topic.course_editable_by?(User.current) %> <% if topic.course_editable_by?(User.current) %>
<a href="javascript:void(0)" nhname="showbtn" style="color: #426e9a;float: right; <a href="javascript:void(0)" nhname="showbtn" style="color: #426e9a;float: right;
margin-right: 10px;"><%= l(:button_edit) %></a> margin-right: 10px;"><%= l(:button_edit) %></a>
<% end %> <% end %>
<%= link_to( <%= link_to(l(:button_delete), {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
l(:button_delete), :method => :post,
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, :data => {:confirm => l(:text_are_you_sure)},
:method => :post, :class => 'talk_edit fr',
:data => {:confirm => l(:text_are_you_sure)}, :style => ' margin-right: 10px;') if topic.destroyable_by?(User.current) %>
:class => 'talk_edit fr',
:style => ' margin-right: 10px;'
) if topic.destroyable_by?(User.current) %>
<% if topic.sticky? %> <% if topic.sticky? %>
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a> <a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
@ -101,7 +99,7 @@
// } // }
}); });
</script> </script>
<div class="project_board_content break_word" id="content_<%=topic.id%>"> <div class="project_board_content break_word f14" id="content_<%=topic.id%>">
<div id="contentmessage<%=topic.id %>" class="upload_img"> <div id="contentmessage<%=topic.id %>" class="upload_img">
<%= topic.content.html_safe %> <%= topic.content.html_safe %>
<!-- --> <!-- -->
@ -122,7 +120,7 @@
<%= l(:label_activity_time)%>&nbsp;&nbsp;<%= format_time topic.created_on %> <%= l(:label_activity_time)%>&nbsp;&nbsp;<%= format_time topic.created_on %>
</div> </div>
<a href="javascript:void(0)" nhname="showbtn_reply" class="c_dblue fr" style="margin-right:10px;"><%= l(:button_reply) %></a> <a href="javascript:void(0)" nhname="showbtn_reply" class="c_dblue fr f14" style="margin-right:10px;"><%= l(:button_reply) %></a>
<div class="cl"></div> <div class="cl"></div>
@ -163,17 +161,17 @@
<% replies_all.each do |message| %> <% replies_all.each do |message| %>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>" id="topic<%=message.id%>"> <li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>" id="topic<%=message.id%>">
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class => 'Msg_pic' %>
<div class="Msg_txt"> <div class="Msg_txt">
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %> <%= link_to User.current.member_of_course?(@board.course) ? "#{message.author.show_name}(#{message.author.login})" : "#{message.author}", user_path(message.author),:class => 'fl c_orange f14 ' %>
<br/> <br/>
<div class="fl break_word"> <div class="fl break_word f14">
<%= textAreailizable message,:content,:attachments => message.attachments %> <%= textAreailizable message,:content,:attachments => message.attachments %>
<!-- --> <!-- -->
</div> </div>
<input nhname="nh_content_val" value="<%= message.content %>" type="hidden"/> <input nhname="nh_content_val" value="<%= message.content %>" type="hidden"/>
<br/><div class="cl"></div> <br/><div class="cl"></div>
<span class=" c_grey fl"><%= format_time(message.created_on) %></span> <span class=" c_grey fl f14"><%= format_time(message.created_on) %></span>
<%= link_to( <%= link_to(
l(:button_delete), l(:button_delete),
@ -181,13 +179,13 @@
:method => :post, :method => :post,
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete), :title => l(:button_delete),
:class => ' c_dblue fr' :class => ' c_dblue fr f14'
) if message.course_destroyable_by?(User.current) %> ) if message.course_destroyable_by?(User.current) %>
<%= link_to( <%= link_to(
l(:button_reply), l(:button_reply),
'javascript:;', 'javascript:;',
:nhname =>'showbtn_child_reply', :nhname =>'showbtn_child_reply',
:class => ' c_dblue fr', :class => ' c_dblue fr f14',
:style => 'margin-right: 10px;', :style => 'margin-right: 10px;',
'data-topic-id' =>message.id, 'data-topic-id' =>message.id,
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %> :title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>

@ -13,10 +13,10 @@
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<% if !User.current.logged? %> <% if !User.current.logged? %>
<div class="c_grey f14"> <div class="c_grey f14">
<%= l(:label_user_login_project_board) %> <%= l(:label_user_login_project_board) %>
<%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %> <%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %>
</div> </div>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<div class=" talklist_box" > <div class=" talklist_box" >
@ -28,62 +28,59 @@
</div> </div>
</div> </div>
<div class=" talklist_box" > <div class=" talklist_box" >
<p class="c_dark mb5">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p> <p class="c_dark mb5 f14">讨论区共有<span class="c_orange"><%= @topic_count %></span>个帖子</p>
<% if @topics.any? %> <% if @topics.any? %>
<% @topics.each do |topic| %> <% @topics.each do |topic| %>
<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;"> <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' %> <%= 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"> <div class="talkmain_txt fl mt5 f14">
<% author = topic.author.to_s %> <% author = topic.author.to_s %>
<div style="max-width:60px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;"> <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, <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl f14",:title=>author,
:style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %> :style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>
</div> </div>
<p style="float:left;color:#ff5722;">&nbsp;&nbsp;:</p> <p style="float:left;color:#ff5722;">&nbsp;&nbsp;:</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;">&nbsp;&nbsp;<%= h(topic.subject) %></p> <p class="talkmain_tit fl fb break_word f14" title="<%= h(topic.subject) %>" style="width:auto;float:left;max-width:415px;white-space:nowrap;overflow:hidden;float:left;text-overflow:ellipsis;">&nbsp;&nbsp;<%= h(topic.subject) %></p>
<div style="float:right;max-width:110px;"> <div style="float:right;max-width:110px;">
<% if topic.editable_by?(User.current) %> <% if topic.editable_by?(User.current) %>
<a href="javascript:void(0)" nhname="showbtn" 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 %> <% end %>
<%= link_to( <%= link_to(l(:button_delete), {:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'},
l(:button_delete), :method => :post,
{:controller =>'messages',:action => 'destroy', :id => topic.id, :board_id => topic.board_id, :is_board=>'true'}, :data => {:confirm => l(:text_are_you_sure)},
:method => :post, :class => 'talk_edit fr',
:data => {:confirm => l(:text_are_you_sure)}, :style => ' margin-right: 10px;') if topic.destroyable_by?(User.current) %>
:class => 'talk_edit fr', <% if topic.sticky? %>
:style => ' margin-right: 10px;' <a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
) if topic.destroyable_by?(User.current) %> <% end %>
<% if topic.sticky? %> <script>
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a> //$(function(){if($("#contentmessage<%#=topic.id %>").height()>182){$("#project_show_<%#= topic.id%>").show();}});
<% end %> //解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
<script> $(function(){
//$(function(){if($("#contentmessage<%#=topic.id %>").height()>182){$("#project_show_<%#= topic.id%>").show();}}); function nh_show_btn(){
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug if($("#project_show_<%= topic.id%>").is(':hidden')){
$(function(){ if($("#contentmessage<%=topic.id %>").height()>182){
function nh_show_btn(){ $("#project_show_<%= topic.id%>").show();
if($("#project_show_<%= topic.id%>").is(':hidden')){ }
if($("#contentmessage<%=topic.id %>").height()>182){ }
$("#project_show_<%= topic.id%>").show(); }
} var div = $("#contentmessage<%=topic.id %>");
} var imgs = $('img',div);
} var lens = imgs.length;
var div = $("#contentmessage<%=topic.id %>"); function nh_load_img_end(){
var imgs = $('img',div); nh_show_btn();
var lens = imgs.length;
function nh_load_img_end(){
nh_show_btn();
// lens--; // lens--;
// if(lens <= 0){ // if(lens <= 0){
// nh_show_btn(); // nh_show_btn();
// } // }
} }
if(lens > 0){ if(lens > 0){
$('img',div).load(function(){ $('img',div).load(function(){
nh_load_img_end(); nh_load_img_end();
}); });
} }
nh_show_btn(); nh_show_btn();
// if(lens <= 0){ // if(lens <= 0){
// nh_show_btn(); // nh_show_btn();
// }else{ // }else{
@ -91,107 +88,100 @@
// nh_load_img_end(); // nh_load_img_end();
// }); // });
// } // }
}); });
</script> </script>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<div class="project_board_content break_word" id="content_<%=topic.id%>"> <div class="project_board_content break_word f14" id="content_<%=topic.id%>">
<div id="contentmessage<%=topic.id %>" class="upload_img"> <div id="contentmessage<%=topic.id %>" class="upload_img">
<%= topic.content.html_safe %> <%= topic.content.html_safe %>
<!-- --> <!-- -->
</div>
</div>
<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)%>&nbsp;&nbsp;<%= format_time topic.created_on %>
</div> </div>
</div> <% if User.current.logged? %>
<p style="display: none;" id="project_show_<%= topic.id%>"> <a href="javascript:void(0)" nhname="showbtn_reply" class="c_dblue fr f14" style="margin-right:10px;"><%= l(:button_reply) %></a>
<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> <% end %>
<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)%>&nbsp;&nbsp;<%= format_time topic.created_on %>
</div>
<% 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 class="talk_new ml15 mb10" nhname='about_talk' id="about_newtalk<%=topic.id%>" style="display: none;border-top: 1px dashed #d9d9d9;padding-top:5px;margin-left:0px;padding-left:15px;">
<ul>
<%= render :partial => 'edit',locals: {:topic => topic} %>
</ul>
</div>
<div class="cl"></div>
<div class="talkWrapBox">
<% 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="cl"></div>
<div class="talkConIpt ml15 mb10" style="margin-left:30px;" id="reply<%= topic.id %>"> <div class="talk_new ml15 mb10" nhname='about_talk' id="about_newtalk<%=topic.id%>" style="display: none;border-top: 1px dashed #d9d9d9;padding-top:5px;margin-left:0px;padding-left:15px;">
<%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, <ul>
:html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %> <%= render :partial => 'edit',locals: {:topic => topic} %>
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %> </ul>
<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> </div>
</div> <div class="cl"></div>
<% end %> <div class="talkWrapBox">
<div class="cl"></div> <% reply = Message.new(:subject => "RE: #{topic.subject}")%>
<% replies_all = topic.children.includes(:author, :attachments, {:board => :project}). <% if !topic.locked? && authorize_for('messages', 'reply') %>
reorder("#{Message.table_name}.id desc").all %> <div class="talkWrapMsg" nhname="about_talk_reply" style="display: none;">
<% unless replies_all.empty? %> <em class="talkWrapArrow"></em>
<div class="talkWrapMsg" nhname="nh_reply_div" id="nh_reply_div_<%= topic.id %>"> <div class="cl"></div>
<ul> <div class="talkConIpt ml15 mb10" style="margin-left:30px;" id="reply<%= topic.id %>">
<% replies_all_i = 0 %> <%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'},
<% replies_all.each do |message| %> :html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
<% replies_all_i=replies_all_i+1 %> <%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>"> <div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %> <div style="padding-top:5px;" class="fr">
<div class="Msg_txt"> <a href="javascript:void(0)" nhname="cancelbtn" class="grey_btn fr ml10" style=""><%= l(:button_cancel)%></a>
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %> <a href="javascript:void(0)" nhname="submitbtn" class="blue_btn fr " style=""><%= l(:button_submit)%></a>
<br/> </div>
<div class="fl break_word"> <% end %>
<%= textAreailizable message,:content,:attachments => message.attachments %> <div class="cl"></div>
<!-- -->
</div> </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(
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_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>
<div class="cl"></div>
</li>
<% end %> <% end %>
</ul> <div class="cl"></div>
</div> <% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).reorder("#{Message.table_name}.id desc").all %>
<%if topic.replies_count>2 %> <% unless replies_all.empty? %>
<div class="talkWrapMsg"> <div class="talkWrapMsg" nhname="nh_reply_div" id="nh_reply_div_<%= topic.id %>">
<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> <ul>
<% replies_all_i = 0 %>
<% replies_all.each do |message| %>
<% 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 f14 ' %>
<br/>
<div class="fl break_word f14">
<%= 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 f14"><%= 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 f14') if message.course_destroyable_by?(User.current) %>
<%= link_to(l(:button_reply), 'javascript:;',
:nhname =>'showbtn_child_reply',
:class => ' c_dblue fr f14',
:style => 'margin-right: 10px;',
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
</div>
<div class="cl"></div>
</li>
<% end %>
</ul>
</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 %> </div>
<% end %> <% end %>
</div>
</div>
<% end %>
<% else %> <% else %>
<p class="nodata"><%= l(:label_no_data) %></p> <p class="nodata"><%= l(:label_no_data) %></p>
<% end %> <% end %>
@ -211,78 +201,78 @@
<div style="display:none;"><a href="#" id="nhjump"></a></div> <div style="display:none;"><a href="#" id="nhjump"></a></div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$(".talkmain_box").each(function(){ $(".talkmain_box").each(function(){
var target = $("li[nhname='reply_rec']",$(this)); var target = $("li[nhname='reply_rec']",$(this));
var btn = $("a[nhname='reply_ex_btn']",$(this)); var btn = $("a[nhname='reply_ex_btn']",$(this));
var jumpobj = $("div[nhname='nh_reply_div']",$(this)); var jumpobj = $("div[nhname='nh_reply_div']",$(this));
btn.click(function(){ btn.click(function(){
if($(this).data('init')=='0'){ if($(this).data('init')=='0'){
$(this).data('init',1); $(this).data('init',1);
$(this).html('收起回复('+$(this).data('count')+')'); $(this).html('收起回复('+$(this).data('count')+')');
target.show(); target.show();
}else{ }else{
$(this).data('init',0); $(this).data('init',0);
$(this).html('展开回复('+$(this).data('count')+')'); $(this).html('展开回复('+$(this).data('count')+')');
target.hide(); target.hide();
target.eq(0).show(); target.eq(0).show();
target.eq(1).show(); target.eq(1).show();
$("#nhjump").attr('href','#'+jumpobj.attr('id')); $("#nhjump").attr('href','#'+jumpobj.attr('id'));
$("#nhjump")[0].click(); $("#nhjump")[0].click();
} }
}); });
}); });
KindEditor.ready(function(K){ KindEditor.ready(function(K){
$("div[nhname='container_board']").each(function(){ $("div[nhname='container_board']").each(function(){
var container = $(this); var container = $(this);
var about_talk = $("div[nhname='about_talk']",container); var about_talk = $("div[nhname='about_talk']",container);
var params = ({ var params = ({
kindutil:K, kindutil:K,
showbtn:$("a[nhname='showbtn']",container), showbtn:$("a[nhname='showbtn']",container),
about_talk:about_talk, about_talk:about_talk,
inputsubject:$("input[nhname='inputsubject']",about_talk), inputsubject:$("input[nhname='inputsubject']",about_talk),
subjectmsg:$("p[nhname='subjectmsg']",about_talk), subjectmsg:$("p[nhname='subjectmsg']",about_talk),
textarea:$("textarea[nhname='textarea']",about_talk), textarea:$("textarea[nhname='textarea']",about_talk),
contentmsg:$("p[nhname='contentmsg']",about_talk), contentmsg:$("p[nhname='contentmsg']",about_talk),
submitbtn:$("a[nhname='submitbtn']",about_talk), submitbtn:$("a[nhname='submitbtn']",about_talk),
cancelbtn:$("a[nhname='cancelbtn']",about_talk), cancelbtn:$("a[nhname='cancelbtn']",about_talk),
form:$("form[nhname='form']",about_talk), form:$("form[nhname='form']",about_talk),
toolbar_container:$("div[nhname='toolbar_container']",about_talk), toolbar_container:$("div[nhname='toolbar_container']",about_talk),
init_content_val:$("input[nhname='init_content_val']",about_talk) init_content_val:$("input[nhname='init_content_val']",about_talk)
}); });
nh_init_board(params); nh_init_board(params);
}); });
$("div[mhname='container_board_reply']").each(function(){ $("div[mhname='container_board_reply']").each(function(){
var container = $(this); var container = $(this);
var about_talk = $("div[nhname='about_talk_reply']",container); var about_talk = $("div[nhname='about_talk_reply']",container);
var params = { var params = {
type:'reply', type:'reply',
kindutil:K, kindutil:K,
showbtn:$("a[nhname='showbtn_reply']",container), showbtn:$("a[nhname='showbtn_reply']",container),
showbtn_child:$("a[nhname='showbtn_child_reply']",container), showbtn_child:$("a[nhname='showbtn_child_reply']",container),
about_talk:about_talk, about_talk:about_talk,
inputsubject:$("input[nhname='inputsubject']",about_talk), inputsubject:$("input[nhname='inputsubject']",about_talk),
subjectmsg:$("p[nhname='subjectmsg']",about_talk), subjectmsg:$("p[nhname='subjectmsg']",about_talk),
textarea:$("textarea[nhname='textarea']",about_talk), textarea:$("textarea[nhname='textarea']",about_talk),
contentmsg:$("p[nhname='contentmsg']",about_talk), contentmsg:$("p[nhname='contentmsg']",about_talk),
submitbtn:$("a[nhname='submitbtn']",about_talk), submitbtn:$("a[nhname='submitbtn']",about_talk),
cancelbtn:$("a[nhname='cancelbtn']",about_talk), cancelbtn:$("a[nhname='cancelbtn']",about_talk),
form:$("form[nhname='form']",about_talk), form:$("form[nhname='form']",about_talk),
quote_show:$("div[nhname='quote_show']",about_talk), quote_show:$("div[nhname='quote_show']",about_talk),
quote_input:$("textarea[nhname='quote_input']",about_talk), quote_input:$("textarea[nhname='quote_input']",about_talk),
toolbar_container:$("div[nhname='toolbar_container']",about_talk), toolbar_container:$("div[nhname='toolbar_container']",about_talk),
jumphref:$("#nhjump") jumphref:$("#nhjump")
}; };
params.get_ref_str_call=function(btn){ params.get_ref_str_call=function(btn){
var div = btn.parent('div'); var div = btn.parent('div');
var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'<div class="cl"></div></blockquote>'; var str = '<blockquote>'+$('a',div).filter(':first').html()+' 写到: <br/>'+$("input[nhname='nh_content_val']",div).val()+'<div class="cl"></div></blockquote>';
return str; return str;
} }
nh_init_board(params); nh_init_board(params);
}); });
<% if(!@flag.nil? && @flag=='true') %> <% if(!@flag.nil? && @flag=='true') %>
if($("#new_topic_btn")!=undefined)$("#new_topic_btn").click(); if($("#new_topic_btn")!=undefined)$("#new_topic_btn").click();
<% end %> <% end %>
}); });
}); });
</script> </script>

@ -6,12 +6,12 @@
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %> <%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
</div> </div>
<div class="ping_discon upload_img" style="width: 610px;"> <div class="ping_discon upload_img" style="width: 610px;">
<div class="ping_distop"> <div class="ping_distop f14">
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> --> <!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
<span> <span>
<%= link_to "#{journal.user.show_name}(#{journal.user.login})", user_path(journal.user),:class => 'c_blue fb fl mb10', :target => "_blank"%> <%= link_to User.current.member_of_course?(@course) ? "#{journal.user.show_name}(#{journal.user.login})" : "#{journal.user.login}", user_path(journal.user),:class => 'c_blue fb fl mb10 f14', :target => "_blank"%>
</span> </span>
<span class="c_grey fr"> <span class="c_grey fr f14">
<%= format_time(journal.created_on) %> <%= format_time(journal.created_on) %>
</span> </span>
<div class="cl"></div> <div class="cl"></div>
@ -20,14 +20,13 @@
</p> </p>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="ping_disfoot"> <div class="ping_disfoot f14">
<% ids = 'project_respond_form_'+ journal.id.to_s%> <% ids = 'project_respond_form_'+ journal.id.to_s%>
<% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %> <% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %>
<%= link_to(l(:label_bid_respond_delete), <%= link_to(l(:label_bid_respond_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user}, :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
:class => "delete", :title => l(:button_delete)) %>
<% end %> <% end %>
<% if reply_allow %> <% if reply_allow %>
<%#= link_to l(:label_bid_respond_quote),'', <%#= link_to l(:label_bid_respond_quote),'',
@ -43,9 +42,7 @@
</div> </div>
<% end %> <% end %>
<div class="cl"></div> <div class="cl"></div>
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true , :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %>
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true, :allow_delete => @course && User.current.allowed_to?(:as_teacher,@course)} %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

@ -41,7 +41,7 @@
<div class="re_top"> <div class="re_top">
<%= form_tag( search_project_project_files_path(@project), method: 'get',:class => "re_search f_l",:remote=>true) do %> <%= form_tag( search_project_project_files_path(@project), method: 'get',:class => "re_search f_l",:remote=>true) do %>
<%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%> <%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%>
<%= submit_tag "内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()" %> <%= submit_tag "项目内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()", :style =>"width:72px;" %>
<%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %> <%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %>
<% end %> <% end %>
<% manage_allowed = User.current.allowed_to?(:manage_files, @project) %> <% manage_allowed = User.current.allowed_to?(:manage_files, @project) %>

@ -1,31 +1,31 @@
<script>$(function(){$("img").removeAttr("alt");});</script> <script>$(function(){$("img").removeAttr("alt");});</script>
<div class="borad-topic-count">共有 <%=link_to @forum.memos.count %> 个贴子</div> <div class="borad-topic-count">共有 <%=link_to @forum.memos.count %> 个贴子</div>
<div style="padding-top: 10px"> <div style="padding-top: 10px">
<% if memos.any? %> <% if memos.any? %>
<% memos.each do |topic| %> <% memos.each do |topic| %>
<table class="content-text-list"> <table class="content-text-list">
<tr> <tr>
<td colspan="2" valign="top" style="width: 50px;"> <td colspan="2" valign="top" style="width: 50px;">
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%> <%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) if topic.author%>
</td> </td>
<td> <td>
<table width="630px" border="0"> <table width="630px" border="0">
<tr> <tr>
<td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), forum_memo_path(topic.forum, topic) %></td> <td valign="top" width="500px" class="<%= topic.sticky ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>"><%= link_to h(topic.subject), forum_memo_path(topic.forum, topic) %></td>
<td align="right" rowspan="3"> <td align="right" rowspan="3">
<table class="borad-count"> <table class="borad-count">
<tr> <tr>
<td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %></td> <td align="center" class="borad-count-digit"><%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic) %></td>
</tr> </tr>
<tr> <tr>
<td align="center">回答</td> <td align="center">回答</td>
</tr> </tr>
</table></td> </table></td>
</tr> </tr>
<tr> <tr>
<td colspan="2" ><span class="font_description"> </span></td> <td colspan="2" ><span class="font_description"> </span></td>
</tr> </tr>
<tr> <tr>
<td align="left" colspan="2" ><span class="font_lighter"><%= authoring topic.created_at, topic.author %> <td align="left" colspan="2" ><span class="font_lighter"><%= authoring topic.created_at, topic.author %>
<span class="font_description2"> <span class="font_description2">
<% author = topic.last_reply.try(:author)%> <% author = topic.last_reply.try(:author)%>
@ -35,14 +35,14 @@
</span> </span>
<br /> <br />
</span></td> </span></td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
<% end %> <% end %>
<div class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></div> <div class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></div>
<% else %> <% else %>
<p class="nodata"><%= l(:label_no_data) %></p> <p class="nodata"><%= l(:label_no_data) %></p>
<% end %> <% end %>
</div> </div>

@ -1,54 +1,42 @@
<!-- added by fq --> <!-- added by fq -->
<div id="add-memo" class='lz' style="<% unless @memo.errors.any?%>display: none;<% end %> padding: 20px;"> <div id="add-memo" class='lz' style="<% unless @memo.errors.any?%>display: none;<% end %> padding: 20px;">
<h3> <h3>
<%=l(:label_memo_new)%> <%=l(:label_memo_new)%>
</h3> </h3>
<% if User.current.logged? %> <% if User.current.logged? %>
<%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %> <%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
<div class="actions" style="max-width:680px"> <div class="actions" style="max-width:680px">
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %> <%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<p> <p>
<%= f.text_field :subject, :required => true, :maxlength => 50%> <%= f.text_field :subject, :required => true, :maxlength => 50%>
</p> </p>
<p style="max-width:680px"> <p style="max-width:680px">
<%= f.kindeditor :content, :required => true %> <%= f.kindeditor :content, :required => true %>
</p> </p>
<!--<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>--> <!--<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>-->
<p style="color: #ff0000"> <p style="color: #ff0000">
(<%= l(:label_memos_max_length) %>) (<%= l(:label_memos_max_length) %>)
</p> </p>
<p class="fl" style="margin-top: 5px;"> <p class="fl" style="margin-top: 5px;">
<%= l(:label_attachment_plural) %> <%= l(:label_attachment_plural) %>
<br /> <br />
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %> <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
</p> </p>
<div class="cl"></div> <div class="cl"></div>
<%= f.submit :value => l(:label_memo_create) %> <%= f.submit :value => l(:label_memo_create) %>
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %> <%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
</div> </div>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
<!--modified by huang--> <!--modified by huang-->
<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
<span class="contextual-borad"> <span class="contextual-borad">
<%= link_to( <%= link_to(image_tag('edit.png')+l(:label_forum_edit),{:action => 'edit', :id => @forum}, :method => 'get', :title => l(:button_edit)) if @forum.editable_by?(User.current) %>
image_tag('edit.png')+l(:label_forum_edit), <%= link_to(image_tag('delete.png')+'删除讨论区', {:action => 'destroy', :id => @forum}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete)
{:action => 'edit', :id => @forum},
:method => 'get',
:title => l(:button_edit)
) if @forum.editable_by?(User.current) %>
<%= link_to(
image_tag('delete.png')+'删除讨论区',
{:action => 'destroy', :id => @forum},
:method => :delete,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if @forum.destroyable_by?(User.current) %> ) if @forum.destroyable_by?(User.current) %>
</span> </span>
<span> <span>
<%= link_to l(:label_memo_new_from_forum), new_forum_memo_path(@forum), :class => 'icon icon-add', <%= link_to l(:label_memo_new_from_forum), new_forum_memo_path(@forum), :class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %> :onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
</span> </span>
<%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %> <%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %>

@ -11,8 +11,8 @@
<div class="cl"></div> <div class="cl"></div>
<p> <p>
<% if journal.details.any? %> <% if journal.details.any? %>
<% details_to_strings(journal.details).each do |string| %> <% details_to_strings(journal.details).each do |string| %>
<p><%= string %></p> <p><%= string %></p>
<% end %> <% end %>
<% end %> <% end %>
</p> </p>

@ -14,8 +14,9 @@
</div> </div>
<div class="talk_txt fl"> <div class="talk_txt fl">
<p class="pro_page_tit" style="word-break:break-all;"> <p class="pro_page_tit" style="word-break:break-all;">
<%= @issue.subject %> <span class='<%= "#{get_issue_type(@issue.tracker_id)[0]} fl" %>'><%= get_issue_type(@issue.tracker_id)[1] %></span>
<span class='<%= "#{get_issue_type(@issue.tracker_id)[0]}" %>'><%= get_issue_type(@issue.tracker_id)[1] %></span> <span style="padding-left: 5px;"><%= @issue.subject %></span>
<span class='<%= "#{get_issue_priority(@issue.priority_id)[0]} " %>'><%= get_issue_priority(@issue.priority_id)[1] %></span>
</p><br/> </p><br/>
<div class="cl"></div> <div class="cl"></div>

@ -26,7 +26,7 @@
<li id="my_courses_li"> <li id="my_courses_li">
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id},target:"_blank", :class => "parent" %> <%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id},target:"_blank", :class => "parent" %>
<ul id="my_courses_ul"> <ul id="my_courses_ul">
<% user_course.each do |course| %> <% user_course.reverse.each do |course| %>
<li title="<%=course.name%>"> <li title="<%=course.name%>">
<%= link_to course.name, {:controller => 'courses',:action => 'show',:id => course.id},target:"_blank" %> <%= link_to course.name, {:controller => 'courses',:action => 'show',:id => course.id},target:"_blank" %>
</li> </li>
@ -40,7 +40,7 @@
<li id="my_projects_li"> <li id="my_projects_li">
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %> <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
<ul id="my_projects_ul" > <ul id="my_projects_ul" >
<% User.current.projects.each do |project| %> <% User.current.projects.reverse.each do |project| %>
<li title="<%=project.name%>"> <li title="<%=project.name%>">
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name }, target:"_blank" %> <%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name }, target:"_blank" %>
</li> </li>

@ -4,7 +4,7 @@
<ul class="course_sub_menu"> <ul class="course_sub_menu">
<% course_index = 0 %> <% course_index = 0 %>
<% User.current.courses.each do |course| %> <% User.current.courses.reverse.each do |course| %>
<% if !course_endTime_timeout?(course) %> <% if !course_endTime_timeout?(course) %>
<%= render :partial => 'layouts/user_homework_list', :locals => {:course => course,:course_index => course_index} %> <%= render :partial => 'layouts/user_homework_list', :locals => {:course => course,:course_index => course_index} %>
<% course_index += 1 %> <% course_index += 1 %>

@ -2,7 +2,7 @@
<li id="project_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"> <li id="project_loggedas_li" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name} %> <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name} %>
<ul class="project_sub_menu" style="top:<%= hasCourse ? 35 : 0 %>px;"> <ul class="project_sub_menu" style="top:<%= hasCourse ? 35 : 0 %>px;">
<% User.current.projects.each do |project| %> <% User.current.projects.reverse.each do |project| %>
<li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=project.name%>"> <li style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="<%=project.name%>">
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name } %> <%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name } %>
</li> </li>

@ -4,15 +4,15 @@
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'> <div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %></div> <div class="ping_dispic"><%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %></div>
<div class="ping_discon" style="width: 610px;"> <div class="ping_discon" style="width: 610px;">
<div class="ping_distop"> <div class="ping_distop f14">
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> --> <!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
<span><%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10', :target => "_blank" %> <span><%= link_to journal.user, user_path(journal.user), :class => 'c_blue fb fl mb10 f14', :target => "_blank" %>
</span><span class="c_grey fr"><%= format_time(journal.created_on) %></span> </span><span class="c_grey fr f14"><%= format_time(journal.created_on) %></span>
<div class="cl"></div> <div class="cl"></div>
<!--<p><%#= textilizable journal.notes%></p>--> <!--<p><%#= textilizable journal.notes%></p>-->
<p><%=journal.notes.html_safe%> <p><%=journal.notes.html_safe%>
</div> </div>
<div class="ping_disfoot"> <div class="ping_disfoot f14">
<% ids = 'project_respond_form_'+ journal.id.to_s%> <% ids = 'project_respond_form_'+ journal.id.to_s%>
<% if journal.user == User.current|| User.current.admin? %> <% if journal.user == User.current|| User.current.admin? %>
<%= link_to(l(:label_bid_respond_delete), <%= link_to(l(:label_bid_respond_delete),
@ -31,7 +31,7 @@
<div class="cl"></div> <div class="cl"></div>
<% ids = 'project_respond_form_'+ journal.id.to_s%> <% ids = 'project_respond_form_'+ journal.id.to_s%>
<% if reply_allow %> <% if reply_allow %>
<div id='<%= ids %>' class="respond-form"> <div id='<%= ids %>' class="respond-form f14">
<%= render :partial => 'words/new_respond_project', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %> <%= render :partial => 'words/new_respond_project', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %>
</div> </div>
<% end %> <% end %>

@ -11,16 +11,22 @@
<%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %> <%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %>
<% end %> <% end %>
</div> </div>
<div class="recall_con"> <div class="recall_con f14">
<% id = 'project_respond_form_'+ reply.id.to_s %> <% id = 'project_respond_form_'+ reply.id.to_s %>
<%= link_to "#{reply.user.show_name}(#{reply.user.login})", user_path(reply.user) %> <% if User.current.member_of_course?(@course) %>
<%= l(:label_reply_to)%> <%= link_to User.current.member_of_course?(@course)? "#{reply.user.show_name}(#{reply.user.login})" : "#{reply.user.login}" , user_path(reply.user) %>
<% if show_name %> <%= l(:label_reply_to)%>
<%= link_to "#{parent_jour.user.show_name}(#{parent_jour.user.login})", user_path(parent_jour.user) %> <% if show_name %>
<%= link_to "#{parent_jour.user.show_name}(#{parent_jour.user.login})", user_path(parent_jour.user) %>
<% else %>
<%#= 之所以改成这样是因为觉得没有真实姓名的用“匿名用户”替换不合理 %>
<%= link_to "#{parent_jour.user}", user_path(parent_jour.user) %>
<% end %>
<% else %> <% else %>
<%= l(:label_anonymous) %> <%= link_to "#{reply.user}", user_path(reply.user) %>
<%= l(:label_reply_to)%>
<%= link_to "#{parent_jour.user}", user_path(parent_jour.user) %>
<% end %> <% end %>
<p> <p>
<%= reply.notes.html_safe %> <%= reply.notes.html_safe %>
</p> </p>

@ -522,8 +522,7 @@
/* statusbar */ /* statusbar */
.ke-statusbar { .ke-statusbar {
position: relative; position: relative;
background-color: #F0F0EE;
border-top: 1px solid #CCCCCC;
font-size: 0; font-size: 0;
line-height: 0; line-height: 0;
*height: 12px; *height: 12px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 11 KiB

@ -159,7 +159,7 @@ a:hover.c_dblue{ color: #0781b4;}
.re_top input{ float:left;} .re_top input{ float:left;}
.re_search{ margin-top:7px; margin-left:5px;} .re_search{ margin-top:7px; margin-left:5px;}
.re_schbox{ width:240px; height:24px; border:1px solid #64bdd9; color:#666666;} .re_schbox{ width:240px; height:24px; border:1px solid #64bdd9; color:#666666;}
.re_schbtn{ width:60px; height:26px; color:#fff; margin-right:5px; border:none; margin-left:0px; } .re_schbtn{ width: 60px;height: 26px;color: #FFF;margin-right: 5px;margin-left: 0px;padding-left: 0px;border: medium none; }
a.re_fabu { display:block; width:90px; height:30px; font-size:14px; color:#fff; text-align:center; padding-top:10px; } a.re_fabu { display:block; width:90px; height:30px; font-size:14px; color:#fff; text-align:center; padding-top:10px; }
a:hover.re_fabu{background:#55a1b9;} a:hover.re_fabu{background:#55a1b9;}
.re_con{ margin:5px; width:665px;} .re_con{ margin:5px; width:665px;}

Loading…
Cancel
Save