-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding some view and some something ;)
- Loading branch information
Showing
16 changed files
with
643 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
class MembersController < ApplicationController | ||
def update | ||
@member = Member.find(params[:id]) | ||
|
||
if @member.update(member_params) | ||
respond_to do |format| | ||
format.turbo_stream | ||
end | ||
else | ||
render :new, status: :unprocessable_entity | ||
end | ||
end | ||
|
||
def member_params | ||
params.require(:member) | ||
.permit( | ||
:first_name, | ||
:last_name, | ||
:born_at, | ||
:born_in, | ||
:tax_code, | ||
:citizenship, | ||
:address, | ||
:postal_code, | ||
:municipality, | ||
:province, | ||
:telephone, | ||
) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<nav class="navbar navbar-expand-lg bg-body-tertiary"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand" href="#">Open GAS</a> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="nav col-12 col-lg-auto my-2 justify-content-center my-md-0 text-small"> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link text-secondary"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Giocatori | ||
</a> | ||
</li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Staff | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li><a class="dropdown-item" href="#">Action</a></li> | ||
<li><a class="dropdown-item" href="#">Another action</a></li> | ||
<li><hr class="dropdown-divider"></li> | ||
<li><a class="dropdown-item" href="#">Something else here</a></li> | ||
</ul> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link text-secondary"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Società | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link text-secondary"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Certificati | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link text-secondary"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Tessere | ||
</a> | ||
</li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Pagamenti | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li><a class="dropdown-item" href="#">Action</a></li> | ||
<li><a class="dropdown-item" href="#">Another action</a></li> | ||
<li><hr class="dropdown-divider"></li> | ||
<li><a class="dropdown-item" href="#">Something else here</a></li> | ||
</ul> | ||
</li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Campionati | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li><a class="dropdown-item" href="#">Action</a></li> | ||
<li><a class="dropdown-item" href="#">Another action</a></li> | ||
<li><hr class="dropdown-divider"></li> | ||
<li><a class="dropdown-item" href="#">Something else here</a></li> | ||
</ul> | ||
</li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Tornei | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li><a class="dropdown-item" href="#">Action</a></li> | ||
<li><a class="dropdown-item" href="#">Another action</a></li> | ||
<li><hr class="dropdown-divider"></li> | ||
<li><a class="dropdown-item" href="#">Something else here</a></li> | ||
</ul> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link text-secondary"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Programmazione | ||
</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a href="#" class="nav-link text-secondary"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
</a> | ||
</li> | ||
<li class="nav-item dropdown"> | ||
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
<%= image_tag "add.svg", aria: { hidden: true }, size: 24, class: "bi d-block mx-auto mb-1" %> | ||
Report | ||
</a> | ||
<ul class="dropdown-menu"> | ||
<li><a class="dropdown-item" href="#">Action</a></li> | ||
<li><a class="dropdown-item" href="#">Another action</a></li> | ||
<li><hr class="dropdown-divider"></li> | ||
<li><a class="dropdown-item" href="#">Something else here</a></li> | ||
</ul> | ||
</li> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<%= simple_form_for member, html: { class: 'row' } do |f| %> | ||
<%= f.input :first_name, wrapper_html: { class: 'col-6' } %> | ||
<%= f.input :last_name, wrapper_html: { class: 'col-6' } %> | ||
<%= f.input :born_at %> | ||
<%= f.input :born_in %> | ||
<%= f.input :tax_code %> | ||
<%= f.input :citizenship, wrapper_html: { class: 'col-6' } %> | ||
<%= f.input :address, wrapper_html: { class: 'col-6' } %> | ||
<%= f.input :postal_code, wrapper_html: { class: 'col-2' } %> | ||
<%= f.input :municipality, wrapper_html: { class: 'col-8' } %> | ||
<%= f.input :province, wrapper_html: { class: 'col-2' } %> | ||
<%= f.input :telephone, wrapper_html: { class: 'col-6' } %> | ||
<%= f.input :email, wrapper_html: { class: 'col-6' } %> | ||
<%= f.submit 'Save', class: 'd-none' %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
<ul class="nav nav-tabs" id="myTab" role="tablist"> | ||
<% @members.each do |member| %> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link" id="<%= member.name.parameterize %>-tab" data-bs-toggle="tab" data-bs-target="#<%= member.name.parameterize %>" type="button" role="tab" aria-controls="<%= member.name %>" aria-selected="true"> | ||
<span class="dot-<%= member.status %>"></span> | ||
<%= member.name %> | ||
</button> | ||
</li> | ||
<% end %> | ||
</ul> | ||
<div class="tab-content" id="myTabContent"> | ||
<% @members.each do |member| %> | ||
<div class="tab-pane fade show" id="<%= member.name.parameterize %>" role="tabpanel" aria-labelledby="<%= member.name.parameterize %>-tab"> | ||
<%= member.name %> | ||
</div> | ||
<% end %> | ||
<div> | ||
<ul class="nav nav-tabs" id="myTab" role="tablist"> | ||
<% @members.each do |member| %> | ||
<li class="nav-item" role="presentation"> | ||
<button class="nav-link" id="<%= member.first_name.parameterize %>-tab" data-bs-toggle="tab" data-bs-target="#<%= member.first_name.parameterize %>" type="button" role="tab" aria-controls="<%= member.first_name %>" aria-selected="true"> | ||
<span class="dot-<%= member.status %>"></span> | ||
<%= member.first_name %> | ||
</button> | ||
</li> | ||
<% end %> | ||
</ul> | ||
<div class="tab-content" id="myTabContent"> | ||
<% @members.each do |member| %> | ||
<div class="tab-pane fade show" id="<%= member.first_name.parameterize %>" role="tabpanel" aria-labelledby="<%= member.first_name.parameterize %>-tab"> | ||
<%= render partial: 'member', locals: { member: } %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.