Added translations to entire app
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<%= 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>
|
||||
<h2><%= t('teams.form.errors.header', count: team.errors.count) %></h2>
|
||||
<ul>
|
||||
<% team.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
@@ -11,11 +11,15 @@
|
||||
<% end %>
|
||||
|
||||
<div class="my-5">
|
||||
<%= form.label :name %>
|
||||
<%= form.label :name, t('teams.form.name') %>
|
||||
<%= form.text_field :name, class: "block shadow rounded-md border border-gray-400 outline-none px-3 py-2 mt-2 w-full" %>
|
||||
</div>
|
||||
|
||||
<div class="inline">
|
||||
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
|
||||
<% if team.new_record? %>
|
||||
<%= form.submit t('teams.form.create'), class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
|
||||
<% else %>
|
||||
<%= form.submit t('teams.form.update'), class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1,2 +1,12 @@
|
||||
<div id="<%= dom_id team %>">
|
||||
<div id="<%= dom_id team %>" class="bg-white rounded-xl shadow-md overflow-hidden mb-6 hover:shadow-lg transition-shadow duration-300">
|
||||
<div class="p-6 flex items-center justify-between">
|
||||
<div>
|
||||
<h2 class="text-2xl font-bold text-gray-800"><%= team.name %></h2>
|
||||
</div>
|
||||
<div class="flex-shrink-0 bg-blue-100 text-blue-800 rounded-full p-3">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="mx-auto md:w-2/3 w-full">
|
||||
<h1 class="font-bold text-4xl">Editing team</h1>
|
||||
<h1 class="font-bold text-4xl"><%= t('.title') %></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" %>
|
||||
<%= link_to t('.show'), @team, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
<%= link_to t('.back'), teams_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
</div>
|
||||
|
||||
@@ -1,21 +1,27 @@
|
||||
<div class="w-full">
|
||||
<div class="w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<% 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>
|
||||
<div class="mb-8 mt-4">
|
||||
<p class="py-3 px-4 bg-green-50 text-green-700 font-medium rounded-lg inline-block" id="notice"><%= notice %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% content_for :title, "Teams" %>
|
||||
<% content_for :title, t('.title') %>
|
||||
|
||||
<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 class="flex justify-between items-center mb-12">
|
||||
<h1 class="font-bold text-4xl text-gray-900"><%= t('.title') %></h1>
|
||||
<%= link_to new_team_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white font-medium hover:bg-blue-700 transition-colors duration-200 flex items-center" do %>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 mr-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" />
|
||||
</svg>
|
||||
<%= t('.new_team') %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="teams" class="min-w-full">
|
||||
<div id="teams" class="grid gap-6 mb-8">
|
||||
<% @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>
|
||||
<%= link_to team, class: "block transition-all duration-200 hover:shadow-lg hover:-translate-y-1" do %>
|
||||
<%= render team %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="mx-auto md:w-2/3 w-full">
|
||||
<h1 class="font-bold text-4xl">New team</h1>
|
||||
<h1 class="font-bold text-4xl"><%= t('.title') %></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" %>
|
||||
<%= link_to t('.back'), teams_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
</div>
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
|
||||
<%= 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" %>
|
||||
<%= link_to t('.edit'), edit_team_path(@team), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
|
||||
<%= link_to t('.back'), 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" %>
|
||||
<%= button_to t('.destroy'), @team, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user