commit
8932633b23
@ -0,0 +1,32 @@
|
||||
<% id = "course_resources_ul_" + obj.id.to_s%>
|
||||
<ul class="messages-for-user-reply" id = '<%= id %>' >
|
||||
<%= form_for "tag_for_save",:remote=>true,:header=>"Accept: application/javascript",:url=>tag_path,
|
||||
:update => "tags_show",
|
||||
:complete => "$(\"#put-tag-form-#{obj.class}-#{obj.id}\").hide();" do |f| %>
|
||||
<%= f.text_field :name ,:id => "name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:style=>"width: 100px;"%>
|
||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||
<%= f.submit l(:button_project_tags_add),:class => "small" %>
|
||||
<div class='hidden'>
|
||||
<% preTags = @preTags.nil? ? [] : @preTags %>
|
||||
<% preTags.each do |tag|%>
|
||||
<%= link_to tag, "
|
||||
javascript:(function(){
|
||||
var $tagInputVal = $('#put-tag-form-"+obj.class.to_s+"-"+obj.id.to_s+"').find('#name');
|
||||
var tagArr = [];
|
||||
tagArr = tagArr.concat( $tagInputVal[0].value.split(',') );
|
||||
tagArr = tagArr.concat('"+tag.to_s+"');
|
||||
tagArr = cleanArray(tagArr);
|
||||
$tagInputVal.val(tagArr.join(','));
|
||||
})();
|
||||
"
|
||||
%>
|
||||
<% end%>
|
||||
</div>
|
||||
<%#= link_to_function l(:button_cancel), "$(\"#put-tag-form-#{obj.class}-#{obj.id}\").hide();"%>
|
||||
<% end %>
|
||||
|
||||
<%# journal.children.each do |reply|%>
|
||||
<%#= render :partial => "journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply} %>
|
||||
<%# end %>
|
||||
</ul>
|
@ -0,0 +1,50 @@
|
||||
<% 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)) %>
|
||||
<% 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,@feedback_count, :per_page_links => false){|text, parameters, options|
|
||||
link_to text, project_feedback_path(@project,parameters.merge(:q => params[:q])) }%>
|
||||
</ul>
|
||||
</div>
|
@ -1,3 +1,5 @@
|
||||
|
||||
<% if @journalP!=nil %>
|
||||
$(".message-for-user").children("#word_li_<%=@journalP.id%>").remove();
|
||||
//$(".message-for-user").children("#word_li_<%#=@journalP.id%>").remove();
|
||||
$("#project_feedback").html("<%= escape_javascript(render :partial => 'words/feedback') %>");
|
||||
<% end %>
|
Loading…
Reference in new issue