diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index e3dbb5023..a46e10da5 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -52,6 +52,10 @@ module Mobile time_from_now issue.created_on when :act_id issue.id + when :act_type + 'Journal' + when :praise_count + get_activity_praise_num(issue) end end end diff --git a/app/api/mobile/entities/news.rb b/app/api/mobile/entities/news.rb index a64081d8a..d8c4dcab3 100644 --- a/app/api/mobile/entities/news.rb +++ b/app/api/mobile/entities/news.rb @@ -36,6 +36,10 @@ module Mobile time_from_now f.created_on when :act_id f.id + when :praise_count + get_activity_praise_num(f) + when :act_type + 'Comment' end elsif f.is_a?(Hash) && !f.key?(field) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 25cc85ae2..334101bb0 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -777,8 +777,15 @@ class AdminController < ApplicationController #留言列表 def leave_messages + notes1, notes2, notes3 = '', '', '' + begin + notes1 = Message.find(19292).content + notes2 = Message.find(19291).content + notes3 = Message.find(19504).content + rescue => e + end @jour = JournalsForMessage.find_by_sql("SELECT * FROM journals_for_messages AS j1 - WHERE j1.jour_type IN ('Course','Principal') AND (j1.m_parent_id IS NULL OR (j1.m_parent_id IN (SELECT id FROM journals_for_messages WHERE jour_type IN ('Course','Principal')))) order by created_on desc") + WHERE j1.jour_type IN ('Course','Principal') AND (j1.m_parent_id IS NULL OR (j1.m_parent_id IN (SELECT id FROM journals_for_messages WHERE jour_type IN ('Course','Principal')))) AND j1.notes !='#{notes1}' AND j1.notes !='#{notes2}' AND j1.notes !='#{notes3}' order by created_on desc") @jour = paginateHelper @jour,30 @page = (params['page'] || 1).to_i - 1 respond_to do |format| diff --git a/app/views/courses/_new_member_list.html.erb b/app/views/courses/_new_member_list.html.erb index 720dfceea..08df18175 100644 --- a/app/views/courses/_new_member_list.html.erb +++ b/app/views/courses/_new_member_list.html.erb @@ -54,11 +54,11 @@ <% unless @course.course_groups.empty? %> diff --git a/app/views/layouts/_new_feedback.html.erb b/app/views/layouts/_new_feedback.html.erb index 19b930826..ea63f680f 100644 --- a/app/views/layouts/_new_feedback.html.erb +++ b/app/views/layouts/_new_feedback.html.erb @@ -3,6 +3,7 @@
+
diff --git a/app/views/layouts/_syllabus_teacher_list.html.erb b/app/views/layouts/_syllabus_teacher_list.html.erb index 71fd67a75..344036ccf 100644 --- a/app/views/layouts/_syllabus_teacher_list.html.erb +++ b/app/views/layouts/_syllabus_teacher_list.html.erb @@ -1,21 +1,21 @@ -

教师团队 - 增加教师 -
-

