<% 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>