<commit_before><% if @proposal.is_petition? %>
    <% if @proposal.voting? %>
        <div class="rankleftpanel mybox">
          <p class="inpoints">
            <span class="littleText" id="valutazioni"><%= 'Signs' %></span>
            <span class="rightAlign"><%= @proposal.vote.number %>/<%= @proposal.signatures %></span>
          </p>

          <div class="progress success">
            <span class="meter" style="width:<%=[(@proposal.vote.number.to_f / @proposal.signatures.to_f) * 100, 100].min%>%">
                <%= @proposal.vote.number %>/<%= @proposal.signatures %>
            </span>
          </div>

          <% if can? :vote, @proposal %>
              <%= form_for 'data', url: votation_vote_path(proposal_id: @proposal.id), remote: true, method: :put do |f| %>
                  <%= f.text_area 'comment', placeholder: 'Share your thought' %>
                  <%= f.submit 'Sign the petition', class: 'btn  blue', disable_with: t('loading') %>
              <% end %>
          <% elsif current_user && vote = UserVote.find_by_proposal_id_and_user_id(@proposal.id, current_user.id) %>
              <p>You signed this petition</p>
          <% end %>
        </div>
    <% end %>
<% else #not a petition %>
    <div id="rankleftpanel" class="rankleftpanel mybox">
      <div class="points">
        <%= render partial: 'proposals/points_left_panel' %>
      </div>
      <div class="rank">
        <%= render partial: 'proposals/rank_left_panel' %>
      </div>
      <div>
        <% if signed_in? %>
            <% if @proposal.proposal_revisions.count > 0 || @proposal.abandoned? %>
                <%= link_to proposal_proposal_revisions_url(@proposal), remote: true, class: 'btn', data: { disable_with: t('loading') }, id: "history" do %>
                    <i class="fa fa-file-text-o"></i>
                    <%= t('pages.proposals.show.history_button') %>
                <% end %>
            <% end %>
            <% if params[:action] == 'show' %>
                <% if @proposal.vote %>
                    <!--todo wrong url-->
                    <%= link_to vote_results_proposal_url(@proposal), remote: true, class: 'btn disable results-button' do %>
                        <%= t('pages.proposals.show.votation_results') %>
                    <% end %>
                    <br/><br/>
                <% end %>
                <%= link_to url_for_proposal(@proposal, format: :pdf), target: '_blank', class: 'btn disable' do %>
                    <i class="fa fa-file-pdf-o"></i>
                    <%= t('pages.proposals.show.export_pdf') %>
                <% end %>
            <% else %>
                <%= link_to t('pages.proposal_histories.index.back_to_proposal'), @group ? group_proposal_url(@group, @proposal) : proposal_url(@proposal), class: 'btn blue' %>
            <% end %>
        <% end %>
      </div>

      <div class="block-alerts">
        <%= render partial: 'blocked_proposal_alerts/block_alerts_panel' %>
      </div>
    </div>

    <div id="dates" class="mybox" style="text-align:center">
      <%= render partial: 'proposals/dates' %>
    </div>

<% end %>

<% if ::Configuration.socialnetwork_active %>
    <div class="mybox socialnetwork">
      <% @pinurl = if (@group && !@group.image.url.blank?) %>
          <% @group.image.url %>
      <% else %>
          <% "#{request.protocol}#{request.host_with_port}#{asset_path("logo120.png")}" %>
      <% end %>
      <a href="https://twitter.com/share"
         class="twitter-share-button"
         data-lang="en"
         data-count="vertical"
         data-text="Guarda questa proposta su #<%= ENV['APP_SHORT_NAME'] %>">Tweet</a>
      <g:plusone size="tall"></g:plusone>
      <div class="fb-like" data-send="false" data-layout="box_count" data-width="100" data-show-faces="false" data-likeable_type="<%= @proposal.class.class_name %>" data-likeable_id="<%= @proposal.id %>"></div>
      <%= link_to t('.promote_proposal'), promote_proposal_url(@proposal, group_id: @group.try(:id)), remote: true, data: { disable_with: t('loading') }, class: 'btn blue', id: 'promote_proposal' %>
    </div>
<% end %>

<div class="nickname_container">
  <%= render 'proposals/nickname_panel' %>
</div>

<% if @proposal.abandoned? %>
    <div class="mybox">
      <h4><%= t('pages.proposals.show.old_editors_title') %></h4>
