Merge branch 'Homework' into develop
This commit is contained in:
commit
cf952b5012
|
@ -124,11 +124,12 @@ class ContestsController < ApplicationController
|
|||
def show_contest
|
||||
@user = @contest.author
|
||||
@jours = @contest.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||
@limit = 10
|
||||
@feedback_count = @jours.count
|
||||
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||
@offset ||= @feedback_pages.offset
|
||||
@jour = @jours[@offset, @limit]
|
||||
#@limit = 10
|
||||
#@feedback_count = @jours.count
|
||||
#@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
||||
#@offset ||= @feedback_pages.offset
|
||||
#@jour = @jours[@offset, @limit]
|
||||
@jour = paginateHelper @jours,10
|
||||
@state = false
|
||||
|
||||
respond_to do |format|
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<div class="msg_box" id='leave-message'>
|
||||
<h4>留言内容</h4>
|
||||
<%= render :partial => 'new', :locals => {:contest => @contest, :sta => @state} %>
|
||||
<!-- <textarea id="ta_msg_content" name="content" placeholder="最多250个字"></textarea> -->
|
||||
<!-- <a href="#">取 消</a><a href="#">留 言</a> -->
|
||||
|
||||
</div>
|
||||
<div id="history">
|
||||
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
|
||||
</div>
|
||||
|
||||
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true%></ul>
|
|
@ -1,79 +1,63 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<% tip1 = l(:label_user_response) %>
|
||||
<p class="font_lighter" style="font-size: 15px; padding-left: 12px; "><%=tip1%></p>
|
||||
|
||||
<div id='leave-message'>
|
||||
<%= render :partial => 'new', :locals => {:contest => @contest, :sta => @state} %>
|
||||
<div class="ping_ctt">
|
||||
<div id="tbc_01" class="ping_dis">
|
||||
<% if journals.size > 0 %>
|
||||
<% for journal in journals %>
|
||||
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
||||
<div class="ping_dispic"><a target="_blank" href="#"><%= image_tag(url_to_avatar(journal.user)) %></a></div>
|
||||
<div class="ping_discon" style="width: 85%;">
|
||||
<div class="ping_distop">
|
||||
<!-- <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),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= format_time(journal.created_on) %></span>
|
||||
<div class="cl"></div>
|
||||
<p><%= textilizable journal.notes%></p>
|
||||
</div>
|
||||
<div class="ping_disfoot">
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<span style="float: right">
|
||||
<% if journal.user == User.current|| User.current.admin? %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
:class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_bid_respond_quote),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"} %>
|
||||
<%= link_to(l(:button_quote), contests_path(:id => contest,
|
||||
:journal_id => journal),
|
||||
:remote => true,
|
||||
:method => 'post',
|
||||
:title => l(:button_quote))%>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="font_lighter" style="float: right">
|
||||
<%= l(:label_bids_published) %>
|
||||
<%= time_tag(journal.created_on).html_safe %>
|
||||
<%= l(:label_bids_published_ago) %>
|
||||
</span>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<% if journals.size >0 %>
|
||||
<ul class="message-for-user">
|
||||
<% for journal in journals%>
|
||||
<li id='word_li_<%= journal.id.to_s %>' class="outer-message-for-user">
|
||||
<span class="portrait">
|
||||
<%= image_tag(url_to_avatar(journal.user), :class => "avatar") %>
|
||||
</span>
|
||||
<span class="body">
|
||||
<span class="user">
|
||||
<%= link_to journal.user, user_path(journal.user)%>
|
||||
</span>
|
||||
<span class="font_lighter">
|
||||
<% label = l(:label_contest_requirement) %>
|
||||
</span>
|
||||
<div> <%= textilizable journal.notes%> </div>
|
||||
<span class="font_lighter">
|
||||
<%= l(:label_bids_published) %>
|
||||
<%= time_tag(journal.created_on).html_safe %>
|
||||
<%= l(:label_bids_published_ago) %>
|
||||
</span>
|
||||
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
|
||||
<span>
|
||||
<% if reply_allow %>
|
||||
<%= link_to(l(:button_quote),
|
||||
contests_path(:id => contest,
|
||||
:journal_id => journal),
|
||||
:remote => true,
|
||||
:method => 'post',
|
||||
:title => l(:button_quote))
|
||||
%>
|
||||
<%= link_to l(:label_bid_respond_quote),
|
||||
'',
|
||||
{:focus => 'project_respond',
|
||||
:onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user}: '); $('##{ids} textarea') ;return false;"
|
||||
}
|
||||
%>
|
||||
<% end %>
|
||||
|
||||
<% if @user==User.current|| User.current.admin? %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
|
||||
words_destroy_path(:user_id => @user, :object_id => journal),
|
||||
:remote => true,
|
||||
:confirm => l(:text_are_you_sure),
|
||||
:method => 'delete',
|
||||
:class => "delete",
|
||||
:title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond',
|
||||
:locals => {:journal => journal, :m_reply_id => journal}
|
||||
%>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
||||
|
||||
|
||||
<div id="history">
|
||||
<%= render :partial => 'history',
|
||||
<%= render :partial => 'contest_jours',
|
||||
:locals => { :contest => @contest, :journals => @jour, :state => false}
|
||||
%>
|
||||
</div>
|
||||
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul>
|
||||
<%= pagination_links_full @feedback_pages %>
|
||||
</ul>
|
||||
</div>
|
||||
<% html_title(l(:label_user_response)) -%>
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<div class="msg_box" id='leave-message'>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
||||
<h3><%= l(:label_user_response) %></h3>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="width: 80%; margin-left:10%;">
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_course_message'}) do |f|%>
|
||||
<%= f.text_area 'course_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",
|
||||
:style => "resize: none; width: 98%",
|
||||
:class => 'noline'%>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<div id="history">
|
||||
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
||||
<div class="ping_ctt">
|
||||
<div id="tbc_01" class="ping_dis">
|
||||
<% if journals.size > 0 %>
|
||||
<% for journal in journals %>
|
||||
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
||||
<div class="ping_dispic"><a target="_blank" href="#"><%= image_tag(url_to_avatar(journal.user)) %></a></div>
|
||||
<div class="ping_discon" style="width: 85%;">
|
||||
<div class="ping_distop">
|
||||
<!-- <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),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= format_time(journal.created_on) %></span>
|
||||
<div class="cl"></div>
|
||||
<p><%= textilizable journal.notes%></p>
|
||||
</div>
|
||||
<div class="ping_disfoot">
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<span style="float: right">
|
||||
<% if journal.user == User.current|| User.current.admin? %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
:class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_bid_respond_quote),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"} %>
|
||||
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="font_lighter" style="float: right">
|
||||
<%= l(:label_bids_published) %>
|
||||
<%= time_tag(journal.created_on).html_safe %>
|
||||
<%= l(:label_bids_published_ago) %>
|
||||
</span>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,3 +1,11 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
||||
|
||||
<%= render :partial => 'courses_jours',
|
||||
:locals => { :contest => @contest, :journals => @jour, :state => false}
|
||||
%>
|
||||
|
||||
<% html_title(l(:label_user_response)) -%>
|
||||
<script>
|
||||
var W3CDOM = document.createElement && document.getElementsByTagName;
|
||||
|
||||
|
@ -35,68 +43,6 @@ function checkMaxLength() {
|
|||
}
|
||||
|
||||
</script>
|
||||
<!-- fq -->
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
||||
<h3><%= l(:label_user_response) %></h3>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="width: 80%; margin-left:10%;">
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_course_message'}) do |f|%>
|
||||
<%= f.text_area 'course_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",
|
||||
:style => "resize: none; width: 98%",
|
||||
:class => 'noline'%>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<% if @jour.size >0 %>
|
||||
<ul class="message-for-user">
|
||||
<% for journal in @jour%>
|
||||
<li id='word_li_<%=journal.id.to_s%>' class="outer-message-for-user">
|
||||
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
|
||||
<span class="body">
|
||||
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
|
||||
<%= textilizable journal.notes%>
|
||||
<span class="font_lighter"> <%= l :label_update_time %>: <%= format_time journal.created_on %></span>
|
||||
<% id = 'course_respond_form_'+journal.id.to_s%>
|
||||
<span>
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_projects_feedback_respond),'#',
|
||||
{:focus => 'course_respond',
|
||||
:onclick => "toggleAndSettingWordsVal($('##{id}'),
|
||||
$('##{id} textarea'),
|
||||
'#{l(:label_reply_plural)} #{journal.user.name}: ');
|
||||
return false;"} %>
|
||||
<% end %>
|
||||
<% if journal.delete_by_user?(User.current) %>
|
||||
<%= link_to(l(:button_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => journal.user}, :method => :delete,:confirm => l(:text_are_you_sure),:remote => true)%>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= id %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul>
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<% label = ''
|
||||
case bid.reward_type
|
||||
when 1
|
||||
label = l(:label_respond_requirement)
|
||||
when 2
|
||||
label = l(:label_contest_requirement)
|
||||
when 3
|
||||
label = l(:label_question_requirement)
|
||||
else
|
||||
end
|
||||
%>
|
||||
|
||||
<div class="ping_ctt">
|
||||
<div id="tbc_01" class="ping_dis">
|
||||
<% if journals.size > 0 %>
|
||||
|
|
|
@ -1,34 +1,48 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
|
||||
<li id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
|
||||
<span class="portrait">
|
||||
<%= image_tag url_to_avatar(reply.user), :class => "avatar-3" %>
|
||||
</span>
|
||||
<div class="message-body">
|
||||
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
||||
<p>
|
||||
<span><%= link_to reply.user.name, user_path(reply.user) %>: </span>
|
||||
<span class="message-notes"> <%= reply.notes %></span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="time"><%= format_time reply.created_on %></span>
|
||||
<span style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
||||
<div class="recall" id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
|
||||
<div class="recall_head">
|
||||
<% if show_name %>
|
||||
<%= image_tag url_to_avatar(reply.user) %>
|
||||
<% else %>
|
||||
<%= image_tag url_to_avatar(nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="recall_con">
|
||||
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
||||
<%= link_to reply.user.name, user_path(reply.user) %>
|
||||
回复
|
||||
<% if show_name %>
|
||||
<%= link_to reply.at_user.name,user_path(reply.at_user) %>
|
||||
<% else %>
|
||||
<%= l(:label_anonymous) %>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<span class="message-notes">
|
||||
<%= reply.notes %>
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="time">
|
||||
<%= format_time reply.created_on %>
|
||||
</span>
|
||||
<span class="ping_disfoot" style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
||||
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
|
||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_projects_feedback_respond),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), '#{l(:label_reply_plural)} #{m_reply_id.user.name}: '); return false;"}
|
||||
%>
|
||||
<% end %>
|
||||
<% if @user == User.current || User.current.admin? || reply.user.id == User.current.id %>
|
||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'homework_attach', :action => 'destroy_jour', :object_id => reply, :user_id => reply.user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div id='<%=id %>' class="respond-form">
|
||||
<% if reply_allow %>
|
||||
<%= render :partial => "add_jour_reply", :locals => {:journal => journal, :m_reply_id => m_reply_id} %>
|
||||
<% end %>
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %>
|
||||
<% end %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: -->
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div id='<%=id%>' class="respond-form">
|
||||
<% if reply_allow %>
|
||||
<%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</li>
|
||||
</div>
|
|
@ -0,0 +1,59 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
||||
<div class="ping_ctt">
|
||||
<div id="tbc_01" class="ping_dis">
|
||||
<% if journals.size > 0 %>
|
||||
<% for journal in journals %>
|
||||
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
||||
<div class="ping_dispic"><a target="_blank" href="#"><%= image_tag(url_to_avatar(journal.user)) %></a></div>
|
||||
<div class="ping_discon" style="width: 85%;">
|
||||
<div class="ping_distop">
|
||||
<!-- <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),:style => " font-weight:bold; color:#15bccf; margin-right:30px; background:none;", :target => "_blank"%></span><span style="color:#a6a6a6; margin-right:40px; margin-left:30px;"><%= format_time(journal.created_on) %></span>
|
||||
<div class="cl"></div>
|
||||
<p><%= textilizable journal.notes%></p>
|
||||
</div>
|
||||
<div class="ping_disfoot">
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<span style="float: right">
|
||||
<% if journal.user == User.current|| User.current.admin? %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
:class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_bid_respond_quote),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.name}: '); $('##{ids} textarea') ;return false;"} %>
|
||||
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="font_lighter" style="float: right">
|
||||
<%= l(:label_bids_published) %>
|
||||
<%= time_tag(journal.created_on).html_safe %>
|
||||
<%= l(:label_bids_published_ago) %>
|
||||
</span>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<div class="msg_box" id='leave-message'>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
||||
<h3><%= l(:label_user_response) %></h3>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="width: 80%; margin-left:10%;">
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",
|
||||
:style => "resize: none; width: 98%",
|
||||
:class => 'noline'%>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<div id="history">
|
||||
<%= render :partial => 'history',:locals => { :contest => @contest, :journals => @jour, :state => false} %>
|
||||
</div>
|
||||
|
|
@ -1,3 +1,11 @@
|
|||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
||||
|
||||
<%= render :partial => 'project_jours',
|
||||
:locals => { :contest => @contest, :journals => @jour, :state => false}
|
||||
%>
|
||||
|
||||
<% html_title(l(:label_user_response)) -%>
|
||||
<script>
|
||||
var W3CDOM = document.createElement && document.getElementsByTagName;
|
||||
|
||||
|
@ -35,80 +43,5 @@ function checkMaxLength() {
|
|||
}
|
||||
|
||||
</script>
|
||||
<!-- fq -->
|
||||
|
||||
|
||||
|
||||
<h3><%= l(:label_user_response) %></h3>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="width: 80%; margin-left:10%;">
|
||||
<%= form_for('new_form', :method => :post,
|
||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",
|
||||
:style => "resize: none; width: 98%",
|
||||
:class => 'noline'%>
|
||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "enterprise" , :style => "display: block; float: right; margin-right: 1%; margin-top: 1px;"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div id="project_feedback">
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<% if @jour.size >0 %>
|
||||
<ul class="message-for-user">
|
||||
<% for journal in @jour%>
|
||||
<li id='word_li_<%=journal.id.to_s%>' class="outer-message-for-user">
|
||||
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
|
||||
<span class="body">
|
||||
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
|
||||
<%= textilizable journal.notes%>
|
||||
<span class="font_lighter"> <%= l :label_update_time %>: <%= format_time journal.created_on %></span>
|
||||
<% id = 'project_respond_form_'+journal.id.to_s%>
|
||||
<span>
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_projects_feedback_respond),'#',
|
||||
{:focus => 'project_respond',
|
||||
:onclick => "toggleAndSettingWordsVal($('##{id}'),
|
||||
$('##{id} textarea'),
|
||||
'#{l(:label_reply_plural)} #{journal.user.name}: ');
|
||||
return false;"} %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.logged? %>
|
||||
<% if journal.user_id==User.current.id|| User.current.admin? %>
|
||||
<%= link_to(l(:button_delete),{:controller => 'words', :action => 'destroyJournal', :object_id => journal.id, :project_id=>@project.id, :page=>@page},
|
||||
:remote => true, :title => l(:button_delete), :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
</span>
|
||||
<div style="clear: both;"></div>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= id %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<div class="pagination" style="float:left;">
|
||||
<ul>
|
||||
<%= pagination_links_full @feedback_pages %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% html_title(l(:label_project_tool_response)) -%>
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
<% id = "journal_reply_ul_" + journal.id.to_s%>
|
||||
<div id = '<%= id %>' >
|
||||
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
|
||||
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name} %>
|
||||
<% end %>
|
||||
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
|
||||
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
<%= form_tag(words_create_reply_path, :remote => true) do %>
|
||||
<%= text_area_tag 'user_notes', "", :class => 'noline',
|
||||
:style => "resize: none;", :rows => 4,
|
||||
:placeholder => l(:label_projects_feedback_respond_content),
|
||||
:maxlength => 250 %>
|
||||
:style => "resize: none;", :rows => 4,
|
||||
:placeholder => l(:label_projects_feedback_respond_content),
|
||||
: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 %>
|
||||
|
|
Loading…
Reference in New Issue