diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 6738d2135..2a0d0445d 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -248,6 +248,8 @@ class TagsController < ApplicationController @obj = OpenSourceProject.find_by_id(@obj_id) when '9' @obj = Course.find_by_id(@obj_id) + when '10' + @obj = Attachment.find_by_id(@obj_id) else @obj = nil end diff --git a/app/views/courses/_courses_jours.html.erb b/app/views/courses/_courses_jours.html.erb index 680bafb46..385b945d9 100644 --- a/app/views/courses/_courses_jours.html.erb +++ b/app/views/courses/_courses_jours.html.erb @@ -12,10 +12,10 @@ <% else %> <%= form_for('new_form', :method => :post, :url => {:controller => 'words', :action => 'leave_course_message'}) do |f|%> - <%= f.text_area 'course_message',:id => "leave_meassge", :rows => 3, :cols => 65, + <%= f.text_area 'course_message',:id => "leave_meassge", :placeholder => "#{l(:label_welcome_my_respond)}",:maxlength => 250%> - 取  消 - <%= l(:button_leave_meassge)%> + 取  消 + <%= l(:button_leave_meassge)%> <% end %> <% end %> diff --git a/app/views/courses/_history.html.erb b/app/views/courses/_history.html.erb index 23d4909d9..01990602d 100644 --- a/app/views/courses/_history.html.erb +++ b/app/views/courses/_history.html.erb @@ -3,17 +3,15 @@ <% for journal in journals %>
- - <%= image_tag(url_to_avatar(journal.user),:width => '46',:height => '46') %> - + <%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
- <%= link_to journal.user, user_path(journal.user),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%> + <%= link_to journal.user, user_path(journal.user),:class => 'c_blue fb fl mb10', :target => "_blank"%> - + <%= format_time(journal.created_on) %>
diff --git a/app/views/courses/feedback.html.erb b/app/views/courses/feedback.html.erb index b7713c4a9..0a8458a22 100644 --- a/app/views/courses/feedback.html.erb +++ b/app/views/courses/feedback.html.erb @@ -1,9 +1,10 @@ <% reply_allow = JournalsForMessage.create_by_user? User.current %>
-

用户留言

+

<%= l(:label_contest_userresponse) %>

+ <%= render :partial => 'courses_jours', :locals => { :contest => @contest, :journals => @jour, :state => false} %> @@ -12,7 +13,7 @@ diff --git a/app/views/tags/_course_attachment_tag_name.erb b/app/views/tags/_course_attachment_tag_name.erb new file mode 100644 index 000000000..699f7208f --- /dev/null +++ b/app/views/tags/_course_attachment_tag_name.erb @@ -0,0 +1,56 @@ + + +<% @tags = obj.reload.tag_list %> +<% if non_list_all and (@tags.size > 0) %> + + <% if @tags.size > Setting.show_tags_length.to_i then %> + <% i = 0 %> + <% until i>Setting.show_tags_length.to_i do %> +
+ <%= link_to @tags[i], :controller => "tags", :action => "index", :q => @tags[i], :object_flag => object_flag, :obj_id => obj.id %> +
+ <% i += 1 %> + <% end %> + <%= more_tags(obj.id,object_flag)%> + <% else %> + <% @tags.each do |tag| %> +
+ <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %> +
+ <% end %> + <% end %> +<% else %> + + <% if @tags.size > 0 %> + <% @tags.each do |tag| %> +
+ + <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %> + + <% case object_flag %> + <% when '10' %> + <%# if (User.current.logged? && + User.current.admin? + # && (@project && User.current.member_of?(@project)) + ) + %> + <% if obj.author_id == User.current.id || User.current.admin?%> + + <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, + :taggable_id => obj.id, :taggable_type => object_flag %> + + <% end %> + <% end %> + +
+ <% end %> + <% end %> +<% end %> \ No newline at end of file diff --git a/app/views/tags/_tag_list.html.erb b/app/views/tags/_tag_list.html.erb index 549ed1751..e18dafd7d 100644 --- a/app/views/tags/_tag_list.html.erb +++ b/app/views/tags/_tag_list.html.erb @@ -5,7 +5,12 @@ <%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %> <% case object_flag %> - <% when '6' %> + <% when '10' %> + <% if obj.author_id == User.current.id || User.current.admin?%> + <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag, + :taggable_id => obj.id, :taggable_type => object_flag %> + <% end %> + <% when '6' %> <% if obj.author_id == User.current.id || User.current.admin?%> <%= link_to 'x', :controller => "tags", :action => "remove_tag_new", :remote => true, :tag_name => tag, :taggable_id => obj.id, :taggable_type => object_flag %> diff --git a/app/views/tags/_tag_new.html.erb b/app/views/tags/_tag_new.html.erb index eb49005ae..0d5d371e3 100644 --- a/app/views/tags/_tag_new.html.erb +++ b/app/views/tags/_tag_new.html.erb @@ -12,6 +12,13 @@ <% if object_flag == '3' %> + <% elsif object_flag == '10' %> +
+ <%= render :partial => "tags/tag_list",:locals => {:obj => obj,:object_flag => object_flag} %> +
+ <% elsif object_flag == '6' %>
<%= render :partial => "tags/tag_list",:locals => {:obj => obj,:object_flag => object_flag} %> diff --git a/app/views/tags/tag_save.js.erb b/app/views/tags/tag_save.js.erb index b4866bb89..2bef1a3a3 100644 --- a/app/views/tags/tag_save.js.erb +++ b/app/views/tags/tag_save.js.erb @@ -14,6 +14,12 @@ $("#put-tag-form-<%=@obj.class%>-<%=@obj.id%> #name").val(""); $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/new_tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); $('#tags_name').val(""); +<% elsif @obj_flag == '10'%> +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty(); +$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/course_attachment_tag_name', + :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); +//$("#put-tag-form-<%#=@obj.class%>-<%#=@obj.id%>").hide(); +$("#tags_name_<%=@obj.id%>").val(""); <% else%> $('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name', :locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>'); diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index 956fad81f..716a27ffe 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -22,15 +22,12 @@ <% end %>

