<commit_before>- content_for :title do
  = @project.title

.col-sm-12
  .row
    .col-sm-12
      - if @project.previous
        =   button_to 'Previous', @project.previous, :id => "previous_link", :method => :get, :class => "btn btn-default btn-xs pull-left", :title=> "Try pressing 'j' on your keyboard.."
      - if @project.next
        = button_to 'Next', @project.next, :id => "next_link", :method => :get, :class => "btn btn-default btn-xs pull-right", :title => "Try pressing 'k' on your keyboard.."
      .clearfix
      .page-header
        %h1
          = image_tag @project.avatar.url(:thumb)
          = @project.title
          %br
          %small
            = render :partial => "projects/state_name", :locals => {:project =>  @project }
            by
            = link_to user_path(@project.originator) do
              = @project.originator.name
            = render :partial => "projects/like_button", :locals => {:project =>  @project }
        %span.help-block
          %small
            = render :partial => "projects/info", :locals => {:project => @project }
  .row
    .col-sm-8
      :markdown
        #{@project.description}
    .col-sm-4
      .row
        .col-sm-12
          .text-right
            = render :partial => "projects/file_buttons", :locals => {:project =>  @project }
      .row
        .col-sm-12
          %h4
            - if @project.users.empty?
              No
            Hackers:
          .well.well-sm#hackers
            - @project.users.each do |user|
              = link_to(user_path(user.id)) do
                = image_tag user.gravatar_url(:size => "64"), alt: user.name, title: user.name, class: "img-thumbnail", id: "user#{user.id}-gravatar"
          - unless @project.aasm_state == "invention"
            %p.pull-right
              - if @project.users.empty? or !@project.users.include? current_user
                = link_to(join_project_path(@episode, @project), :method => :post, :class => "btn btn-success") do
                  %i.fa.fa-plus
                  Join this project
              - if @project.users.include? current_user
                = link_to(leave_project_path(@episode, @project), :method => :post, :class => "btn btn-warning") do
                  %i.fa.fa-minus
                  Leave this project
            .clearfix
      .row
        .col-sm-12
          %h4
            Looking for mad skills in:
          %p
            - if @project.keywords.empty?
              Nothing? Add some keywords!
            - else 
              = render :partial => "keywords/show", :locals => {:keywords =>  @project.keywords }
            -if  @project.originator == current_user or @project.users.include? current_user
              = render :partial => "keywords/new", :locals => {:what => @project }
      .row
        .col-sm-12
          %h4
            This project is part of:
          %p
            - unless @project.episodes.any?
              No hackweek. How about you add one...
            - @project.episodes.each do |episode|
              %span.label.label-primary{style: 'display: inline-block'}
                = truncate(episode.name, length: 50)
                = link_to(episode_project_path(:episode_id => episode.id), method: :delete) do
                  %i.fa.fa-times{:style=>"color: #fff"}
          .btn-group.pull-right
            %button.btn.btn-success.dropdown-toggle{"data-toggle" => "dropdown", :type => "button"}
              %i.fa.fa-plus
              Add Hackweek
              %span.caret
            %ul.dropdown-menu{:role => "menu"}
              - Episode.all.reverse.each do |episode|
                %li{:role => "presentation"}
                  = link_to(truncate(episode.name, length: 50), episode_project_path(:episode_id => episode.id), method: :post)
          .clearfix
      .row
        .col-sm-12
          %h4
            Activity
            %span.pull-right
              = render :partial => "updates/show_all_modal", :locals => { :updates => @project.updates }
          %ul
          - @project.updates.reverse.first(5).each do |update|
            %li
              = render :partial => "updates/show", :locals => { :update => update }
  .row
    .col-sm-12
      %h4
        Comments
      %ul.media-list
        = render :partial => 'comments/comment', :collection => @project.comments
      %p
        - if current_user
          = render :partial => 'comments/help'
          = form_for [ @project, @new_comment ], url: project_comments_url(@project), html: {role: "form"} do |f|
            %p
              - if @project.keywords.empty?
                Nothing? Add some keywords!
              - else 
                = render :partial => "keywords/show", :locals => {:keywords =>  @project.keywords }
              -if @project.originator == current_user or @project.users.include? current_user
                = render :partial => "keywords/new", :locals => {:what => @project }
          .wrap
            %h4
              This project is part of:
            %p
            = button_tag(type: 'submit', class: "btn btn-success pull-right") do
              %i.fa.fa-plus
              Add Comment
        - else
          = link_to 'Add a comment', new_project_comment_path(@episode, @project ), :class => 'btn btn-default'

- content_for :script do
  :javascript
    Mousetrap.bind('j', function() { $('#previous_link').click(); });
    Mousetrap.bind('k', function() { $('#next_link').click(); })<commit_msg>Get rid of wrong comment link for not logged in users<commit_after>- content_for :title do
  = @project.title

