Merge branch 'sw_new_course' of http://repository.trustie.net/xianbo/trustie2 into sw_new_course

This commit is contained in:
cxt 2015-08-26 15:25:15 +08:00
commit eed1939d2f
20 changed files with 290 additions and 162 deletions

View File

@ -137,7 +137,7 @@ class MyController < ApplicationController
@se.identity = params[:identity].to_i if params[:identity]
@se.technical_title = params[:technical_title] if params[:technical_title]
@se.student_id = params[:no] if params[:no]
@se.brief_introduction = params[:brief_introduction]
# @se.brief_introduction = params[:brief_introduction]
@se.description = params[:description]
if @user.save && @se.save

View File

@ -45,7 +45,7 @@ class UsersController < ApplicationController
:activity_new_score_index, :influence_new_score_index, :score_new_index,:update_score,:user_activities,:user_projects_index,
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,
:user_resource,:user_resource_create,:user_resource_delete,:rename_resource,:search_user_course,:add_exist_file_to_course,
:search_user_project,:resource_preview,:resource_search,:add_exist_file_to_project,:user_messages]
:search_user_project,:resource_preview,:resource_search,:add_exist_file_to_project,:user_messages,:edit_brief_introduction]
#edit has been deleted by huang, 2013-9-23
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses,
:user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
@ -1280,8 +1280,8 @@ class UsersController < ApplicationController
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
render :template=>'users/user_fanslist',:layout=>'base_users_new'
@action = 'watch'
render :template=>'users/user_fanslist',:layout=>'new_base_user'
end
###add by huang
def user_fanslist
@ -1291,7 +1291,7 @@ class UsersController < ApplicationController
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'fans'
render :layout=>'base_users_new'
render :layout=>'new_base_user'
end
def user_visitorlist
limit = 10;
@ -1315,47 +1315,6 @@ class UsersController < ApplicationController
end
end
# added by bai
def topic_score_index
end
def project_score_index
end
def activity_score_index
end
def influence_score_index
end
def score_index
end
# end
def topic_new_score_index
end
def project_new_score_index
end
def activity_new_score_index
end
def influence_new_score_index
end
def score_new_index
end
def update_score
@user = User.find(params[:id])
end

View File

@ -22,9 +22,26 @@ class WatchersController < ApplicationController
def watch
s = WatchesService.new
watchables = s.watch params.merge(:current_user_id => User.current.id)
if params[:action_name] == 'watch'
limit = 10;
query = User.watched_by(params[:target_id]);
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'watch'
elsif params[:action_name] == 'fans'
limit = 10;
query = User.find(params[:target_id]).watcher_users;
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'fans'
else
end
respond_to do |format|
format.html { redirect_to_referer_or {render :text => (true ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'add'} }
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'add',:list => @list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} }
end
rescue Exception => e
if e.message == "404"
@ -38,9 +55,25 @@ class WatchersController < ApplicationController
def unwatch
s = WatchesService.new
watchables = s.unwatch params.merge(:current_user_id => User.current.id)
if params[:action_name] == 'watch'
limit = 10;
query = User.watched_by(params[:target_id]);
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'watch'
elsif params[:action_name] == 'fans'
limit = 10;
query = User.find(params[:target_id]).watcher_users;
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'fans'
else
end
respond_to do |format|
format.html { redirect_to_referer_or {render :text => (false ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'delete'} }
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'delete',:list=>@list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} }
end
rescue Exception => e
if e.message == "404"

View File

