-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
343 additions
and
275 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,21 @@ | ||
<div class="card__info"> | ||
<% if has_visible_area_scope?(model) %> | ||
<div class="card__info__item"> | ||
<%= translated_attribute(area_scope.name) %> | ||
</div> | ||
<% end %> | ||
|
||
<div class="card__info__item"> | ||
#<%= model.id %> | ||
</div> | ||
|
||
<div class="card__info__item"> | ||
<%= creation_date_status %> | ||
</div> | ||
|
||
<% if has_category? %> | ||
<div class="card__info__item"> | ||
<%= category %> | ||
</div> | ||
<% 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,29 @@ | ||
<%= card_wrapper do %> | ||
<div class="card__inner"> | ||
<div class="card__main"> | ||
<div class="card__content"> | ||
<h2 class="h4"><%= title %></h2> | ||
|
||
<%= render :tags %> | ||
|
||
<div class="card__text"> | ||
<div class="card__text--paragraph"> | ||
<%= description %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card__aside"> | ||
<%= render :image %> | ||
</div> | ||
</div> | ||
|
||
<div class="card__footer"> | ||
<div class="card__main"> | ||
<%= render :data %> | ||
</div> | ||
<div class="card__aside"> | ||
<%= render :status %> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div id="<%= dom_id(model) %>"> | ||
<%= render :inner %> | ||
</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,26 @@ | ||
# frozen_string_literal: true | ||
|
||
require "cell/partial" | ||
|
||
module Decidim | ||
module Ideas | ||
# This cell renders an idea with its L-size card. | ||
class IdeaLCell < Decidim::Ideas::IdeaMCell | ||
def card_classes | ||
classes = super | ||
classes = classes.split unless classes.is_a?(Array) | ||
(classes + ["card--full"]).join(" ") | ||
end | ||
|
||
private | ||
|
||
def resource_image_variant | ||
:thumbnail_box | ||
end | ||
|
||
def category_image_variant | ||
:card_box | ||
end | ||
end | ||
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 |
---|---|---|
@@ -1 +1 @@ | ||
<%= t(".ideas_count", count: @ideas.total_count) %> | ||
<p class="show-for-sr"><%= t(".ideas_count", count: @ideas.total_count) %></p> |
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,77 +1,50 @@ | ||
<% | ||
main_row_column_class = begin | ||
if display_answer_filter? && display_scope_filter? && display_category_filter? | ||
"columns mediumlarge-6 large-3" | ||
else | ||
"columns mediumlarge-6 large-4" | ||
end | ||
end | ||
%> | ||
|
||
<%= filter_form_for filter do |form| %> | ||
<div class="row columns"> | ||
<div class="filters__section filters__section--title"> | ||
<p class="h3"><%= t(".title") %></p> | ||
</div> | ||
</div> | ||
|
||
<% if current_user %> | ||
<div class="row"> | ||
<div class="columns mediumlarge-6 large-8"> | ||
<%= form.collection_radio_buttons :activity, activity_filter_values, :first, :last, legend_title: t(".activity"), data: { disable_dynamic_change: true } %> | ||
</div> | ||
</div> | ||
<% end %> | ||
<p class="show-for-sr"><%= t(".title") %></p> | ||
|
||
<div class="row"> | ||
<div class="<%= main_row_column_class %>"> | ||
<div class="filters__section text_filter"> | ||
<fieldset> | ||
<legend class="mini-title"><%= t(".search") %></legend> | ||
<%= form.search_field :search_text_cont, label: false, placeholder: t(".search"), title: t(".search"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %> | ||
</fieldset> | ||
</div> | ||
</div> | ||
<div class="row medium-unstack"> | ||
<% if display_answer_filter? %> | ||
<div class="<%= main_row_column_class %>"> | ||
<div class="filters__section with_any_state_filter"> | ||
<fieldset> | ||
<legend class="mini-title"><%= t(".state") %></legend> | ||
<%= form.select(:with_any_state, filter_ideas_state_values, { label: false, include_blank: t(".all_states") }, "aria-label": t(".state"), data: { disable_dynamic_change: true }) %> | ||
</fieldset> | ||
<div class="columns"> | ||
<div class="filters__control area_scope_id_filter"> | ||
<%= form.select(:with_any_state, filter_ideas_state_values, { label: t(".state"), include_blank: t(".all_states") }, "aria-label": t(".state"), data: { disable_dynamic_change: true }) %> | ||
</div> | ||
</div> | ||
<% end %> | ||
<% if display_scope_filter? %> | ||
<div class="<%= main_row_column_class %>"> | ||
<div class="filters__section area_scope_id_filter"> | ||
<fieldset> | ||
<legend class="mini-title"><%= t(".area_scope") %></legend> | ||
<%= area_scopes_picker_field(form, :with_any_area_scope, root: false, options: { label: false, include_blank: t(".all_area_scopes") }, html_options: { "aria-label": t(".area_scope"), data: { disable_dynamic_change: true } }) %> | ||
</fieldset> | ||
<div class="columns"> | ||
<div class="filters__control area_scope_id_filter"> | ||
<%= area_scopes_picker_field(form, :with_any_area_scope, root: false, options: { label: t(".area_scope"), include_blank: t(".all_area_scopes") }, html_options: { "aria-label": t(".area_scope"), data: { disable_dynamic_change: true } }) %> | ||
</div> | ||
</div> | ||
<% end %> | ||
<% if display_category_filter? %> | ||
<div class="<%= main_row_column_class %>"> | ||
<div class="filters__section with_category_filter"> | ||
<fieldset> | ||
<legend class="mini-title"><%= t(".category") %></legend> | ||
<%= form.select(:with_category, filter_ideas_categories_values, { label: false, include_blank: t(".all_categories") }, "aria-label": t(".category"), data: { disable_dynamic_change: true }) %> | ||
</fieldset> | ||
<div class="columns"> | ||
<div class="filters__control area_scope_id_filter"> | ||
<%= form.select(:with_category, filter_ideas_categories_values, { label: t(".category"), include_blank: t(".all_categories") }, "aria-label": t(".category"), data: { disable_dynamic_change: true }) %> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
<div class="columns"> | ||
<div class="filters__control area_scope_id_filter"> | ||
<%= form.search_field :search_text_cont, label: t(".keyword"), placeholder: t(".keyword"), title: t(".keyword"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<% if current_user %> | ||
<%= form.collection_radio_buttons :activity, activity_filter_values, :first, :last, legend_title: t(".activity"), data: { disable_dynamic_change: true } %> | ||
<% end %> | ||
|
||
|
||
<%= hidden_field_tag :order, order, id: nil, class: "order_filter" %> | ||
|
||
<div class="row columns"> | ||
<div class="filters__section"> | ||
<button type="submit" class="button primary" aria-label="<%= t(".search") %>" aria-controls="projects-count projects" data-close> | ||
<div class="filters__actions"> | ||
<button type="submit" class="button button--icon" aria-label="<%= t(".search") %>" aria-controls="projects-count projects" data-close> | ||
<%= t(".search") %> | ||
<%= icon("magnifying-glass", role: "img", "aria-hidden": true) %> | ||
</button> | ||
<button type="reset" class="button clear"><%= t ".reset" %></button> | ||
<button type="reset" class="button clear text-lg"><%= t ".reset" %></button> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
<%= card_for idea, from: idea %> | ||
<%# = card_for idea, from: idea %> | ||
<%= cell("decidim/ideas/idea_l", idea) %> |
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,48 +1,52 @@ | ||
<ul class="actionbox-links"> | ||
<% if show_actions %> | ||
<li> | ||
<%= cell("decidim/favorites/favorite_button", idea, button_class: "link action-link", disable_tooltip: true) %> | ||
</li> | ||
<li> | ||
<button type="button" class="link action-link" data-open="socialShare" aria-haspopup="true"> | ||
<%= icon "share", role: "img", "aria-hidden": true %> | ||
<span class="link-text"><%= t ".share" %></span> | ||
</button> | ||
</li> | ||
<li> | ||
<%= link_to "#comments", class: "action-link" do %> | ||
<%= icon "comment-square", role: "img", "aria-hidden": true %> | ||
<span class="link-text"><%= t ".show_comments" %></span> | ||
<% end %> | ||
</li> | ||
<% end %> | ||
<% if component_settings.geocoding_enabled? && idea.latitude.present? && idea.longitude.present? %> | ||
<li> | ||
<%= link_to idea_map_link(idea), class: "action-link", target: "_blank" do %> | ||
<%= icon "map-marker", role: "img", "aria-hidden": true %> | ||
<span class="link-text"><%= t ".show_on_map" %></span> | ||
<% end %> | ||
</li> | ||
<% end %> | ||
<% if false %> | ||
<li> | ||
<button type="button" class="link action-link"> | ||
<%= icon "print", role: "img", "aria-hidden": true %> | ||
<span class="link-text"><%= t ".print" %></span> | ||
</button> | ||
</li> | ||
<% end %> | ||
<% if show_actions %> | ||
<li> | ||
<button type="button" class="link action-link" data-open="<%= current_user.present? ? "flagModal" : "loginModal" %>" aria-controls="<%= current_user.present? ? "flagModal" : "loginModal" %>" aria-haspopup="true"> | ||
<%= icon "flag", role: "img", "aria-hidden": true %> | ||
<% if show_actions %> | ||
<div class="actions-panel bg-secondary"> | ||
<%= cell("decidim/favorites/favorite_button", idea, button_class: "link action-link", disable_tooltip: true) %> | ||
</div> | ||
<% end %> | ||
|
||
<% if component_settings.geocoding_enabled? && idea.latitude.present? && idea.longitude.present? %> | ||
<div class="actions-panel bg-secondary"> | ||
<%= link_to idea_map_link(idea), class: "action-link", target: "_blank", data: { external_link_spacer: "" } do %> | ||
<span class="link-text"><%= t ".show_on_map" %></span> | ||
<%= icon "map-marker", role: "img", "aria-hidden": true %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<% if show_actions %> | ||
<div class="actions-panel bg-secondary"> | ||
<%= link_to "#comments", class: "action-link" do %> | ||
<span class="link-text"><%= t ".show_comments" %></span> | ||
<%= icon "comment-square", role: "img", "aria-hidden": true %> | ||
<% end %> | ||
</div> | ||
|
||
<div class="actions-panel bg-secondary"> | ||
<button type="button" class="link action-link" data-open="<%= current_user.present? ? "flagModal" : "loginModal" %>" aria-controls="<%= current_user.present? ? "flagModal" : "loginModal" %>" aria-haspopup="dialog"> | ||
<span class="link-text"><%= t ".flag" %></span> | ||
<%= icon "flag", role: "img", "aria-hidden": true %> | ||
</button> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
|
||
<%= cell("decidim/flag_modal", idea) %> | ||
<% end %> | ||
|
||
<% if show_actions %> | ||
<div class="actions-panel bg-secondary"> | ||
<button type="button" class="link action-link" data-open="socialShare" aria-controls="socialShare" aria-haspopup="dialog"> | ||
<span class="link-text"><%= t ".share" %></span> | ||
<%= icon "share", role: "img", "aria-hidden": true %> | ||
</button> | ||
</div> | ||
|
||
<%= render partial: "share_modal" %> | ||
<%= cell("decidim/flag_modal", idea) %> | ||
<% end %> | ||
|
||
<% if false %> | ||
<div class="actions-panel bg-secondary"> | ||
<button type="button" class="link action-link"> | ||
<%= icon "print", role: "img", "aria-hidden": true %> | ||
<span class="link-text"><%= t ".print" %></span> | ||
</button> | ||
</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
Oops, something went wrong.