From ad524f5a6c6aa43c68ac25c192ff050fa2d168cb Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 25 Aug 2015 19:41:22 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E3=80=81=E9=A1=B9=E7=9B=AE=E3=80=81=E8=B4=B4=E5=90=A7=E7=AD=89?= =?UTF-8?q?=E7=8B=AC=E8=87=AA=E7=9A=84=E6=90=9C=E7=B4=A2=E6=9D=A1=EF=BC=8C?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E7=BB=9F=E4=B8=80=E4=BD=BF=E7=94=A8=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F=E6=90=9C=E7=B4=A2=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/forums/index.html.erb | 8 ++++---- app/views/layouts/base_courses.html.erb | 26 ++++++++++++------------ app/views/layouts/base_forums.html.erb | 10 ++++----- app/views/layouts/base_projects.html.erb | 20 +++++++++--------- app/views/users/search.html.erb | 16 +++++++-------- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/app/views/forums/index.html.erb b/app/views/forums/index.html.erb index 18ac7f752..85cab957a 100644 --- a/app/views/forums/index.html.erb +++ b/app/views/forums/index.html.erb @@ -19,10 +19,10 @@ diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 6e9c98b95..adec9e6fd 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -51,16 +51,16 @@ <%= link_to @course.name, course_path(@course) %>