@ -66,7 +66,7 @@
}
function register(){
if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct){
if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
$("#main_reg_form").submit();
}else{
$('#user_login').blur();
@ -168,7 +168,7 @@
<div class="loginChooseBox">
<div class="mb5">
<ul class="loginChooseList">
<li class="loginChoose fl"><span class="loginChooseTab">登</span></li>
<li class="loginChoose fl"><span class="loginChooseTab">登</span></li>
<li class="loginChooseBorder fl"></li>
</ul>
</div>
@ -206,7 +206,7 @@
</a></div>
<% end %>
<div class="loginInButton" >
<a href="javascript:void(0);" class="c_white db" onclick="login();">登陆</a>
<a href="javascript:void(0);" class="c_white db" onclick="$('#main_login_form').submit();">登录</a>
</div>
</div>
@ -242,6 +242,11 @@
<%= f.text_field :login, :size => 25,:placeholder=>"请输入用户昵称",:class=>'loginSignBox'%>
<div class="loginSignAlert" id="login_req" style="display: none">用户昵称为2-18个中英文数字或下划线</div>
</div>
<div class="loginSignOption">
<div class="fl mt3 mr5">
<input type="checkbox" id="read_and_confirm"/>
</div>
我已阅读并接受<a href="javascript:void(0);" class="newsBlue"><u>Trustie服务协议</u></a>条款</div>
<div class="loginUpButton">
<a href="javascript:void(0);" class="c_white db" onclick="register();">注册</a>

View File

@ -19,10 +19,10 @@
</td>
<td rowspan="2" width="250px" >
<div class="top-content-search">
<%= form_tag(:controller => 'forums', :action => "search_forum", :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20 %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<% end %>
<%#= form_tag(:controller => 'forums', :action => "search_forum", :method => :get) do %>
<%#= text_field_tag 'name', params[:name], :size => 20 %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<%# end %>
</div>
</td>
</tr>

View File

@ -51,16 +51,16 @@
<%= link_to @course.name, course_path(@course) %>
</p>
</div>
<div class="search fl">
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get, :class => "search_form") do %>
<input class="search_text fl" id="name" name="name" onkeyup="regexName('搜索条件不能为空');" placeholder="课程名称" type="text">
<a href="javascript:void(0)" onclick="submitSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >
<%= l(:label_search)%>
</a>
<div class="cl"></div>
<span id="project_name_span" style="float: left"></span>
<% end %>
</div>
<!--<div class="search fl">-->
<!--<%#= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get, :class => "search_form") do %>-->
<!--<input class="search_text fl" id="name" name="name" onkeyup="regexName('搜索条件不能为空');" placeholder="课程名称" type="text">-->
<!--<a href="javascript:void(0)" onclick="submitSerch('<%#= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >-->
<!--<%#= l(:label_search)%>-->
<!--</a>-->
<!--<div class="cl"></div>-->
<!--<span id="project_name_span" style="float: left"></span>-->
<!--<%# end %>-->
<!--</div>-->
</div><!--TopBar end-->
<div class="cl"></div>
<div id="content">

View File

@ -40,11 +40,11 @@
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td rowspan="2" width="250px">
<div class="top-content-search">
<%= form_tag(:controller => 'forums', :action => "search_memo", :id => params[:id], :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20 %>
<%= hidden_field_tag 'forum_id', params[:id] %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<% end %>
<%#= form_tag(:controller => 'forums', :action => "search_memo", :id => params[:id], :method => :get) do %>
<%#= text_field_tag 'name', params[:name], :size => 20 %>
<%#= hidden_field_tag 'forum_id', params[:id] %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<%# end %>
</div>
</td>
</tr>

View File

@ -49,16 +49,16 @@
<%= link_to l(:field_homepage), home_path %> > <a href="http://<%= Setting.host_name %>"><%=l(:label_project_hosting_platform) %> </a>><%= link_to @project.name, project_path(@project.id) %>
</p>
</div>
<div class="search fl">
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form", :class => "search_form") do %>
<%= text_field_tag 'name', params[:name], :placeholder => "项目名称", :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>
<a href="#" onclick="submitSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >
<%= l(:label_search)%>
</a>
<div class="cl"></div>
<span id="project_name_span" class="fl"></span>
<% end %>
</div>
<!--<div class="search fl">-->
<!--<%#= form_tag(projects_search_path, :method => :get, :id => "project_search_form", :class => "search_form") do %>-->
<!--<%#= text_field_tag 'name', params[:name], :placeholder => "项目名称", :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>-->
<!--<a href="#" onclick="submitSerch('<%#= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >-->
<!--<%#= l(:label_search)%>-->
<!--</a>-->
<!--<div class="cl"></div>-->
<!--<span id="project_name_span" class="fl"></span>-->
<!--<%# end %>-->
<!--</div>-->
</div><!--TopBar end-->
<div id="content">

View File

@ -47,7 +47,7 @@
<% end%>
</div>
<div>
<div class="homepageImageName hidden">
<div class="homepageImageName hidden db">
<%= @user.login %>
</div>
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
@ -66,14 +66,14 @@
</div>
<div>
<div class="homepageImageBlock">
<div>
<div id="watch_user_number_div">
<%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
</div>
<div class="homepageImageText">关注</div>
</div>
<div class="homepageVerDiv"></div>
<div class="homepageImageBlock">
<div>
<div id="fans_user_number_div">
<%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
</div>
<div class="homepageImageText">粉丝</div>

View File

@ -1,9 +1,4 @@
<style>
div.content{padding-top:10px;}
.pcontent>.school_list,.content>.school_list { padding-left: 5px;}
</style>
<div id="RSide" class="fl">
<div class="fl">
<div id="users_setting">
<div id="users_tb_" class="users_tb_">
<ul>
@ -30,7 +25,7 @@
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">工作单位&nbsp;:&nbsp;</li>
<li>地区&nbsp;:&nbsp;</li>
<li>邮件通知&nbsp;:&nbsp;</li>
<li>个人签名&nbsp;:&nbsp;</li>
<!--<li>个人签名&nbsp;:&nbsp;</li>-->
<li>个人简介&nbsp;:&nbsp;</li>
<li>&nbsp;&nbsp;</li>
</ul>
@ -141,7 +136,7 @@
<%= select_tag( 'user[mail_notification]', options_for_select( user_mail_notification_options(@user), @user.mail_notification) ) %>
<label>不要发送对我自己提交的修改的通知<%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified],:style=>"height:14px;" %></label>
</li>
<li><input name="brief_introduction" class="w450" type="text" maxlength="255" value="<%= (@user.user_extensions.nil?) ? '' : @user.user_extensions.brief_introduction %>"></li>
<!--<li><input name="brief_introduction" class="w450" type="text" maxlength="255" value="<%#= (@user.user_extensions.nil?) ? '' : @user.user_extensions.brief_introduction %>"></li>-->
<li style="height:auto;"><textarea name="description" class="w450 h200" maxlength="255" style="resize:none;"><%= (@user.user_extensions.nil?) ? '' : @user.user_extensions.description %></textarea></li>
<li style="display:none;"><%= f.select :language, :Chinese => :zh, :English => :en %></li>
<li class="ml2">

View File

@ -1,3 +1,5 @@
<% unless list.nil?%>
<% for item in list %>
<div class="courses_list line" id="fans_item_<%=item.id%>">
<div class="courses_list_pic fl">
<a href="<%= user_path(item) %>">
@ -39,12 +41,15 @@
</tr></tbody></table>
</div>
</div>
<!-- 如果只有自己的关注页面才能关注人 取消关注操作,那么还要加 一句&& User.current.id == target.id-->
<% if(User.current.logged? && User.current != item )%>
<%if(item.watched_by?(User.current))%>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id) %>" class="grey_n_btn fr mt20" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id,:action_name=>action_name,:page=>page) %>" class="grey_n_btn fr mt20" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
<% else %>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id) %>" class="blue_n_btn fr mt20" data-method="post" data-remote="true" title="添加关注">添加关注</a>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id,:action_name=>action_name,:page=>page) %>" class="blue_n_btn fr mt20" data-method="post" data-remote="true" title="添加关注">添加关注</a>
<% end %>
<% end %>
<div class="cl"></div>
</div>
<% end %>
<% end %>