- - <%= reply.notes %> - + <%= reply.notes %>

-

- + <%= format_time reply.created_on %> -

+
+
+ <% if reply_allow %> + <% if journal.jour_type == "Course" %> + <%= render :partial => "words/new_respond_course", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %> + <% else %> + <%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %> + <% end %> + <% end %> +
-
- <% if reply_allow %> - <% if journal.jour_type == "Course" %> - <%= render :partial => "words/new_respond_course", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %> - <% else %> - <%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %> - <% end %> - <% end %> -
-
+
<% end %> \ No newline at end of file diff --git a/app/views/words/_new_respond_course.html.erb b/app/views/words/_new_respond_course.html.erb index 5395237d9..77e40783d 100644 --- a/app/views/words/_new_respond_course.html.erb +++ b/app/views/words/_new_respond_course.html.erb @@ -1,15 +1,15 @@ <%= form_tag(words_create_reply_path, :remote => true) do %> - <%= text_area_tag 'user_notes', "", :class => 're_respond-form', - :style => "resize: none;", :rows => 4, + <%= text_area_tag 'user_notes', "", :class => 'w520 h50 mb5', + :placeholder => l(:label_feedback_respond_content), - :width => '100%', + :maxlength => 250 %> <%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %> <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %> <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %> <%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %> + <%= submit_tag l(:button_feedback_respond), :name => nil , - :class => "sub_btn", - :style => "float: right; margin-top: 1px; margin-right: 4px;"%> + :class => "reply_btn"%> <% end %> \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index f8f0065e9..840102e79 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -52,7 +52,7 @@ a:hover.problem_new_btn{ background:#ff7143; color:#fff;} .problem_p span{ color:#ff3e00;} a.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3;} a:hover.problem_pic{border:1px solid #64bdd9;} -.problem_txt{ width:610px; margin-left:10px; color:#777777;} +.problem_txt{ width:610px; margin-left:10px; color:#777777;word-break: break-all;word-wrap: break-word;} a.problem_name{ color:#ff5722;} a:hover.problem_name{ color:#d33503;} a.problem_tit{ color:#0781b4; width:430px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} @@ -177,7 +177,7 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;} .msg_box h4{ } .msg_box textarea{width:658px;height:90px;padding:5px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 0px; color:#666; font-size:12px; } /*.msg_box a{ float:right; display:block; width:50px; height:22px; background:#15bccf; padding-top:3px; color:#fff; margin-left:10px; text-align:center; margin-top:5px; }*/ -.msg_box a:hover{ background-color:#03a1b3; text-decoration:none;} +/*.msg_box a:hover{ background-color:#03a1b3; text-decoration:none;}*/ /****评分弹框****/ @@ -340,6 +340,7 @@ a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; col .r_txt_tit{width:500px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;} blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;} +.respond-form{display: none;margin: auto;clear: both;} #attachments_fields input.description {margin-left: 4px;width: 100px;} #attachments_fields span.ispublic-label {display: inline-block;width: 30px;margin-left: 10px;} @@ -350,6 +351,8 @@ span.add_attachment {font-size: 80%;line-height: 2.5em;} .file_selector{position: relative;opacity: 0;filter: alpha(opacity:0);} #attachments_fields .ajax-waiting input.filename {background:url(../images/hourglass.png) no-repeat 0px 50%;} #attachments_fields .ajax-loading input.filename {background:url(../images/loading.gif) no-repeat 0px 50%;} +.reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;} +.reply_btn:hover{ background:#999; color:#fff; } #attachments_fields div.ui-progressbar { width: 100px; height:14px; margin: 2px 0 -5px 8px; display: inline-block; } .ui-widget {