-# Copyright (c) 2010-2011, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - content_for :page_title do = post_page_title @post - content_for :head do =javascript_include_tag 'vendor/bootstrap/bootstrap-transition', 'vendor/bootstrap/bootstrap-modal' :javascript $(function(){ $(document).keypress(function(event){ $('#text').focus(); $('#comment').modal(); }); $(document).keydown(function(e){ if (e.keyCode == 37) { window.location = $('#back').attr('href'); }else if(e.keyCode == 39) { window.location = $('#forward').attr('href'); } }); }); .header .header-container #post-author.media .img = person_image_link @post.author .bd = person_link(@post.author, :class => 'author-name') .post-time %i.icon-time = time_ago_in_words(@post.created_at) + ' ago' .post-vitals %span %i.icon-heart = @post.likes.size %span %i.icon-plus = @post.participations.size %span %i.icon-retweet = @post.reshares.size %span %i.icon-comment = @post.comments.size - if current_user #user-controls = link_to "#", :class => "label" do %i.icon-heart.icon-white = link_to "#", :class => "label" do %i.icon-plus.icon-white = link_to "#", :class => "label" do %i.icon-retweet.icon-white = link_to "#", :class => "label", do %i.icon-comment.icon-white = link_to person_image_tag(current_user.person), root_path #post-content = link_to image_tag('arrow-left.png'), post_path(@post.id-1), :class => 'nav-arrow left', :id => 'back' = link_to image_tag('arrow-right.png'), post_path(@post.id+1), :class => 'nav-arrow right', :id => 'forward' #comment.modal.fade .modal-header %h3 Responses .modal-body - @post.comments.each do |c| .media .img = person_image_link c.author .bd %strong= person_link(c.author) %br = c.text .modal-footer = form_tag comments_path, :remote => true do = text_area_tag :text, '', :class => 'span6' = hidden_field_tag :post_id, @post.id = submit_tag 'submit', :onclick => "$('#comment').modal('hide'); $('#text').text('')"