<commit_msg>remove promote proposal button<commit_after><% if @proposal.is_petition? %>
    <% if @proposal.voting? %>
        <div class="rankleftpanel mybox">
          <p class="inpoints">
            <span class="littleText" id="valutazioni"><%= 'Signs' %></span>
            <span class="rightAlign"><%= @proposal.vote.number %>/<%= @proposal.signatures %></span>
          </p>

          <div class="progress success">
            <span class="meter" style="width:<%=[(@proposal.vote.number.to_f / @proposal.signatures.to_f) * 100, 100].min%>%">
                <%= @proposal.vote.number %>/<%= @proposal.signatures %>
            </span>
          </div>

          <% if can? :vote, @proposal %>
              <%= form_for 'data', url: votation_vote_path(proposal_id: @proposal.id), remote: true, method: :put do |f| %>
                  <%= f.text_area 'comment', placeholder: 'Share your thought' %>
                  <%= f.submit 'Sign the petition', class: 'btn  blue', disable_with: t('loading') %>
              <% end %>
          <% elsif current_user && vote = UserVote.find_by_proposal_id_and_user_id(@proposal.id, current_user.id) %>
              <p>You signed this petition</p>
          <% end %>
        </div>
    <% end %>
<% else #not a petition %>
    <div id="rankleftpanel" class="rankleftpanel mybox">
      <div class="points">
        <%= render partial: 'proposals/points_left_panel' %>
      </div>
      <div class="rank">
        <%= render partial: 'proposals/rank_left_panel' %>
      </div>
      <div>
        <% if signed_in? %>
            <% if @proposal.proposal_revisions.count > 0 || @proposal.abandoned? %>
                <%= link_to proposal_proposal_revisions_url(@proposal), remote: true, class: 'btn', data: { disable_with: t('loading') }, id: "history" do %>
                    <i class="fa fa-file-text-o"></i>
                    <%= t('pages.proposals.show.history_button') %>
                <% end %>
            <% end %>
            <% if params[:action] == 'show' %>
                <% if @proposal.vote %>
                    <!--todo wrong url-->
                    <%= link_to vote_results_proposal_url(@proposal), remote: true, class: 'btn disable results-button' do %>
                        <%= t('pages.proposals.show.votation_results') %>
                    <% end %>
                    <br/><br/>
                <% end %>
                <%= link_to url_for_proposal(@proposal, format: :pdf), target: '_blank', class: 'btn disable' do %>
                    <i class="fa fa-file-pdf-o"></i>
                    <%= t('pages.proposals.show.export_pdf') %>
                <% end %>
            <% else %>
                <%= link_to t('pages.proposal_histories.index.back_to_proposal'), @group ? group_proposal_url(@group, @proposal) : proposal_url(@proposal), class: 'btn blue' %>
            <% end %>
        <% end %>
      </div>

      <div class="block-alerts">
        <%= render partial: 'blocked_proposal_alerts/block_alerts_panel' %>
      </div>
    </div>

    <div id="dates" class="mybox" style="text-align:center">
      <%= render partial: 'proposals/dates' %>
    </div>

<% end %>

<% if ::Configuration.socialnetwork_active %>
    <div class="mybox socialnetwork">
      <% @pinurl = if (@group && !@group.image.url.blank?) %>
          <% @group.image.url %>
      <% else %>
          <% "#{request.protocol}#{request.host_with_port}#{asset_path("logo120.png")}" %>
      <% end %>
      <a href="https://twitter.com/share"
         class="twitter-share-button"
         data-lang="en"
         data-count="vertical"
         data-text="Guarda questa proposta su #<%= ENV['APP_SHORT_NAME'] %>">Tweet</a>
      <g:plusone size="tall"></g:plusone>
      <div class="fb-like" data-send="false" data-layout="box_count" data-width="100" data-show-faces="false" data-likeable_type="<%= @proposal.class.class_name %>" data-likeable_id="<%= @proposal.id %>"></div>
    </div>
<% end %>

<div class="nickname_container">
  <%= render 'proposals/nickname_panel' %>
</div>

<% if @proposal.abandoned? %>
    <div class="mybox">
      <h4><%= t('pages.proposals.show.old_editors_title') %></h4>

{'fraction_non_alphanumeric': 0.18497652582159624, 'fraction_numerical': 0.0035211267605633804, 'mean_word_length': 2.2886916248552684, 'pattern_counts': {'":': 0, '<': 204, '<?xml version=': 0, '>': 206, 'https://': 2, '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': '918785', 'n_tokens_mistral': 2960, 'n_tokens_neox': 2685, 'n_words': 494}