-
    - <% teacher = syllabus.user %> - <%# teachers.each do |teacher| %> -
  • - <%= link_to image_tag(url_to_avatar(teacher), :width => "60", :height => "60", :class => "sy_teachers_img fl mr15"), user_path(teacher), :target => "_blank", :alt => "用户头像" %> -
    - <%= link_to teacher.show_name, user_path(teacher), :class => "sy_teachers_name", :target => "_blank" %> - - <% if teacher.user_extensions && teacher.user_extensions.identity %> - <%= get_user_roll teacher %> - <% end%> - -
    -
    -
  • - <%# end %> +

    教师团队 + 增加教师 +
    +

    +
      + <% teacher = syllabus.user %> + <%# teachers.each do |teacher| %> +
    • + <%= link_to image_tag(url_to_avatar(teacher), :width => "60", :height => "60", :class => "sy_teachers_img fl mr15"), user_path(teacher), :target => "_blank", :alt => "用户头像" %> +
      + <%= link_to teacher.show_name, user_path(teacher), :class => "sy_teachers_name hidden", :target => "_blank", :title => teacher.show_name %> + + <% if teacher.user_extensions && teacher.user_extensions.identity %> + <%= get_user_roll teacher %> + <% end%> + +
      +
      +
    • + <%# end %>
    \ No newline at end of file diff --git a/app/views/layouts/base_syllabus.html.erb b/app/views/layouts/base_syllabus.html.erb index b29c24fe6..9bd4a25c0 100644 --- a/app/views/layouts/base_syllabus.html.erb +++ b/app/views/layouts/base_syllabus.html.erb @@ -1,148 +1,157 @@ - - - - - <%= h html_title %> - - - <%= csrf_meta_tag %> - <%= favicon %> - <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public','css/structure','css/courses','css/popup','prettify','syllabus','sy_public',:media => 'all'%> - <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> - <%= javascript_heads %> - <%= javascript_include_tag "bootstrap","avatars","course",'attachments','prettify','syllabus','cookie'%> - <%= heads_for_theme %> - <%= call_hook :view_layouts_base_html_head %> - <%= yield :header_tags -%> - - - - - - - -<% is_current_user = User.current.logged?%> - -
    - -
    -
    -
    - <%=render :partial => 'layouts/syllabus_info' %> -
    -
    - -
    -
    - <%= yield %> -
    -
    -
    - <%= render :partial => 'layouts/syllabus_base_info', :locals => {:syllabus => @syllabus} %> -
    -
    - <%= render :partial => 'layouts/syllabus_teacher_list', :locals => {:syllabus => @syllabus} %> -
    -
    -
    -
    - -
    -
    -<%= render :partial => 'layouts/footer' %> -
    - - - - - - + + + + + <%= h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public','css/structure','css/courses','css/popup','prettify','syllabus','sy_public',:media => 'all'%> + <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> + <%= javascript_heads %> + <%= javascript_include_tag "bootstrap","avatars","course",'attachments','prettify','syllabus','cookie'%> + <%= heads_for_theme %> + <%= call_hook :view_layouts_base_html_head %> + <%= yield :header_tags -%> + + + + + + + +<% is_current_user = User.current.logged?%> + +
    +
    +

    + 位置:   + <%= link_to User.current, user_path(User.current.id), :class => 'sy_cgrey', :target => '_blank' %> +  >  + <%= link_to '课程', user_courselist_user_path(User.current.id), :class => "sy_cgrey", :target => '_blank' %> +  >  + <%= link_to @syllabus.title, syllabus_path(@syllabus.id), :class => "sy_cgrey" %> +

    +
    +
    +
    +
    + <%=render :partial => 'layouts/syllabus_info' %> +
    +
    + +
    +
    + <%= yield %> +
    +
    +
    + <%= render :partial => 'layouts/syllabus_base_info', :locals => {:syllabus => @syllabus} %> +
    +
    + <%= render :partial => 'layouts/syllabus_teacher_list', :locals => {:syllabus => @syllabus} %> +
    +
    +
    +
    + +
    +
    +<%= render :partial => 'layouts/footer' %> +
    + + + + + + diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb index 7a61273bb..e8b376f47 100644 --- a/app/views/messages/_course_show.html.erb +++ b/app/views/messages/_course_show.html.erb @@ -42,7 +42,6 @@
      • - <% if @topic.author.id == User.current.id %>
      • <%= link_to( l(:button_edit), @@ -59,7 +58,6 @@ :class => 'postOptionLink' ) if @message.course_destroyable_by?(User.current) %>
      • - <% end %>
      • <%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{@message.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %>
    • diff --git a/app/views/student_work/_work_information.html.erb b/app/views/student_work/_work_information.html.erb index 1ced6c84c..f9da89c11 100644 --- a/app/views/student_work/_work_information.html.erb +++ b/app/views/student_work/_work_information.html.erb @@ -1,44 +1,44 @@ -
      -
      - 请您确认刚刚上传的作品信息 -

      - 作品名称:<%=@student_work.name%> -

      -
      -
      作品描述:
      -
      <%=@student_work.description.html_safe %>
      -
      -
      -

      - 件: - <% if @student_work.attachments.empty? %> - <%= "无附件"%> - <% else %> -

      - <% @student_work.attachments.each_with_index do |attachment,i| %> -
      - <%= link_to_short_attachment attachment, :class => 'link_file_a fl', :download => true -%> - <%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload fl', :confirm => l(:text_are_you_sure)) %> - (<%= number_to_human_size attachment.filesize %>) -
      -
      - <% end -%> - <%#= render :partial => 'work_attachments_status', :locals => {:attachments => @student_work.attachments, :status => 2} %> -
      - <% end %> -

      -
      -
      - - 确 定 - - <%= link_to("重 试", retry_work_student_work_path(@student_work.id),:class => "tijiao",:style =>"margin-bottom: 15px;margin-top:15px;",:remote => true)%> -
      -
      -
      - - \ No newline at end of file diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 2d11b5964..54dda1568 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -57,9 +57,14 @@
-
+
+
+
+
{{journal.praise_count}}
+
{{journal.praise_count}}
+
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 4e309e6d6..0daf0e1bb 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -57,7 +57,12 @@
-
+
+
+
+
{{journal.praise_count}}
+
{{journal.praise_count}}
+
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index 85b3a901a..a24321b5e 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -72,7 +72,12 @@ -
+
+
+
+
{{journal.praise_count}}
+
{{journal.praise_count}}
+
diff --git a/public/assets/wechat/edit_class_member.html b/public/assets/wechat/edit_class_member.html index decb31efb..d06eba89b 100644 --- a/public/assets/wechat/edit_class_member.html +++ b/public/assets/wechat/edit_class_member.html @@ -15,7 +15,7 @@
取消 - 确定 + 确定
diff --git a/public/assets/wechat/edit_project_member.html b/public/assets/wechat/edit_project_member.html index 5500766d5..eb15b074a 100644 --- a/public/assets/wechat/edit_project_member.html +++ b/public/assets/wechat/edit_project_member.html @@ -15,7 +15,7 @@
取消 - 确定 + 确定
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 7fa8459c4..9ffdcea4a 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -61,7 +61,12 @@ -
+
+
+
+
{{journal.praise_count}}
+
{{journal.praise_count}}
+
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index efc7ed64d..8aefc8d17 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -78,7 +78,12 @@ -
+
+
+
+
{{journal.praise_count}}
+
{{journal.praise_count}}
+
diff --git a/public/assets/wechat/join_class.html b/public/assets/wechat/join_class.html index b5733e584..ad43db3a7 100644 --- a/public/assets/wechat/join_class.html +++ b/public/assets/wechat/join_class.html @@ -13,6 +13,7 @@
提示 diff --git a/public/assets/wechat/join_project.html b/public/assets/wechat/join_project.html index 61be93cfd..fe8600999 100644 --- a/public/assets/wechat/join_project.html +++ b/public/assets/wechat/join_project.html @@ -12,6 +12,7 @@
提示 diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index e2e65ca58..8062ccccc 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -56,7 +56,12 @@
-
+
+
+
+
{{journal.praise_count}}
+
{{journal.praise_count}}
+
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 30d464802..e29b062dc 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -57,7 +57,12 @@ -
+
+
+
+
{{journal.praise_count}}
+
{{journal.praise_count}}
+
diff --git a/public/images/syllabus/icons_syllabus.png b/public/images/syllabus/icons_syllabus.png index 4afdb729f..3b81336c4 100644 Binary files a/public/images/syllabus/icons_syllabus.png and b/public/images/syllabus/icons_syllabus.png differ diff --git a/public/javascripts/wechat/controllers/class.js b/public/javascripts/wechat/controllers/class.js index 2e3ab4b22..1e9fbcb0e 100644 --- a/public/javascripts/wechat/controllers/class.js +++ b/public/javascripts/wechat/controllers/class.js @@ -23,10 +23,11 @@ app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location }).then(function successCallback(response) { console.log(response.data); if(response.data.status == 0){ - vm.class_activities_page = response.data.page; + vm.course_activities_page = response.data.page; if(response.data.page > 0) { vm.course_activities = vm.course_activities.concat(response.data.data); + vm.course_has_more = (response.data.count + response.data.page * 10) < response.data.all_count; } else{ vm.course_activities = response.data.data; diff --git a/public/javascripts/wechat/controllers/project.js b/public/javascripts/wechat/controllers/project.js index 1bdb2f1e0..7b93b891a 100644 --- a/public/javascripts/wechat/controllers/project.js +++ b/public/javascripts/wechat/controllers/project.js @@ -63,6 +63,7 @@ app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'aut if(response.data.page > 0) { vm.project_activities = vm.project_activities.concat(response.data.data); + vm.project_has_more = (response.data.count + response.data.page * 10) < response.data.all_count; } else{ vm.project_activities = response.data.data; diff --git a/public/stylesheets/css/courses.css b/public/stylesheets/css/courses.css index 163f33338..7d0e6c866 100644 --- a/public/stylesheets/css/courses.css +++ b/public/stylesheets/css/courses.css @@ -536,4 +536,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;} /*20160520作品列表table*/ .hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle; table-layout:fixed;} -.hwork-table-wrap th {font-size:14px; color:#2d2d2d; border-bottom:1px solid #e1e1e1; text-align:center;} \ No newline at end of file +.hwork-table-wrap th {font-size:14px; color:#2d2d2d; border-bottom:1px solid #e1e1e1; text-align:center;} + +/*20160901作品信息确认*/ +#worksDescription p {word-wrap:break-word;} \ No newline at end of file diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css index 378fb3ba9..9565a9e26 100644 --- a/public/stylesheets/css/public.css +++ b/public/stylesheets/css/public.css @@ -116,6 +116,7 @@ a.resourcesTypeUser {background:url(../images/homepage_icon.png) -178px -453px n .softwareIcon {background:url(/images/hwork_icon.png) -5px -254px no-repeat; padding-left:23px;} /*意见反馈*/ +.qr-code-border {border:2px solid #269ac9;} html{ overflow-x:hidden;} .scrollsidebar{ position: fixed; bottom:1px; right:1px; background:none; } .side_content{width:154px; height:auto; overflow:hidden; float:left; } @@ -750,6 +751,7 @@ a:hover.st_add{ color:#ff8e15;} .classbox_on{ border:1px solid #f8df8c; background:#f6f098; padding:0 3px; float:left; margin-left:15px;} .classbox_on a{ color:#716cad;} .st_list_score {width:105px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; vertical-align:middle; font-size:12px; text-align:center;} +.st_info_block {width:150px; display:inline-block; vertical-align:bottom;} /* 创建作品 homework,项目配置 */ .hwork_new{ color:#4c4c4c;} @@ -1385,7 +1387,7 @@ a.content-username:hover{ color:#297fb8;} .orig_index{ float:right; color:#666; font-family:Arial; padding-right:5px;line-height:30px;} .orig_user{ margin:10px 15px 10px 5px;} .orig_user span{ color:#999; padding-right:5px;} -.orig_content{padding:5px 0px 5px 0px;line-height:24px; color:#333; } +.orig_content{padding:5px 0px 5px 0px;line-height:24px; color:#333; word-wrap:break-word; } .orig_content img {max-width:100%;} .orig_right{ width:80%; margin-top:5px;} a.comment_ding_link{ height:24px;line-height:24px;display:inline-block;padding-left:2px;vertical-align:middle; color:#333; } diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css index 7004c0928..31464673e 100644 --- a/public/stylesheets/css/structure.css +++ b/public/stylesheets/css/structure.css @@ -499,7 +499,7 @@ a.user_leftinfo_img { display:block; width:80px; height:80px; margin:15px auto;} .user_leftnav{ width:240px;} .users_accordion li > a { display: block; - padding: 0 10px 0 32px; + padding: 0 25px 0 32px; height:49px; line-height:49px; color: #333; diff --git a/public/stylesheets/syllabus.css b/public/stylesheets/syllabus.css index d6e7c19e9..f6a8e8e6e 100644 --- a/public/stylesheets/syllabus.css +++ b/public/stylesheets/syllabus.css @@ -74,8 +74,8 @@ input.syllabus_input_min{ /*课程大纲-课程列表*/ .icon_course{ background: url(../images/syllabus/icons_syllabus.png) 0 -35px no-repeat; width:18px; height:15px; display:block;} -.icons_sy_open{background: url(../images/syllabus/icons_syllabus.png) 0 -53px no-repeat; width:20px; height:23px; display:block; cursor:pointer; } -.icons_sy_close{background: url(../images/syllabus/icons_syllabus.png) -26px -53px no-repeat; width:20px; height:23px; display:block; } +.icons_sy_open{background: url(../images/syllabus/icons_syllabus.png) 0 -50px no-repeat; width:20px; height:23px; display:block; cursor:pointer; } +.icons_sy_close{background: url(../images/syllabus/icons_syllabus.png) -26px -52px no-repeat; width:20px; height:23px; display:block; } .syllabus_courses_box {position:relative;} .icons_sy_setting{background: url(../images/syllabus/icons_syllabus.png) -51px -33px no-repeat; width:20px; height:20px; display:block; position:absolute; right:10px; top:10px; } .icons_sy_setting:hover{background: url(../images/syllabus/icons_syllabus.png) -25px -33px no-repeat; } @@ -113,12 +113,13 @@ a.syllabus_class_title{ font-size:14px; color:#333; max-width:480px; margin-bott /* 课程大纲头部 */ .sy_top{ background:#f5f5f5; - width: 100%; + width: 1000px; height: 138px; + margin: 0 auto; } .sy_top_con{ background: url(../images/sy/bg_sy.jpg) no-repeat; - width: 1280px; + width: 1000px; margin: 0 auto; height: 108px; text-align:center;