View File

@ -0,0 +1,65 @@
<div class="fl">
<span id="attachments_fields" class="attachments_fields">
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename link_file', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% container.saved_attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% end %>
</span>
<% project = project %>
<span class="add_attachment" style="font-weight:normal;">
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn', :style => ie8? ? 'display:none' : '' %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => ie8? ? '' : 'file_selector',
:multiple => true,
:onchange => 'addInputFiles(this);',
:style => ie8? ? '' : 'display:none',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
:upload_path => uploads_path(:format => 'js',:project =>project),
:description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure),
:file_count => l(:label_file_count),
:delete_all_files => l(:text_are_you_sure_all)
} %>
<span id="upload_file_count">
<%= l(:label_no_file_uploaded)%>
</span>
(<%= l(:label_max_size) %>:
<%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
</span>
<% content_for :header_tags do %>
<%= javascript_include_tag 'attachments' %>
<% end %>
</div>
<textarea class="InputBox fl W120 " placeholder="截止日期"></textarea>
<a href="javascript:void(0);" class="fl mr10">
<img src="../images/Calendar.png" width="16" height="15" class="calendarContainer calendar1" />
</a>
<a href="javascript:void(0);" class="fl mr10">
<img src="../images/Calendar_hover.png" width="16" height="15" class="calendarContainer calendar1Active" />
</a>

View File

@ -0,0 +1,56 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
<div class="HomeWorkCon">
<div class="mt15">
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox W700" maxlength="255" onkeyup="regex_homework_name();" placeholder="请输入作业标题" value="<%= homework.name%>" >
</div>
<div class="cl"></div>
<div class=" mt10">
<a href="javascript:void(0);" class="BlueCirBtn fl mr10">导入作业</a>
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120" readonly="readonly" value="<%= homework.end_time%>" >
<%= calendar_for('homework_end_time')%>
<!--<div class="fl DateBorder mr10">-->
<!--<a href="javascript:void(0);" class="pic_date "></a>-->
<!--</div>-->
<!--<textarea class="InputBox fl W120 " placeholder="发布日期"></textarea>-->
<!--<div class="fl DateBorder" >-->
<!--<a href="javascript:void(0);" class="pic_date "></a>-->
<!--</div>-->
</div>
<div class="cl"></div>
<div class="mt10">
<% if edit_mode %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:height => "150px",:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
<% else %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:height => "150px" %>
<% end %>
</div>
<div class="cl"></div>
<div class="mt10">
<input type="text" class="InputBox W700 SearchIcon" placeholder="发送到课程" />
</div>
<div class="cl"></div>
<div class="mt10">
<%= render :partial => 'attachments/new_form', :locals => {:container => homework} %>
</div>
<div class="cl"></div>
<div class="mt5">
<a href="javascript:void(0);" class="AnnexBtn fl mt3">上传附件</a>
<a href="javascript:void(0);" class="FilesBtn fl mr15 mt3">资源库</a>
<a href="javascript:void(0);" class="BlueCirBtnMini fr">发送</a>
<span class="fr mr10 mt3">或</span>
<a href="javascript:void(0);" class=" fr mr10 mt3">取消</a>
</div>
<div class="cl"></div>
<!--<div class="mt10">-->
<!--<a href="javascript:void(0);" class=" fl DropBtn">高级功能</a>-->
<!--<div class="DropLine" ></div>-->
<!--<div class="cl"></div>-->
<!--</div>-->
</div>
<div class="cl"></div>

View File

@ -28,14 +28,14 @@
<td rowspan="2">
</td>
<td rowspan="2" >
<div class="project-search" style="float: right">
<!--label for="user_browse_label"><%#= l(:label_user_search_type) %></label-->
<%= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]],@search_by), :onchange => "searchByChange();",:style=>'display:none;' ) %>
<%= text_field_tag 'name', params[:name], :size => 30, :placeholder=>'昵称/姓名/邮箱' %>
<input type="text" name="search_by_input" hidden="hidden;" id="search_by_input" value="0">
<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
</div>
<!--<div class="project-search" style="float: right">-->
<!--&lt;!&ndash;label for="user_browse_label"><%#= l(:label_user_search_type) %></label&ndash;&gt;-->
<!--<%#= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]],@search_by), :onchange => "searchByChange();",:style=>'display:none;' ) %>-->
<!--<%#= text_field_tag 'name', params[:name], :size => 30, :placeholder=>'昵称/姓名/邮箱' %>-->
<!--<input type="text" name="search_by_input" hidden="hidden;" id="search_by_input" value="0">-->
<!--<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/>-->
<!--<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>-->
<!--</div> -->
</td>
</tr>
<tr>

