-
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.
Linked resources, statuses, text changes and a11y fixes
- Add the linked resources to the projects - Add the project status after the voting - Fix a11y issues with the filters - Update the texts
- Loading branch information
Showing
8 changed files
with
40 additions
and
11 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,7 @@ | ||
<% callout_class = project.selected? ? "success" : "alert" %> | ||
|
||
<div class="callout <%= callout_class %> margin-bottom-2"> | ||
<div class="callout__title"> | ||
<p class="h6"><%= project.selected? ? t(".selected") : t(".not_selected") %></p> | ||
</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
12 changes: 12 additions & 0 deletions
12
app/views/decidim/budgets/votes/_project_linked_resources.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,12 @@ | ||
<% linked_resources = resource.linked_resources(type, link_name).group_by { |linked_resource| linked_resource.class.name } %> | ||
|
||
<% linked_resources.each do |klass, resources| %> | ||
<div class="margin-top-2"> | ||
<% resource_manifest = klass.constantize.resource_manifest %> | ||
<% i18n_name = "#{resource.class.name.demodulize.underscore}_#{resource_manifest.name}" %> | ||
<p class="h5"><%= t(i18n_name, scope: "decidim.resource_links.#{link_name}") %></p> | ||
<% resources.each do |resource| %> | ||
<p>#<%= resource.id %> <%== decidim_html_escape(present(resource).title) %></p> | ||
<% end %> | ||
</div> | ||
<% 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
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