.col-sm-12
  .row
    .col-sm-12
      - if @project.previous
        =   button_to 'Previous', @project.previous, :id => "previous_link", :method => :get, :class => "btn btn-default btn-xs pull-left", :title=> "Try pressing 'j' on your keyboard.."
      - if @project.next
        = button_to 'Next', @project.next, :id => "next_link", :method => :get, :class => "btn btn-default btn-xs pull-right", :title => "Try pressing 'k' on your keyboard.."
      .clearfix
      .page-header
        %h1
          = image_tag @project.avatar.url(:thumb)
          = @project.title
          %br
          %small
            = render :partial => "projects/state_name", :locals => {:project =>  @project }
            by
            = link_to user_path(@project.originator) do
              = @project.originator.name
            = render :partial => "projects/like_button", :locals => {:project =>  @project }
        %span.help-block
          %small
            = render :partial => "projects/info", :locals => {:project => @project }
  .row
    .col-sm-8
      :markdown
        #{@project.description}
    .col-sm-4
      .row
        .col-sm-12
          .text-right
            = render :partial => "projects/file_buttons", :locals => {:project =>  @project }
      .row
        .col-sm-12
          %h4
            - if @project.users.empty?
              No
            Hackers:
          .well.well-sm#hackers
            - @project.users.each do |user|
              = link_to(user_path(user.id)) do
                = image_tag user.gravatar_url(:size => "64"), alt: user.name, title: user.name, class: "img-thumbnail", id: "user#{user.id}-gravatar"
          - unless @project.aasm_state == "invention"
            %p.pull-right
              - if @project.users.empty? or !@project.users.include? current_user
                = link_to(join_project_path(@episode, @project), :method => :post, :class => "btn btn-success") do
                  %i.fa.fa-plus
                  Join this project
              - if @project.users.include? current_user
                = link_to(leave_project_path(@episode, @project), :method => :post, :class => "btn btn-warning") do
                  %i.fa.fa-minus
                  Leave this project
            .clearfix
      .row
        .col-sm-12
          %h4
            Looking for mad skills in:
          %p
            - if @project.keywords.empty?
              Nothing? Add some keywords!
            - else 
              = render :partial => "keywords/show", :locals => {:keywords =>  @project.keywords }
            -if  @project.originator == current_user or @project.users.include? current_user
              = render :partial => "keywords/new", :locals => {:what => @project }
      .row
        .col-sm-12
          %h4
            This project is part of:
          %p
            - unless @project.episodes.any?
              No hackweek. How about you add one...
            - @project.episodes.each do |episode|
              %span.label.label-primary{style: 'display: inline-block'}
                = truncate(episode.name, length: 50)
                = link_to(episode_project_path(:episode_id => episode.id), method: :delete) do
                  %i.fa.fa-times{:style=>"color: #fff"}
          .btn-group.pull-right
            %button.btn.btn-success.dropdown-toggle{"data-toggle" => "dropdown", :type => "button"}
              %i.fa.fa-plus
              Add Hackweek
              %span.caret
            %ul.dropdown-menu{:role => "menu"}
              - Episode.all.reverse.each do |episode|
                %li{:role => "presentation"}
                  = link_to(truncate(episode.name, length: 50), episode_project_path(:episode_id => episode.id), method: :post)
          .clearfix
      .row
        .col-sm-12
          %h4
            Activity
            %span.pull-right
              = render :partial => "updates/show_all_modal", :locals => { :updates => @project.updates }
          %ul
          - @project.updates.reverse.first(5).each do |update|
            %li
              = render :partial => "updates/show", :locals => { :update => update }
  .row
    .col-sm-12
      %h4
        Comments
      %ul.media-list
        = render :partial => 'comments/comment', :collection => @project.comments
      %p
        - if current_user
          = render :partial => 'comments/help'
          = form_for [ @project, @new_comment ], url: project_comments_url(@project), html: {role: "form"} do |f|
            %p
              - if @project.keywords.empty?
                Nothing? Add some keywords!
              - else 
                = render :partial => "keywords/show", :locals => {:keywords =>  @project.keywords }
              -if @project.originator == current_user or @project.users.include? current_user
                = render :partial => "keywords/new", :locals => {:what => @project }
          .wrap
            %h4
              This project is part of:
            %p
            = button_tag(type: 'submit', class: "btn btn-success pull-right") do
              %i.fa.fa-plus
              Add Comment

- content_for :script do
  :javascript
    Mousetrap.bind('j', function() { $('#previous_link').click(); });
    Mousetrap.bind('k', function() { $('#next_link').click(); })
{'fraction_non_alphanumeric': 0.1408593246848836, 'fraction_numerical': 0.00588830619192198, 'mean_word_length': 1.697939935467858, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 110, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2993628', 'n_tokens_mistral': 3288, 'n_tokens_neox': 3162, 'n_words': 724}