View File

@ -1,25 +1,35 @@
<div id="RSide" class="fl">
<div class="courses_box">
<!--<div id="RSide" class="fl">-->
<script>
function addWatch(){
}
function cancelWatch(){
}
</script>
<div class="courses_box" id="users_setting">
<div class="courses_top mb10" id="<%= (@action == 'fans' || @action == 'visitor' ) ? 'nh_fans_list' : 'nh_wacth_list' %>">
<% if @action == 'fans' %>
<h2 class="courses_h2 fl">粉丝</h2>
<div class="courses_select fr">共有<span class="c_orange" nh_name="fans_count"><%=@obj_count%></span>名粉丝</div>
<div class="courses_select fr">共有<span class="c_orange" nh_name="fans_count" id="fans_span"><%=@obj_count%></span>名粉丝</div>
<% elsif @action == 'visitor' %>
<h2 class="courses_h2 fl">访客</h2>
<div class="courses_select fr">共有<span class="c_orange"><%=@obj_count%></span>访客</div>
<% else %>
<h2 class="courses_h2 fl">关注</h2>
<div class="courses_select fr">一共关注<span class="c_orange" nh_name="watcher_count"><%=@obj_count%></span>人</div>
<div class="courses_select fr">一共关注<span class="c_orange" nh_name="watcher_count" id="watch_span"><%=@obj_count%></span>人</div>
<% end %>
<div class="cl"></div>
</div>
<% for item in @list %>
<%= render :partial => 'users/user_fans_item', :locals => {:item => item,:target=>@user} %>
<% end %>
<div id="users_list">
<%# for item in @list %>
<%= render :partial => 'users/user_fans_item', :locals => {:list => @list,:target=>@user,:action_name=>@action,:page=>params[:page]} %>
<%# end %>
</div>
<p id="nodata" class="nodata" style="display:<%= @list.count > 0 ? 'none' : 'block' %>;"><%= l(:label_no_data) %></p>
</div>
<ul class="wlist" style=" border:none;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>
</div>
<!--</div>-->

