-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: 1091 present fostered start and end date on fostered pets index page #1217
Open
odellmac4
wants to merge
3
commits into
rubyforgood:main
Choose a base branch
from
odellmac4:1091_foster_from_and_to_date
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<div data-controller="card"> | ||
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-4 mb-5"> | ||
<% @fostered_pets.each_with_index do |fostered_pet, index| %> | ||
<div class="col"> | ||
<div class="col-lg-5 col-md-6"> | ||
<%= link_to adopter_fosterer_fostered_pet_files_path(fostered_pet.pet, pet_id: fostered_pet.pet.id), data: { turbo_frame: "pet_files", action: "click->card#selectCard" } do %> | ||
<div class="card h-100 bg-white border-0 shadow-sm" data-card-target="card"> | ||
<div class="card-body d-flex align-items-center"> | ||
|
@@ -13,7 +13,13 @@ | |
class: 'rounded-circle', | ||
style: "width: 100%; height: 100%; object-fit: cover;") %> | ||
</div> | ||
<h5 class="card-title mb-0"><%= fostered_pet.pet.name %></h5> | ||
<h5 class="card-title mb-0 flex-grow-1" style="margin-right: 15px;"><%= fostered_pet.pet.name %></h5> | ||
<div class="fostered-dates ms-auto"> | ||
<div class="d-flex flex-column"> | ||
<h5 class="card-title mb-1">Term:</h5> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually prefer what you showed where you had Start date: and End date: as I think it looked better and was more descriptive! |
||
<h5 class="mb-0"><%= fostered_pet.start_date.strftime("%m/%d/%y") %> - <%=fostered_pet.end_date.strftime("%m/%d/%y")%> </h5> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you just use flex on this you should be able to use flex classes like
justify-content-around
to space these main elements evenly in the parent div https://getbootstrap.com/docs/4.0/utilities/flex/#justify-contentYou should not need to use inline style here like
style="margin-right: 15px;"
as Bootstrap has classes for this.It's a smell if you need to use margin right on the left hand element, AND ms-auto on the right hand element. If we're using flex, there are classes built for this.