- + + + + + + + + + +
@@ -185,9 +185,9 @@
-
-<%= render :partial => 'layouts/footer' %> -
+
+ <%= render :partial => 'layouts/footer' %> +
<%= render :partial => 'layouts/new_feedback' %> - + + + + + + + + + +
diff --git a/app/views/users/search.html.erb b/app/views/users/search.html.erb index 13979f79f..a8401c406 100644 --- a/app/views/users/search.html.erb +++ b/app/views/users/search.html.erb @@ -28,14 +28,14 @@ - + + + + + + + + From 18029fcb227705cb4d00e391456d54a27441d5db Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 25 Aug 2015 20:06:25 +0800 Subject: [PATCH 02/12] 111 --- app/views/users/user_homeworks.html.erb | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb index 19ecf3588..db929d7ac 100644 --- a/app/views/users/user_homeworks.html.erb +++ b/app/views/users/user_homeworks.html.erb @@ -26,9 +26,13 @@
导入作业 -
+
+ +
-
+
+ +
@@ -38,14 +42,23 @@
- 附件名称附件名称附件名称附件名称附件附件名称件名称附件名称附件附件名称附件名称件名称附件名称附件附件名称附件名称件名称附件名称附件附件名称附件名称件名称附件名称附件附件名称附件名称附件附件名称附件名附件名称附件附件名称.png(123KB)
- 附件名称.zip(123KB)
+ + + 附件名称附件名称附件名称附件名称附件附件名称件名称附件名称附件附件名称附件名称件名称附件名称附件附件名称附件名称件名称附件名称附件附件名称附件名称件名称附件名称附件附件名称附件名称附件附件名称附件名附件名称附件附件名称.png(123KB) + + +
+ + 附件名称.zip(123KB) + +
上传附件 资源库 发送 - 取消 + + 取消
From cf12ee877ed4eedfe6a60b8c8715441dc63ef883 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 26 Aug 2015 09:11:03 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E7=BC=96=E8=BE=91=E8=B5=84=E6=96=99?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E4=B8=AA=E4=BA=BA=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/my_controller.rb | 2 +- app/views/my/account.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 1839dd1fd..4124472e1 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -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 diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index c23266afd..23fc1a3ad 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -30,7 +30,7 @@
  • 工作单位 : 
  • 地区 : 
  • 邮件通知 : 
  • -
  • 个人签名 : 
  • +
  • 个人简介 : 
  •   
  • @@ -141,7 +141,7 @@ <%= select_tag( 'user[mail_notification]', options_for_select( user_mail_notification_options(@user), @user.mail_notification) ) %> -
  • +
  • <%= f.select :language, :Chinese => :zh, :English => :en %>
  • From 757da1ec0a665f4e178b32b76f87b26fca6c01b3 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 26 Aug 2015 09:36:05 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E8=B5=84=E6=96=99=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 7 +------ public/javascripts/new_user.js | 1 + public/stylesheets/users.css | 7 +++++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 23fc1a3ad..c25363323 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -1,9 +1,4 @@ - - -
    +
      diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 377842b66..7fc515c4a 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -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(){ diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css index 9a809b7ce..967c7770b 100644 --- a/public/stylesheets/users.css +++ b/public/stylesheets/users.css @@ -70,7 +70,7 @@ a.select_btn_select{ background:#64bddb; color:#fff;} .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;/*滑动门的宽度*/} +#users_setting{clear:both;width:730px;background: #fff;padding: 10px;/*滑动门的宽度*/} /* TAB 切换效果 */ .users_tb_{ border-bottom:3px solid #CCC; height:26px; } .users_tb_ ul{height:26px; } @@ -144,4 +144,7 @@ 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;} \ No newline at end of file +.cr{clear: right;} + +div.content{padding-top:10px;} +.pcontent>.school_list,.content>.school_list { padding-left: 5px;} \ No newline at end of file From d735eee4a390b349a3956bad3e99b1de61590b98 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Wed, 26 Aug 2015 11:41:32 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=92=8C=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=85=B3=E6=B3=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 6 ++-- app/controllers/watchers_controller.rb | 37 ++++++++++++++++++++++-- app/views/layouts/new_base_user.html.erb | 6 ++-- app/views/users/_user_fans_item.html.erb | 9 ++++-- app/views/users/user_fanslist.html.erb | 20 +++++++++---- app/views/watchers/_set_watcher.js.erb | 8 +++-- public/stylesheets/new_user.css | 8 +++++ 7 files changed, 77 insertions(+), 17 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a12fa37e4..36dd35250 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1276,8 +1276,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 @@ -1287,7 +1287,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; diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb index 35e1d5ba4..a3cb2ef97 100644 --- a/app/controllers/watchers_controller.rb +++ b/app/controllers/watchers_controller.rb @@ -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]} } 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]} } end rescue Exception => e if e.message == "404" diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index 2944dd9cf..b5d9ba628 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -7,7 +7,7 @@ <%= csrf_meta_tag %> <%= favicon %> - <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'new_user', 'user_leftside','users', :media => 'all' %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'new_user', 'user_leftside','users',:media => 'all' %> <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> <%= javascript_heads %> <%= javascript_include_tag "bootstrap","avatars","new_user"%> @@ -66,14 +66,14 @@
    -
    +
    <%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
    关注
    -
    +
    <%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
    粉丝
    diff --git a/app/views/users/_user_fans_item.html.erb b/app/views/users/_user_fans_item.html.erb index 4ca8fbefc..b3fc7905c 100644 --- a/app/views/users/_user_fans_item.html.erb +++ b/app/views/users/_user_fans_item.html.erb @@ -1,3 +1,5 @@ +<% unless list.nil?%> +<% for item in list %> + <% if(User.current.logged? && User.current != item )%> <%if(item.watched_by?(User.current))%> - 取消关注 + 取消关注 <% else %> - 添加关注 + 添加关注 <% end %> <% end %>
    +<% end %> +<% end %> \ No newline at end of file diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb index 0b42da9f8..29176aadc 100644 --- a/app/views/users/user_fanslist.html.erb +++ b/app/views/users/user_fanslist.html.erb @@ -1,4 +1,12 @@ -
    + +
    <% if @action == 'fans' %> @@ -13,13 +21,15 @@ <% end %>
    - <% for item in @list %> - <%= render :partial => 'users/user_fans_item', :locals => {:item => item,:target=>@user} %> - <% end %> +
    + <%# for item in @list %> + <%= render :partial => 'users/user_fans_item', :locals => {:list => @list,:target=>@user,:action_name=>@action,:page=>params[:page]} %> + <%# end %> +

    <%= l(:label_no_data) %>

      <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
    -
    + diff --git a/app/views/watchers/_set_watcher.js.erb b/app/views/watchers/_set_watcher.js.erb index 1efa8a4a1..5420b3616 100644 --- a/app/views/watchers/_set_watcher.js.erb +++ b/app/views/watchers/_set_watcher.js.erb @@ -5,10 +5,14 @@ $("#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") %>'); //在其他用户的粉丝、关注页面 <% 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 %> diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index fb16d39c5..4bddb54bb 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -619,6 +619,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); +} /*底部*/ From ccfa93be6600d910e6d1c234cc440880db3bab20 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 26 Aug 2015 13:56:37 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E8=80=81=E5=B8=88=E5=B8=83=E7=BD=AE?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../users/_user_homework_attachment.html.erb | 65 +++++++++++++++++++ app/views/users/_user_homework_form.html.erb | 56 ++++++++++++++++ app/views/users/user_homeworks.html.erb | 52 ++------------- public/javascripts/new_user.js | 3 + public/stylesheets/new_user.css | 11 ++++ public/stylesheets/users.css | 18 ++--- 6 files changed, 148 insertions(+), 57 deletions(-) create mode 100644 app/views/users/_user_homework_attachment.html.erb create mode 100644 app/views/users/_user_homework_form.html.erb diff --git a/app/views/users/_user_homework_attachment.html.erb b/app/views/users/_user_homework_attachment.html.erb new file mode 100644 index 000000000..9e198a762 --- /dev/null +++ b/app/views/users/_user_homework_attachment.html.erb @@ -0,0 +1,65 @@ +
    + + <% if defined?(container) && container && container.saved_attachments %> + <% container.attachments.each_with_index do |attachment, 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;") %> + <%= l(:field_is_public)%>: + <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> + <%= link_to(' '.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}" %> + + <% end %> + <% container.saved_attachments.each_with_index do |attachment, 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;") %> + <%= l(:field_is_public)%>: + <%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%> + <%= link_to(' '.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}" %> + + <% end %> +<% end %> + + <% project = project %> + + <%= 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) + } %> + + <%= l(:label_no_file_uploaded)%> + + (<%= l(:label_max_size) %>: + <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) + + + <% content_for :header_tags do %> + <%= javascript_include_tag 'attachments' %> + <% end %> +
    + + + + + + + + + \ No newline at end of file diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb new file mode 100644 index 000000000..3a4c3496c --- /dev/null +++ b/app/views/users/_user_homework_form.html.erb @@ -0,0 +1,56 @@ +<%= javascript_include_tag "/assets/kindeditor/kindeditor" %> +
    +
    + +
    +
    + +
    + 导入作业 + + <%= calendar_for('homework_end_time')%> + + + + + + + +
    +
    + +
    + <% 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 %> +
    +
    + +
    + +
    +
    + +
    + <%= render :partial => 'attachments/new_form', :locals => {:container => homework} %> +
    +
    + + +
    + + + + + +
    +
    \ No newline at end of file diff --git a/app/views/users/user_homeworks.html.erb b/app/views/users/user_homeworks.html.erb index db929d7ac..48666a0cb 100644 --- a/app/views/users/user_homeworks.html.erb +++ b/app/views/users/user_homeworks.html.erb @@ -19,54 +19,10 @@
    发布作业
    - + <% 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%>
    <% end%> diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js index 7fc515c4a..42a1271cd 100644 --- a/public/javascripts/new_user.js +++ b/public/javascripts/new_user.js @@ -11,6 +11,9 @@ $(function(){ $("#edit_user_file_btn").hide(); $("#watch_user_btn").hide(); }); + + //日历选择样式 + //$(".ui-datepicker-trigger").replaceWith("
    ") }); //编辑个人简介 diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index fb16d39c5..4326dae41 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -834,6 +834,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; +} + diff --git a/public/stylesheets/users.css b/public/stylesheets/users.css index 967c7770b..4a54724fd 100644 --- a/public/stylesheets/users.css +++ b/public/stylesheets/users.css @@ -135,16 +135,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;} \ No newline at end of file From 686af68026f6d0e76fd856b902795a829613ed31 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 26 Aug 2015 14:11:28 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E5=85=B3=E6=B3=A8=E3=80=81=E7=B2=89?= =?UTF-8?q?=E4=B8=9D=E3=80=81=E7=BC=96=E8=BE=91=E8=B5=84=E6=96=99=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/new_base_user.html.erb | 2 +- app/views/users/user_fanslist.html.erb | 2 +- public/stylesheets/new_user.css | 3 ++- public/stylesheets/users.css | 2 -- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb index b5d9ba628..315960a4c 100644 --- a/app/views/layouts/new_base_user.html.erb +++ b/app/views/layouts/new_base_user.html.erb @@ -47,7 +47,7 @@ <% end%>
    - +
    +
    + +
    + 我已阅读并接受Trustie服务协议条款