View File

@ -19,41 +19,10 @@
<div class="RightBanner">
<div class="NewsBannerName">发布作业</div>
</div>
<div class="HomeWorkCon">
<div class="mt15">
<textarea class="InputBox W700 " placeholder="请输入作业标题"></textarea>
</div>
<div class=" mt10">
<a href="javascript:void(0);" class="BlueCirBtn fl mr10">导入作业</a>
<textarea class="InputBox fl W120 " placeholder="截止日期"></textarea>
<div class="fl DateBorder mr10"><a href="javascript:void(0);" class="pic_date "></a></div>
<textarea class="InputBox fl W120 " placeholder="发布日期"></textarea>
<div class="fl DateBorder" ><a href="javascript:void(0);" class="pic_date "></a></div>
<div class="cl"></div>
</div>
<div class="mt10">
<textarea class="InputBox W700" placeholder="请输入作业描述"></textarea>
</div>
<div class="mt10">
<textarea class="InputBox W700 SearchIcon" placeholder="发送到课程"></textarea>
</div>
<div class="mt10">
<span class="pic_img fl "></span><a href="javascript:void(0);" class=" fl FilesName02">附件名称附件名称附件名称附件名称附件附件名称件名称附件名称附件附件名称附件名称件名称附件名称附件附件名称附件名称件名称附件名称附件附件名称附件名称件名称附件名称附件附件名称附件名称附件附件名称附件名附件名称附件附件名称.png123KB</a><span class="pic_del fl "></span><div class="cl"></div>
<span class="pic_files fl "></span><a href="javascript:void(0);" class=" fl FilesName02">附件名称.zip123KB</a><span class="pic_del fl "></span><div class="cl"></div>
</div>
<div class="mt5">
<a href="javascript:void(0);" class="AnnexBtn fl mt3">上传附件</a>
<a href="javascript:void(0);" class="FilesBtn fl mr15 mt3">资源库</a>
<a href="javascript:void(0);" class="BlueCirBtnMini fr">发送</a>
<span class="fr mr10 mt3">或</span><a href="javascript:void(0);" class=" fr mr10 mt3">取消</a>
<div class="cl"></div>
</div>
<div class="mt10">
<a href="javascript:void(0);" class=" fl DropBtn">高级功能</a>
<div class="DropLine" ></div>
<div class="cl"></div>
</div>
</div>
<% homework = HomeworkCommon.new %>
<%= labelled_form_for homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
<%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %>
<% end%>
</div><!----HomeWork end-->
<% end%>

View File

