<commit_before><div class="row">
  <div class="span6">
    Goal for this month (<%= Donation.month_amount %>/<%= Settings.donations_goal_month.to_i %>)
    <%= horizontal_bar_graph [["This month", Donation.month_percent(:this)]] %>
  </div>

  <div class="span6">
    <% payment_service_for 0, PAYPAL_ACCOUNT,
        :currency => 'EUR',
        :service => :paypal do |service|

    service.customer :first_name => current_user.login,
        :last_name => current_user.login,
        :email => current_user.email

    service.item_name "Support pour le Monde de Nuxos"

    # PayPal will POST a callback here when the payment is done
    service.notify_url donations_ipn_url
    # PayPal will take your user here with a POST after he pays
    service.return_url donations_thanks_url
    # PayPal will redirect your user here if he cancels the payment
    service.cancel_return_url donations_cancel_url %>

    Somme a donner (en euros): <%= select_tag :amount, options_for_select(%w{ 5 10 15 20 }), :class => "span1" %>

    <% @custom_things = {} %>

    <% if current_user %>
    <% @custom_things[:user_id] = current_user.id %>
    <% else %>
    <% @custom_things[:user_id] = 0 %>
    <% end %>
    <%= hidden_field_tag :custom, @custom_things.to_yaml %>

    <%= submit_tag 'Supporter le serveur!' %>
<% end %>
  </div>
</div><commit_msg>Hotfix for donations when not logged in<commit_after><div class="row">
  <div class="span6">
    Goal for this month (<%= Donation.month_amount %>/<%= Settings.donations_goal_month.to_i %>)
    <%= horizontal_bar_graph [["This month", Donation.month_percent(:this)]] %>
  </div>

  <div class="span6">
    <% if current_user %>
      <% @d_user = {:first_name => "Anonymous", :last_name => "Anonymous", :email => "<EMAIL>"} %>
    <% else %>
      <% @d_user = {:first_name => current_user.login, :last_name => current_user.login, :email => current_user.email} %>
    <% end %>
    <% payment_service_for 0, PAYPAL_ACCOUNT,
        :currency => 'EUR',
        :service => :paypal do |service|

    service.customer @d_user

    service.item_name "Support pour le Monde de Nuxos"

    # PayPal will POST a callback here when the payment is done
    service.notify_url donations_ipn_url
    # PayPal will take your user here with a POST after he pays
    service.return_url donations_thanks_url
    # PayPal will redirect your user here if he cancels the payment
    service.cancel_return_url donations_cancel_url %>

    Somme a donner (en euros): <%= select_tag :amount, options_for_select(%w{ 5 10 15 20 }), :class => "span1" %>

    <% @custom_things = {} %>

    <% if current_user %>
    <% @custom_things[:user_id] = current_user.id %>
    <% else %>
    <% @custom_things[:user_id] = 0 %>
    <% end %>
    <%= hidden_field_tag :custom, @custom_things.to_yaml %>

    <%= submit_tag 'Supporter le serveur!' %>
<% end %>
  </div>
</div>
{'fraction_non_alphanumeric': 0.14275814275814275, 'fraction_numerical': 0.008316008316008316, 'mean_word_length': 3.50390015600624, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 64, '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': '7569139', 'n_tokens_mistral': 1053, 'n_tokens_neox': 917, 'n_words': 244}