<commit_before><%#= template_include_tag 'vote_box' %>
<% talk = @talk %>

<% if can? :update, talk %>
<div class="row">
  <div class="span12">
    <span>
      <%= link_to edit_talk_url(talk) do %>
        <i class="icon-pencil"></i> Modifica
      <% end %>
    </span>
  <% if can? :manage, talk %>
    <span><i class="icon-remove"></i> Elimina</span>
    <%= link_to talk_url(@talk)+"?talk[status]=visible", :remote => true, :method => :put,
                  :class => 'set_visible' do %>
      <span><i class="icon-ok"></i> Approva</span>
    <% end %>
    <%= link_to talk_url(@talk)+"?talk[status]=hidden", :remote => true, :method => :put,
                  :class => 'set_hidden' do %>
      <span><i class="icon-ok"></i> Nascondi</span>
      <%# form_for() %>
    <% end %>
  <% end %>
  </div>
</div>
<% end %>

<div class="row talk talk-<%= talk.status %>" id="talk-<%= talk.id %>"
     style="border-bottom: 1px solid #DDD; margin-top: 4px;">
  <div class="span1">
    <%= render 'users/user_profile_mini', :user => talk.user %>
  </div>
  <div class="span11">
    <a href="<%= talk_url(talk) %>">
    <h2 style="margin-top: 0px; margin-bottom: .5em; margin-right: .5em; line-height: .9em;"><%= title talk.title %></h2></a>
    <span><i class="icon-eye-open"></i> <%= talk.votes_count + 1  %></span>
    <span><i class="icon-comment"></i> <%= talk.comments.count  %></span>
    Proposto il: <%= talk.created_at.to_s.slice(0..9)  %> da: <strong><%= talk.user.display_name %></strong>
  </div>
  <div class="row span12">
    <textarea class="wmd-input hidden" id="wmd-input"><%= talk.content %></textarea>
    <div id="wmd-preview" class="wmd-panel wmd-preview"></div>
  </div>
  <div class="row offset4 span8" style="margin-bottom:20px;">
      <%= link_to current_user.voted_for?(@talk) ? 'Annulla voto' : 'Vota', toggle_vote_talk_url(@talk), :remote => true, :class => 'toggle_vote btn btn-mini btn-primary' %>
  </div>
</div>

  <div class="row well">
    <h4>Utenti interessati</h4>

    <div>
    <% @talk.voters_who_voted.each do |u| %>
     <%= render 'users/user_profile_mini', :user => u %>
    <% end %>
    </div>
  </div>


<h4>Commenti</h4>

<% @comments = @talk.comments.includes(:user) %>
<div id="comments">
<% for comment in @comments %>
<div class="row" style="border-bottom: 1px solid #DDD; margin-top: 4px;">
  <div class="span1"><%= render 'users/user_profile_mini', :user => comment.user %></div>
  <div class="span13">
    <h4 style="margin-top: 0px; margin-bottom: .5em; line-height: .9em;"><%=simple_format comment.content %></h4>
    <%= comment.user.display_name %>
  </div>
</div>
<% end %>
</div>



<h2>Nuovo commento</h2>

<%= twitter_bootstrap_form_for [@talk, Comment.new] do |f| %>
  <div class="field">
    <%= f.text_area :content %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
<commit_msg>fake vote per anonimi<commit_after><%#= template_include_tag 'vote_box' %>
<% talk = @talk %>

<% if can? :update, talk %>
<div class="row">
  <div class="span12">
    <span>
      <%= link_to edit_talk_url(talk) do %>
        <i class="icon-pencil"></i> Modifica
      <% end %>
    </span>
  <% if can? :manage, talk %>
    <span><i class="icon-remove"></i> Elimina</span>
    <%= link_to talk_url(@talk)+"?talk[status]=visible", :remote => true, :method => :put,
                  :class => 'set_visible' do %>
      <span><i class="icon-ok"></i> Approva</span>
    <% end %>
    <%= link_to talk_url(@talk)+"?talk[status]=hidden", :remote => true, :method => :put,
                  :class => 'set_hidden' do %>
      <span><i class="icon-ok"></i> Nascondi</span>
      <%# form_for() %>
    <% end %>
  <% end %>
  </div>
</div>
<% end %>

<div class="row talk talk-<%= talk.status %>" id="talk-<%= talk.id %>"
     style="border-bottom: 1px solid #DDD; margin-top: 4px;">
  <div class="span1">
    <%= render 'users/user_profile_mini', :user => talk.user %>
  </div>
  <div class="span11">
    <a href="<%= talk_url(talk) %>">
    <h2 style="margin-top: 0px; margin-bottom: .5em; margin-right: .5em; line-height: .9em;"><%= title talk.title %></h2></a>
    <span><i class="icon-eye-open"></i> <%= talk.votes_count + 1  %></span>
    <span><i class="icon-comment"></i> <%= talk.comments.count  %></span>
    Proposto il: <%= talk.created_at.to_s.slice(0..9)  %> da: <strong><%= talk.user.display_name %></strong>
  </div>
  <div class="row span12">
    <textarea class="wmd-input hidden" id="wmd-input"><%= talk.content %></textarea>
    <div id="wmd-preview" class="wmd-panel wmd-preview"></div>
  </div>
  <div class="row offset4 span8" style="margin-bottom:20px;">
  <% if current_user %>
      <%= link_to current_user.voted_for?(@talk) ? 'Annulla voto' : 'Vota', toggle_vote_talk_url(@talk), :remote => true, :class => 'toggle_vote btn btn-mini btn-primary' %>
  <% else %>
      <%= link_to 'Vota', '#', :remote => true, :confirm => 'Per poter votare devi accedere', :class => 'toggle_vote btn btn-mini btn-primary' %>
  <% end %>
  
  </div>
</div>

  <div class="row well">
    <h4>Utenti interessati</h4>

    <div>
    <% @talk.voters_who_voted.each do |u| %>
     <%= render 'users/user_profile_mini', :user => u %>
    <% end %>
    </div>
  </div>


<h4>Commenti</h4>

<% @comments = @talk.comments.includes(:user) %>
<div id="comments">
<% for comment in @comments %>
<div class="row" style="border-bottom: 1px solid #DDD; margin-top: 4px;">
  <div class="span1"><%= render 'users/user_profile_mini', :user => comment.user %></div>
  <div class="span13">
    <h4 style="margin-top: 0px; margin-bottom: .5em; line-height: .9em;"><%=simple_format comment.content %></h4>
    <%= comment.user.display_name %>
  </div>
</div>
<% end %>
</div>



<h2>Nuovo commento</h2>

<%= twitter_bootstrap_form_for [@talk, Comment.new] do |f| %>
  <div class="field">
    <%= f.text_area :content %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>

{'fraction_non_alphanumeric': 0.23140356782228205, 'fraction_numerical': 0.012790306294177045, 'mean_word_length': 3.4886706948640485, 'pattern_counts': {'":': 0, '<': 225, '<?xml version=': 0, '>': 250, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4712609', 'n_tokens_mistral': 2428, 'n_tokens_neox': 2216, 'n_words': 464}