Changesets can be listed by changeset number.
The Git repository is here.
Changeset 426
Simple modification to Canvass to let it read from a plain
text file and report the first line of this as an amount left
in a donation matching "pot" in the list of bounties.
- Comitted by: rool
- Date: Friday June 03 11:26:06 2011 (over 13 years ago)
Affected files:
- rool/rails/canvass/trunk/app/views/polls/_list.html.erb (diff)
- rool/rails/canvass/trunk/config/initializers/50_general_settings.rb (diff)
rool/rails/canvass/trunk/app/views/polls/_list.html.erb:
prev. | current | |
<td colspan="5"> | ||
<div class="pagination"> | ||
<%= apphelp_i18n_will_paginate( @items ) %><br /> | ||
46 | <% | |
47 | if ( defined?( MATCHING_POT_LOCATION ) && | |
48 | defined?( MATCHING_POT_CURRENCY ) && | |
49 | File.exists?( MATCHING_POT_LOCATION ) ) | |
50 | ||
51 | string = ( File.open( MATCHING_POT_LOCATION, 'r' ) { | f | f.readline } ).chomp() | |
52 | currency = Currency.find_by_code( MATCHING_POT_CURRENCY ) | |
53 | ||
54 | unless ( currency.nil? || string.to_f.zero? ) | |
55 | -%> | |
56 | <strong> | |
57 | <%= | |
58 | link_to( | |
59 | apphelp_view_hint( | |
60 | :matching_pot, | |
61 | controller, | |
62 | :amount => currencyhelp_print( currency, string ) | |
63 | ), | |
64 | '/content/documents/bounties/matching' | |
65 | ) | |
66 | %> | |
67 | </strong> | | |
68 | <% end -%> | |
69 | <% end -%> | |
<a href="/content/documents/bounties">More information</a> | | ||
<a href="/forum/forums/8">Forum</a> | ||
</div> |
rool/rails/canvass/trunk/config/initializers/50_general_settings.rb:
prev. | current | |
# Maximum number of items to show per page in sortable list views. | ||
MAXIMUM_LIST_ITEMS_PER_PAGE = 25 | ||
25 | ||
26 | # ROOL specific change. | |
27 | ||
28 | MATCHING_POT_CURRENCY = 'GBP' | |
29 | MATCHING_POT_LOCATION = "/home/rool/shared/matching_pot.txt" |