parent
57e976ef96
commit
882d0a51ed
17 changed files with 302 additions and 75 deletions
@ -1,7 +1,25 @@ |
||||
/* Application styles */ |
||||
|
||||
table { border: 1px solid black; } |
||||
body { |
||||
max-width: 800px; |
||||
margin: 0 auto; |
||||
} |
||||
|
||||
td, th { padding: 10px; } |
||||
table { |
||||
border: 1px solid black; |
||||
border-collapse: collapse; |
||||
margin: 20px 0; |
||||
width: calc(100% - 42px); |
||||
} |
||||
|
||||
.new_contribution_form { max-width: 600px; } |
||||
td, th { padding: 10px; text-align: left; } |
||||
|
||||
table.zebra tr:nth-child(2n) { background-color: #eee; } |
||||
table.lined tr:nth-child(n + 2) td { border-top: 1px solid #eee; } |
||||
|
||||
ul { |
||||
padding-left: 5px; |
||||
margin: 0; |
||||
} |
||||
|
||||
li { padding: 5px 0px; } |
||||
|
@ -0,0 +1,28 @@ |
||||
<p style="color: green"><%= notice %></p> |
||||
|
||||
<h1><%= t('contributions.delete.title') %></h1> |
||||
|
||||
<p><%= t('contributions.delete.confirmation_message') %></p> |
||||
|
||||
<table> |
||||
<tr><td><%= t('members.attributes.display_name') %></td><td><%= @contribution.member.display_name %></td></tr> |
||||
<tr><td><%= t('members.attributes.email') %></td><td><%= @contribution.member.email %></td></tr> |
||||
<tr><td><%= t('members.attributes.category') %></td><td><%= @contribution.member.category %></td></tr> |
||||
<tr><td><%= t('members.attributes.identification_number') %></td><td><%= @contribution.member.identification_number %></td></tr> |
||||
<tr><td><%= t('members.attributes.address') %></td><td><%= simple_format @contribution.member.address %></td></tr> |
||||
<tr><td><%= t('members.attributes.joined_on') %></td><td><%= @contribution.member.joined_on %></td></tr> |
||||
<tr><td><%= t('members.attributes.expires_on') %></td><td><%= @contribution.member.expires_on %></td></tr> |
||||
<tr><td><%= t('members.attributes.status') %></td><td><%= @contribution.member.status %></td></tr> |
||||
</table> |
||||
|
||||
|
||||
<%= form_with model: @contribution, method: :delete do |form| %> |
||||
<div> |
||||
<%= form.submit t('contributions.delete.actions.submit') %> |
||||
</div> |
||||
|
||||
<div> |
||||
<%= link_to t('contributions.delete.actions.go_back'), members_path %> |
||||
</div> |
||||
<% end %> |
||||
|
@ -1,22 +1,36 @@ |
||||
editando contriboot |
||||
<h1><%= t('contributions.edit.title') %></h1> |
||||
|
||||
<%= form_with(model: @contribution) do |form| %> |
||||
<table> |
||||
<tr> |
||||
<td>Amount</td> |
||||
<td>€<%= @contribution.eurocents %></td> |
||||
</tr> |
||||
<tr> |
||||
<td>Payment date</td> |
||||
<td>€<%= @contribution.payment_on %></td> |
||||
</tr> |
||||
<tr> |
||||
<td>Payment method</td> |
||||
<td><%= @contribution.payment_method %></td> |
||||
</tr> |
||||
<tr> |
||||
<td>Payment reference</td> |
||||
<td><%= @contribution.payment_reference %></td> |
||||
</tr> |
||||
</table> |
||||
<table> |
||||
<tr> |
||||
<td><%= t('contributions.edit.member') %></td> |
||||
<td> |
||||
<%= link_to @contribution.member do %> |
||||
<%= @contribution.member.number %>. |
||||
<%= @contribution.member.display_name %> |
||||
<<%= @contribution.member.email %>> |
||||
<% end %> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<td><label><%= t('contributions.attributes.amount') %></label></td> |
||||
<td><%= form.number_field :eurocents, required: true %></td> |
||||
</tr> |
||||
<tr> |
||||
<td><label><%= t('contributions.attributes.payment_on') %></label></td> |
||||
<td><%= form.date_field :payment_on %></td> |
||||
</tr> |
||||
<tr> |
||||
<td><label><%= t('contributions.attributes.payment_method') %></label></td> |
||||
<td><%= form.select :payment_method, %w[iban mbway multibanco] %></td> |
||||
</tr> |
||||
<tr> |
||||
<td><label><%= t('contributions.attributes.payment_reference') %></label></td> |
||||
<td><%= form.text_field :payment_reference %></td> |
||||
</tr> |
||||
</table> |
||||
|
||||
<div> |
||||
<%= form.submit t('contributions.edit.actions.submit') %> |
||||
</div> |
||||
<% end %> |
||||
|
@ -0,0 +1,27 @@ |
||||
<p style="color: green"><%= notice %></p> |
||||
|
||||
<h1><%= t('members.delete.title') %></h1> |
||||
|
||||
<p><%= t('members.delete.confirmation_message') %></p> |
||||
|
||||
<table> |
||||
<tr><td><%= t('members.attributes.display_name') %></td><td><%= @member.display_name %></td></tr> |
||||
<tr><td><%= t('members.attributes.email') %></td><td><%= @member.email %></td></tr> |
||||
<tr><td><%= t('members.attributes.category') %></td><td><%= @member.category %></td></tr> |
||||
<tr><td><%= t('members.attributes.identification_number') %></td><td><%= @member.identification_number %></td></tr> |
||||
<tr><td><%= t('members.attributes.address') %></td><td><%= simple_format @member.address %></td></tr> |
||||
<tr><td><%= t('members.attributes.joined_on') %></td><td><%= @member.joined_on %></td></tr> |
||||
<tr><td><%= t('members.attributes.expires_on') %></td><td><%= @member.expires_on %></td></tr> |
||||
<tr><td><%= t('members.attributes.status') %></td><td><%= @member.status %></td></tr> |
||||
</table> |
||||
|
||||
|
||||
<%= form_with model: @member, method: :delete do |form| %> |
||||
<div> |
||||
<%= form.submit t('members.delete.actions.submit') %> |
||||
</div> |
||||
|
||||
<div> |
||||
<%= link_to t('members.delete.actions.go_back'), members_path %> |
||||
</div> |
||||
<% end %> |
@ -0,0 +1,7 @@ |
||||
class AddExcludedToMembers < ActiveRecord::Migration[7.0] |
||||
def change |
||||
change_table :members do |t| |
||||
t.boolean :excluded, default: false |
||||
end |
||||
end |
||||
end |
@ -0,0 +1,6 @@ |
||||
class RemoveNullConstraintsFromMember < ActiveRecord::Migration[7.0] |
||||
def change |
||||
change_column_null :members, :email, true |
||||
change_column_null :members, :display_name, true |
||||
end |
||||
end |
Loading…
Reference in new issue