Sha256: be0a43ddf251396d4707983722d015caa983cf12962573f97e2c11299a272072

Contents?: true

Size: 1.46 KB

Versions: 5

Compression:

Stored size: 1.46 KB

Contents

- title @article.title
- description @article.text
- keywords @article.keywords
.container
  %div.row::before 
    %div.col-md-12
      %h2.display-3.mt-5.pt-5
        = @article.title
        = link_to image_tag('pencil.png', style:'border:none; float:right;', id: 'article_pen'), {controller: "articles", action: "edit", article_id: @article.id}, data: { confirm: "Please Confirm" }
      %hr
        = @article.text
      %h4.display-5
        = @article.body.html_safe
        - @comments.each do |comment|
          %div#article-comment.ui-corner-all
            .col-md-10.col-sm-12
              %div.small-box.bg-gray
                %div.inner
                  %div.font-weight-light
                    Author:    
                    %b= comment.user.code if comment.user
                  %div#comment-body
                    %i= comment.body
    %hr

    .container
      .card

        - if login?
          %h4.display-5
            Add a comment:
            = form_with(model: [@article, Comment.new], local: true) do |f|
              .form-group 
                = f.hidden_field :article_id, :value => @article.id
              .form-group 
                = f.label :body, "Comment"
              .form-group 
                = f.text_area :body, rows: 5, class: "form-control"
              .form-group 
                = f.hidden_field :user_id, :value => current_ma_user
              .form-group 
                = f.submit "Submit",  class: "btn btn-default btn-success"

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jinda-0.7.1 lib/generators/jinda/templates/app/views/articles/show.html.haml
jinda-0.7.0.4 lib/generators/jinda/templates/app/views/articles/show.html.haml
jinda-0.7.0.3 lib/generators/jinda/templates/app/views/articles/show.html.haml
jinda-0.7.0.2 lib/generators/jinda/templates/app/views/articles/show.html.haml
jinda-0.7.0.1 lib/generators/jinda/templates/app/views/articles/show.html.haml