@ -5,10 +5,16 @@
$("#user_fans_number").html("<%= watched.first.watcher_users.count.to_s%>");
//在当前用户的粉丝、关注页面
<% elsif( params[:target_id] == User.current.id.to_s )%>
$("#users_list").html("<%= escape_javascript (render :partial => 'users/user_fans_item', :locals => {:list => list,:target=>User.current,:action_name=>action_name,:page=>params[:page]}) %>");
$("#watch_user_number_div").html('<%= escape_javascript ( link_to User.watched_by(params[:target_id]).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>params[:target_id]},:class=>"homepageImageNumber") %>');
$("#fans_user_number_div").html('<%= escape_javascript ( link_to User.find(params[:target_id]).watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>params[:target_id]},:class=>"homepageImageNumber", :id => "user_fans_number") %>');
$("#fans_span").html('<%= count %>');
$("#watch_span").html('<%= count %>');
//在其他用户的粉丝、关注页面
<% else %>
$("#users_list").html("<%= escape_javascript (render :partial => 'users/user_fans_item', :locals => {:list => list,:target=>User.find(params[:target_id]),:action_name=>action_name,:page=>params[:page]}) %>");
//在他人的用户分析下关注,不会改变他人的关注数,所以不必要刷新
//$("#watch_user_number").html('<%#= escape_javascript ( link_to User.watched_by(params[:target_id]).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>params[:target_id]},:class=>"homepageImageNumber") %>');
<% end %>
<% else %>

View File

@ -1,6 +1,7 @@
$(function(){
//右侧最小高度 = 左侧高度 - 15px 保证两边高度基本一样,页面美观
$("#RSide").css("min-height",$("#LSide").height()-15);
$("#users_setting").css("min-height",$("#LSide").height()-35);
//头像相关
$("#homepage_portrait_image").live("mouseover",function(){
@ -10,6 +11,9 @@ $(function(){
$("#edit_user_file_btn").hide();
$("#watch_user_btn").hide();
});
//日历选择样式
//$(".ui-datepicker-trigger").replaceWith("<div class='fl DateBorder mr10'><img class='ui-datepicker-trigger'></div>")
});
//编辑个人简介

View File

@ -10,6 +10,7 @@ a:hover,a:active{color:#000;}
/*常用*/
/*#RSide{ background:#fff;}*/
#users_setting{clear:both;width:730px;background: #fff;padding: 10px;/*滑动门的宽度*/}
/*上传图片处理*/
.upload_img img{max-width: 100%;}
blockquote img{max-width: 100%;}
@ -342,7 +343,7 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
a.sendButtonBlue {color:#15bccf;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#15bccf;}
.db {display:block;}
.db {display:block !important;}
.dropdown-menu {
position: absolute;
@ -619,6 +620,14 @@ a.loginChooseTab {color:#484848; height:30px; display:block;}
.loginSignAlert {font-size:12px; margin-left:60px;}
.loginSignRow {height:60px; min-height:60px;}
/*关注列表*/
.inf_user_image{ padding-left:8px; margin:0px; background-color:#fff; height: auto;padding-bottom: 8px;}
ul.list_watch{
padding-left: 0px;
list-style-type:none;
height:auto;
border-bottom: 1px dashed rgb(204, 204, 204);
}
/*底部*/
@ -834,6 +843,17 @@ a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflo
.ProResultUl li{ line-height:35px; border-bottom:1px solid #dddddd; }
.DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;}
/*日历选择图*/
img.ui-datepicker-trigger {
display:block;
background:url(../images/public_icon.png) -31px 0 no-repeat;
cursor: pointer;
vertical-align: middle;
width:16px;
height:15px;
float:left;
}

View File

@ -69,8 +69,6 @@ a.select_btn_select{ background:#64bddb; color:#fff;}
.wlist a{ float:left; border:1px solid #64bdd9; padding:0 5px; margin-left:3px; color:#64bdd9;}
.wlist a:hover{border:1px solid #64bdd9; background-color:#64bdd9; color:#fff; text-decoration:none;}
.wlist_select a { background-color:#48aac9; color:#fff;}
/* 设置 */
#users_setting{clear:both;width:730px;/*滑动门的宽度*/}
/* TAB 切换效果 */
.users_tb_{ border-bottom:3px solid #CCC; height:26px; }
.users_tb_ ul{height:26px; }
@ -135,13 +133,16 @@ a:hover.c_lgrey{ color:#3ca5c6;}
.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
a.hidepic>img{display:none;}
/*a.hidepic>img{display:none;}*/
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
.cr{clear: right;}
/*div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}*/
/*span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}*/
/*span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}*/
/*div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}*/
/*span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}*/
/*span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}*/
/*div.ke-toolbar .ke-outline{border:none;}*/
/*.cr{clear: right;}*/
div.content{padding-top:10px;}
.pcontent>.school_list,.content>.school_list { padding-left: 5px;}