From 3d48dc4fb01b7c49a789a37fee65eaeee9b2c0f1 Mon Sep 17 00:00:00 2001 From: danielgrippi <danielgrippi@gmail.com> Date: Mon, 27 Feb 2012 19:08:37 -0800 Subject: [PATCH] fix stream css --- .../app/templates/comment-stream.handlebars | 30 +++++++++---------- .../app/templates/status-message.handlebars | 4 +-- public/javascripts/app/views.js | 5 +++- public/stylesheets/sass/application.sass | 2 +- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/public/javascripts/app/templates/comment-stream.handlebars b/public/javascripts/app/templates/comment-stream.handlebars index d0d6d313fe..200235fdaf 100644 --- a/public/javascripts/app/templates/comment-stream.handlebars +++ b/public/javascripts/app/templates/comment-stream.handlebars @@ -10,23 +10,21 @@ <div class="comments"> </div> -{{#if current_user}} - <div class="comment no-border"> - <div class="media new_comment_form_wrapper {{#unless comments_count}} hidden {{/unless}}"> - {{#with current_user}} - <a href="/people/{{guid}}" class="img"> - {{{personImage this}}} - </a> - {{/with}} +{{#if loggedIn}} + <div class="comment no-border media new_comment_form_wrapper {{#unless comments_count}} hidden {{/unless}}"> + {{#with current_user}} + <a href="/people/{{guid}}" class="img"> + {{{personImage this}}} + </a> + {{/with}} - <div class="bd"> - <form accept-charset="UTF-8" action="/posts/{{id}}/comments" class="new_comment" id="new_comment_on_{{id}}" method="post"> - <textarea class="comment_box" id="comment_text_on_{{id}}" name="text" rows="2" placeholder="{{t "stream.comment"}}" /> - <div class="submit_button"> - <input class="button creation" id="comment_submit_{{id}}" name="commit" type="submit" value="{{t "stream.comment"}}" /> - </div> - </form> - </div> + <div class="bd"> + <form accept-charset="UTF-8" action="/posts/{{id}}/comments" class="new_comment" id="new_comment_on_{{id}}" method="post"> + <textarea class="comment_box" id="comment_text_on_{{id}}" name="text" rows="2" placeholder="{{t "stream.comment"}}" /> + <div class="submit_button"> + <input class="button creation" id="comment_submit_{{id}}" name="commit" type="submit" value="{{t "stream.comment"}}" /> + </div> + </form> </div> </div> {{/if}} diff --git a/public/javascripts/app/templates/status-message.handlebars b/public/javascripts/app/templates/status-message.handlebars index 9cdb3a9ec7..584d3a281b 100644 --- a/public/javascripts/app/templates/status-message.handlebars +++ b/public/javascripts/app/templates/status-message.handlebars @@ -15,8 +15,6 @@ {{/if}} <div class="collapsible"> - <p> - {{{text}}} - </p> + {{{text}}} {{{o_embed_html}}} </div> diff --git a/public/javascripts/app/views.js b/public/javascripts/app/views.js index 9282041a37..528519a24d 100644 --- a/public/javascripts/app/views.js +++ b/public/javascripts/app/views.js @@ -19,7 +19,10 @@ app.views.Base = Backbone.View.extend({ defaultPresenter : function(){ var modelJson = this.model ? this.model.toJSON() : {} - return _.extend(modelJson, {current_user: app.currentUser.attributes}); + return _.extend(modelJson, { + current_user : app.currentUser.attributes, + loggedIn : app.currentUser.authenticated() + }); }, render : function() { diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index b5a49d0a94..a1fce670dd 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -534,7 +534,7 @@ ul.as-selections :border none .comment - .media + &.media :margin :left 0 :right 0 -- GitLab