<%= content_for(:header_tags) do %>
    <%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
    <%#= javascript_include_tag "init_KindEditor","user" %>
<% end %>

<%if jours %>
    <% jours.each do |jour|%>
        <% unless jour.private == 1 && (!User.current || (User.current && jour.jour_id != User.current.id && jour.user_id != User.current.id)) %>
            <script type="text/javascript">
                function expand_reply(container,btnid){
                    var target = $(container);
                    var btn = $(btnid);
                    if(btn.data('init')=='0'){
                        btn.data('init',1);
                        btn.html('收起回复');
                        target.show();
                    }else{
                        btn.data('init',0);
                        btn.html('展开更多');
                        target.hide();
                        target.eq(0).show();
                        target.eq(1).show();
                        target.eq(2).show();
                    }
                }
                $(function(){
                    sd_create_editor_from_data(<%= jour.id%>, null, "100%", "<%=jour.class.to_s%>");
                });
            </script>
            <%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id,:is_activity=>0} %>
            <%#= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
        <% end %>
    <%end%>
<% end%>
<% if (jours.count + page * 10) < count %>
    <%= link_to "点击展开更多",feedback_path(@user.id, :type => type, :page => page),:id => "show_more_jours",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end %>