-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notices for discarding and undiscarding scenarios
- Loading branch information
Showing
15 changed files
with
116 additions
and
21 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="rounded-md border flex border-grey-200 p-2 px-5 mt-5 text-sm text-midnight-800"> | ||
<span class="mr-5"><%= heroicon @icon, options: { class: 'w-5 h-5' } %></span> | ||
<span class="mr-2"><%= @text %></span> | ||
<% if @path %> | ||
<span class="underline hover:text-midnight-980"><%= link_to @button_text, @path, method: :put, data: { 'turbo-method': :put }%></span> | ||
<% end %> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module NoticeBanner | ||
class Component < ApplicationComponent | ||
option :text | ||
option :path, default: proc { "" } | ||
option :button_text, default: proc { "" } | ||
option :icon, default: proc { 'information-circle' } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module NoticeBanner | ||
class TrashComponent < Component | ||
option :icon, default: proc { "trash" } | ||
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
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,12 @@ | ||
# Index of all discarded scenarios and collections | ||
class DiscardedController < ApplicationController | ||
before_action :require_user | ||
|
||
def index | ||
@resources = current_user | ||
.saved_scenarios | ||
.discarded | ||
.includes(:featured_scenario, :users) | ||
.order('updated_at DESC') | ||
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,12 @@ | ||
- content_for :title, t('trash.title') | ||
- content_for :menu_title, t('trash.title') | ||
- content_for :block_right, "FILTERS" | ||
|
||
- if @resources.present? | ||
- @resources.each do |resource| | ||
- if resource.is_a?(SavedScenario) | ||
= render(SavedScenarios::Row::Component.new(path: saved_scenario_path(resource), saved_scenario: resource)) | ||
- else | ||
.text-sm.text-midnight-400.mb-2=t('trash.empty.title') | ||
|
||
=t('trash.empty.description', deleted_after: SavedScenario::AUTO_DELETES_AFTER.in_days.to_i) |
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