Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 489
- Log:
Jan 2024 bounty system updates
- Author:
- rool
- Date:
- Sun Jan 28 09:30:54 +0000 2024
- Size:
- 2886 Bytes
1 | <% |
2 | # Render as follows: |
3 | # |
4 | # render( |
5 | # :partial => 'edit', |
6 | # :locals => { |
7 | # :poll => <poll>, |
8 | # :action => :create | :update |
9 | # } |
10 | # ) |
11 | # |
12 | # ...where <poll> is the poll to edit and :action is used for the |
13 | # internationalised text in the 'submit' action button. In addition, |
14 | # a "delete" button is shown for the :update case. |
15 | |
16 | form_for( poll ) do | f | %> |
17 | <%= f.error_messages %> |
18 | |
19 | <table border="1" cellspacing="1" cellpadding="0"> |
20 | <tr> |
21 | <th><%= f.label :title %></th> |
22 | <td> |
23 | <%= f.text_field :title, :size => 30, :maxlength => Poll::MAXLEN_TITLE %> |
24 | </td> |
25 | </tr> |
26 | <tr> |
27 | <th><%= f.label :currency %></th> |
28 | <td> |
29 | <% if ( poll.votes.blank? || poll.votes.zero? ) -%> |
30 | <%= currencyhelp_menu( Currency.all, { :form => f } ) %> |
31 | <% else -%> |
32 | <%=h poll.currency.name %> |
33 | <br /> |
34 | <span class="view_hint"> |
35 | <%= apphelp_view_hint( :cannot_change_currency_hint ) %> |
36 | </span> |
37 | <% end -%> |
38 | </td> |
39 | </tr> |
40 | <tr> |
41 | <th><%= f.label :target_for_sorting %></th> |
42 | <td><%= currencyhelp_edit( poll.currency, f, :target, poll ) %></td> |
43 | </tr> |
44 | <% if ( action == :update ) -%> |
45 | <tr> |
46 | <th><%= f.label :workflow_state %></th> |
47 | <td> |
48 | <%= apphelp_state( poll.workflow_state, PollsController ) %> |
49 | ⇒ |
50 | <%= pollshelp_state_change_menu( f, poll ) %> |
51 | <%= help_link( "poll_states" ) %> |
52 | <br /> |
53 | <span class="view_hint"> |
54 | <%= apphelp_view_hint( :state_change_care_hint ) %> |
55 | </span> |
56 | </td> |
57 | </tr> |
58 | <% end -%> |
59 | </table> |
60 | |
61 | <p /> |
62 | <%= f.label :description %> |
63 | (<a target="_blank" href="http://textile-lang.com">modern Textile</a>) |
64 | <br /> |
65 | |
66 | <div class="redcloth_preview_outer"> |
67 | <span class="redcloth_preview_title"> |
68 | <%= apphelp_view_hint( :preview ) %> |
69 | </span> |
70 | <div class="redcloth_preview_inner" id="description_preview"> |
71 | <noscript> |
72 | <%= apphelp_view_hint( :preview_no_js ) %> |
73 | </noscript> |
74 | </div> |
75 | </div> |
76 | |
77 | <%= f.text_area :description, :rows => 20, :cols => 80, :class => 'redcloth_preview_source' %> |
78 | |
79 | <script type="text/javascript"> |
80 | document.observe |
81 | ( |
82 | "dom:loaded", |
83 | function() |
84 | { |
85 | new RedClothPreview |
86 | ( |
87 | 'poll_description', |
88 | 'description_preview', |
89 | '<%= redcloth_path() %>' |
90 | ); |
91 | } |
92 | ); |
93 | </script> |
94 | |
95 | <br style="clear: both;" /> |
96 | <p /> |
97 | <div class="buttons aligned"> |
98 | <%= apphelp_submit( f, action ) %> |
99 | |
100 | <% if ( action == :create ) -%> |
101 | <%= apphelp_protected_button_to( :index, { :method => :polls_path } ) %> |
102 | <% else -%> |
103 | <%= |
104 | apphelp_protected_buttons_to( |
105 | nil, |
106 | [ :show, { :method => :poll_path }, @poll ], |
107 | [ :index, { :method => :polls_path } ] |
108 | ) |
109 | %> |
110 | <% end -%> |
111 | </div> |
112 | <% end %> |