-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
23 changed files
with
230 additions
and
102 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
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
91 changes: 71 additions & 20 deletions
91
app/views/admin/digital_products/_step_indicator.html.erb
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,21 +1,72 @@ | ||
<div class="usa-step-indicator" aria-label="progress"> | ||
<ol class="usa-step-indicator__segments"> | ||
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete <%= "usa-step-indicator__segment--current" if collection.draft? %>""> | ||
<span class="usa-step-indicator__segment-label"> | ||
Drafted | ||
<% if collection.draft? %> | ||
<span class="usa-sr-only">completed</span> | ||
<% end %> | ||
</span> | ||
</li> | ||
<li class="usa-step-indicator__segment <%= "usa-step-indicator__segment--complete" if collection.published? %> <%= "usa-step-indicator__segment--current" if collection.submitted? %>"> | ||
<span class="usa-step-indicator__segment-label"> | ||
Submitted | ||
<span class="usa-sr-only">completed</span> | ||
</span> | ||
</li> | ||
<li class="usa-step-indicator__segment <%= "usa-step-indicator__segment--complete" if collection.published? %> <%= "usa-step-indicator__segment--current" if collection.published? %>" aria-current="true"> | ||
<span class="usa-step-indicator__segment-label">Published</span> | ||
</li> | ||
</ol> | ||
<div class="border border-base-lighter padding-2 padding-bottom-0 margin-bottom-2"> | ||
|
||
<div class="font-sans-sm margin-bottom-1"> | ||
Publication status: | ||
<%= product.aasm_state %> | ||
<a | ||
href="#website-status-modal" | ||
aria-controls="website-status-modal" | ||
data-open-modal><i class="fa fa-info-circle"></i></a> | ||
</div> | ||
<div | ||
class="usa-modal usa-modal--lg" | ||
id="website-status-modal" | ||
aria-labelledby="modal-2-heading" | ||
aria-describedby="modal-2-description"> | ||
<div class="usa-modal__content"> | ||
<div class="usa-modal__main"> | ||
<h2 class="usa-modal__heading" id="modal-2-heading"> | ||
The publishing status of a digital product | ||
</h2> | ||
<div class="usa-prose"> | ||
<p> | ||
Each digital product is a digital asset and has a publishing flow. | ||
The "aasm_state" states a digital product may have are below. | ||
</p> | ||
<br> | ||
<ul class="usa-list usa-list--unstyled"> | ||
<% { "created" => "Created", "updated" => "Updated", "submitted" => "Submitted", "published" => "Published", "archived" => "Archived" }.each_pair do |key, value| %> | ||
<li> | ||
<span class="usa-tag bg-primary-light <%= "bg-primary" if product.aasm_state == key %>"><%= value %></span> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
<button | ||
class="usa-button usa-modal__close" | ||
aria-label="Close this window" | ||
data-close-modal> | ||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img"> | ||
<use xlink:href="<%= asset_path "sprite.svg#close" %>"></use> | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div class="usa-step-indicator" aria-label="progress"> | ||
<ol class="usa-step-indicator__segments"> | ||
<li class="usa-step-indicator__segment | ||
<%= "usa-step-indicator__segment--complete" if product.submitted? || product.published? || product.archived? || product.updated? %> | ||
<%= "usa-step-indicator__segment--current" if product.created? %>" | ||
aria-current="true"> | ||
<span class="usa-step-indicator__segment-label">Created</span> | ||
</li> | ||
<li class="usa-step-indicator__segment | ||
<%= "usa-step-indicator__segment--complete" if product.published? || product.archived? %> | ||
<%= "usa-step-indicator__segment--current" if product.submitted? %>" aria-current="true"> | ||
<span class="usa-step-indicator__segment-label">Submitted</span> | ||
</li> | ||
<li class="usa-step-indicator__segment | ||
<%= "usa-step-indicator__segment--complete" if product.published? || product.archived? %> | ||
<%= "usa-step-indicator__segment--current" if product.published? %>" aria-current="true"> | ||
<span class="usa-step-indicator__segment-label">Published</span> | ||
</li> | ||
<li class="usa-step-indicator__segment | ||
<%= "usa-step-indicator__segment--complete" if product.archived? %> | ||
<%= "usa-step-indicator__segment--current" if product.archived? %>" aria-current="true"> | ||
<span class="usa-step-indicator__segment-label">Archived</span> | ||
</li> | ||
</ol> | ||
</div> | ||
</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
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
72 changes: 72 additions & 0 deletions
72
app/views/admin/digital_service_accounts/_step_indicator.html.erb
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,72 @@ | ||
<div class="border border-base-lighter padding-2 padding-bottom-0 margin-bottom-2"> | ||
|
||
<div class="font-sans-sm margin-bottom-1"> | ||
Publication status: | ||
<%= account.aasm_state %> | ||
<a | ||
href="#website-status-modal" | ||
aria-controls="website-status-modal" | ||
data-open-modal><i class="fa fa-info-circle"></i></a> | ||
</div> | ||
<div | ||
class="usa-modal usa-modal--lg" | ||
id="website-status-modal" | ||
aria-labelledby="modal-2-heading" | ||
aria-describedby="modal-2-description"> | ||
<div class="usa-modal__content"> | ||
<div class="usa-modal__main"> | ||
<h2 class="usa-modal__heading" id="modal-2-heading"> | ||
The publishing status of a digital service account | ||
</h2> | ||
<div class="usa-prose"> | ||
<p> | ||
Each digital service account is a digital asset and has a publishing flow. | ||
The "aasm_state" states a digital service account may have are below. | ||
</p> | ||
<br> | ||
<ul class="usa-list usa-list--unstyled"> | ||
<% { "created" => "Created", "updated" => "Updated", "submitted" => "Submitted", "published" => "Published", "archived" => "Archived" }.each_pair do |key, value| %> | ||
<li> | ||
<span class="usa-tag bg-primary-light <%= "bg-primary" if account.aasm_state == key %>"><%= value %></span> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
<button | ||
class="usa-button usa-modal__close" | ||
aria-label="Close this window" | ||
data-close-modal> | ||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img"> | ||
<use xlink:href="<%= asset_path "sprite.svg#close" %>"></use> | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div class="usa-step-indicator" aria-label="progress"> | ||
<ol class="usa-step-indicator__segments"> | ||
<li class="usa-step-indicator__segment | ||
<%= "usa-step-indicator__segment--complete" if account.submitted? || account.published? || account.archived? || account.updated? %> | ||
<%= "usa-step-indicator__segment--current" if account.created? %>" | ||
aria-current="true"> | ||
<span class="usa-step-indicator__segment-label">Created</span> | ||
</li> | ||
<li class="usa-step-indicator__segment | ||
<%= "usa-step-indicator__segment--complete" if account.published? || account.archived? %> | ||
<%= "usa-step-indicator__segment--current" if account.submitted? %>" aria-current="true"> | ||
<span class="usa-step-indicator__segment-label">Submitted</span> | ||
</li> | ||
<li class="usa-step-indicator__segment | ||
<%= "usa-step-indicator__segment--complete" if account.published? || account.archived? %> | ||
<%= "usa-step-indicator__segment--current" if account.published? %>" aria-current="true"> | ||
<span class="usa-step-indicator__segment-label">Published</span> | ||
</li> | ||
<li class="usa-step-indicator__segment | ||
<%= "usa-step-indicator__segment--complete" if account.archived? %> | ||
<%= "usa-step-indicator__segment--current" if account.archived? %>" aria-current="true"> | ||
<span class="usa-step-indicator__segment-label">Archived</span> | ||
</li> | ||
</ol> | ||
</div> | ||
</div> |
Oops, something went wrong.