-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(campus): rename view files and template references of city to cam…
…pus (#324) * fix(campus): rename view files and template references of city to campus * fix(campus): tests * feat(campus): further migrate cities to campuses * fix(campus): update campus route path * Fix the user show * Show and order cities dropdown by vanity_name * Form label * Update campus show * CityRowComponent -> CampusRowComponent --------- Co-authored-by: pil0u <8350914+pil0u@users.noreply.github.com>
- Loading branch information
Showing
19 changed files
with
98 additions
and
98 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,37 @@ | ||
<%# The scale-100 trick is to make the last td absolute, relative to the tr %> | ||
|
||
<tr class="scale-100 hover:bg-hover <%= "bg-aoc-green bg-opacity-20" if @campus[:id] == @user.city_id %>"> | ||
<td class="<%= class_names(rank_css(@campus[:rank])) %>"> | ||
<%= link_to campus_path(@campus[:slug]), class: "flex justify-center" do %> | ||
<%= (@campus[:rank] if @campus[:display_rank]) || " ".html_safe %> | ||
<% end %> | ||
</td> | ||
|
||
<td> | ||
<%= link_to campus_path(@campus[:slug]), class: "flex justify-center" do %> | ||
<%= @campus[:vanity_name] %> | ||
<% end %> | ||
</td> | ||
|
||
<td class="py-1 strong text-lg"> | ||
<%= link_to campus_path(@campus[:slug]), class: "flex justify-center" do %> | ||
<%= @campus[:score] %> | ||
<% end %> | ||
</td> | ||
|
||
<td> | ||
<%= link_to campus_path(@campus[:slug]), class: "flex justify-center" do %> | ||
<%= @campus[:total_members] %> | ||
<% end %> | ||
</td> | ||
|
||
<td title="# of members who solved daily part 1 # of members who solved daily part 2 # of top contributors of the campus"> | ||
<%= link_to campus_path(@campus[:slug]), class: "flex text-center" do %> | ||
<span class="basis-1/3 text-aoc-silver text-opacity-80"><%= @campus[:daily_contributors_part_1] %></span> | ||
<span class="basis-1/3 text-aoc-gold text-opacity-50"><%= @campus[:daily_contributors_part_2] %></span> | ||
<span class="basis-1/3">/<%= @campus[:top_contributors] %></span> | ||
<% end %> | ||
</td> | ||
|
||
<%= render Scores::RankEvolutionCellComponent.new(previous_rank: @campus[:previous_rank], current_rank: @campus[:rank]) %> | ||
</tr> |
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,14 @@ | ||
# frozen_string_literal: true | ||
|
||
module Scores | ||
class CampusRowComponent < ApplicationComponent | ||
include ScoresHelper | ||
|
||
with_collection_parameter :campus | ||
|
||
def initialize(campus:, user:) | ||
@campus = campus | ||
@user = user | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 +1,6 @@ | ||
<nav class="text-sm flex mb-8 mx-auto px-2 pb-2 gap-x-4 lg:gap-x-6 border-b border-aoc-gray-darker"> | ||
<%= render NavTabComponent.new(link: { name: "squads", path: scores_squads_path }) %> | ||
<%= render NavTabComponent.new(link: { name: "cities", path: scores_cities_path }) %> | ||
<%= render NavTabComponent.new(link: { name: "campuses", path: scores_campuses_path }) %> | ||
<%= render NavTabComponent.new(link: { name: "solo", path: scores_solo_path }) %> | ||
<%= render NavTabComponent.new(link: { name: "insanity", path: scores_insanity_path }) %> | ||
</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
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
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
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
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
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
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