Calendar is fullscreen
This commit is contained in:
17
app/views/teams/_form.html.erb
Normal file
17
app/views/teams/_form.html.erb
Normal file
@@ -0,0 +1,17 @@
|
||||
<%= form_with(model: team, class: "contents") do |form| %>
|
||||
<% if team.errors.any? %>
|
||||
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-lg mt-3">
|
||||
<h2><%= pluralize(team.errors.count, "error") %> prohibited this team from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% team.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="inline">
|
||||
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
|
||||
</div>
|
||||
<% end %>
|
||||
2
app/views/teams/_team.html.erb
Normal file
2
app/views/teams/_team.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<div id="<%= dom_id team %>">
|
||||
</div>
|
||||
2
app/views/teams/_team.json.jbuilder
Normal file
2
app/views/teams/_team.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
||||
json.extract! team, :id, :created_at, :updated_at
|
||||
json.url team_url(team, format: :json)
|
||||
8
app/views/teams/edit.html.erb
Normal file
8
app/views/teams/edit.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="mx-auto md:w-2/3 w-full">
|
||||
<h1 class="font-bold text-4xl">Editing team</h1>
|
||||
|
||||
<%= render "form", team: @team %>
|
||||
|
||||
<%= link_to "Show this team", @team, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
<%= link_to "Back to teams", teams_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
</div>
|
||||
21
app/views/teams/index.html.erb
Normal file
21
app/views/teams/index.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<div class="w-full">
|
||||
<% if notice.present? %>
|
||||
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title, "Teams" %>
|
||||
|
||||
<div class="flex justify-between items-center">
|
||||
<h1 class="font-bold text-4xl">Teams</h1>
|
||||
<%= link_to "New team", new_team_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %>
|
||||
</div>
|
||||
|
||||
<div id="teams" class="min-w-full">
|
||||
<% @teams.each do |team| %>
|
||||
<%= render team %>
|
||||
<p>
|
||||
<%= link_to "Show this team", team, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
1
app/views/teams/index.json.jbuilder
Normal file
1
app/views/teams/index.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.array! @teams, partial: "teams/team", as: :team
|
||||
7
app/views/teams/new.html.erb
Normal file
7
app/views/teams/new.html.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="mx-auto md:w-2/3 w-full">
|
||||
<h1 class="font-bold text-4xl">New team</h1>
|
||||
|
||||
<%= render "form", team: @team %>
|
||||
|
||||
<%= link_to "Back to teams", teams_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
</div>
|
||||
15
app/views/teams/show.html.erb
Normal file
15
app/views/teams/show.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="mx-auto md:w-2/3 w-full flex">
|
||||
<div class="mx-auto">
|
||||
<% if notice.present? %>
|
||||
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
|
||||
<% end %>
|
||||
|
||||
<%= render @team %>
|
||||
|
||||
<%= link_to "Edit this team", edit_team_path(@team), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
<%= link_to "Back to teams", teams_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
<div class="inline-block ml-2">
|
||||
<%= button_to "Destroy this team", @team, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
1
app/views/teams/show.json.jbuilder
Normal file
1
app/views/teams/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
||||
json.partial! "teams/team", team: @team
|
||||
Reference in New Issue
Block a user