-
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.
* Replace hashtags, Remove menu "triplication" * Replace hashtags * show buttons for existing conferences * refactoring * add original to deface * cells override * use a query string * add tests * add controller spec * add spec checksums * change default links color * active links * styles
- Loading branch information
1 parent
2c25548
commit 0afc191
Showing
27 changed files
with
323 additions
and
326 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,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module Decidim | ||
module ConferenceCellExtensions | ||
extend ActiveSupport::Concern | ||
|
||
def conference_class(model) | ||
custom_conference_types = Rails.application.secrets.custom_conference_types || [] | ||
custom_conference_types.each do |item| | ||
return item[:key] if model.hashtag.include?(item[:hashtag]) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<div class="column" id="<%= dom_id(model) %>"> | ||
<div class="card <%= card_classes %> <%= conference_class(model) %>"> | ||
<%= render :label if has_label? %> | ||
<%= render :top if render_top? %> | ||
<%= render :image if has_image? %> | ||
<div class="card__content"> | ||
<%= render :header if has_header? %> | ||
|
||
<div class="card__text"> | ||
<div class="card__text--paragraph"> | ||
<%= render :badge if has_badge? %> | ||
<%= Decidim::ContentProcessor.render(description, "div") %> | ||
</div> | ||
</div> | ||
|
||
<%= render :tags %> | ||
</div> | ||
|
||
<%= render :data %> | ||
<%= render :footer %> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="card__footer card__footer--spaces"> | ||
<div class="card__support <%= conference_class(model) %>"> | ||
<%= link_to( | ||
t(model.cta_button_text_key, scope: "layouts.decidim.conferences.conference"), | ||
resource_path, | ||
class: "card__button button conference-button button--sc small" | ||
) %> | ||
</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
3 changes: 3 additions & 0 deletions
3
app/overrides/decidim/conferences/conferences/index/replace_content.html.erb.deface
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 @@ | ||
<!-- insert_after "erb[loud]:contains('decidim/conferences/order_by_conferences')" --> | ||
|
||
<%= render partial: "capitalitat/conferences_buttons" %> |
1 change: 1 addition & 0 deletions
1
app/overrides/layouts/decidim/_main_footer/replace_main_footer_logo.html.erb.deface
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
1 change: 1 addition & 0 deletions
1
app/overrides/layouts/decidim/_mini_footer/add_footer_nav.html.erb.deface
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@each $class, $color in $classes-colors { | ||
.button.#{$class} { | ||
@include button-styles($color); | ||
} | ||
|
||
.button.active-btn { | ||
opacity: 1; | ||
} | ||
|
||
.button.inactive-btn { | ||
opacity: 0.5; | ||
} | ||
|
||
.card.card--conference.#{$class} { | ||
@include card-styles($color); | ||
} | ||
|
||
.card__support.#{$class} { | ||
@include card-support-styles($color); | ||
|
||
.conference-button { | ||
@include link-styles($color); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.card__link { | ||
color: $capitalitat-violet; | ||
|
||
&:hover { | ||
color: #403e80; | ||
} | ||
|
||
&:focus { | ||
color: #403e80; | ||
} | ||
} |
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,16 @@ | ||
<div class="flex flex--sc mb-s"> | ||
<% custom_conference_types = Rails.application.secrets.custom_conference_types || [] %> | ||
<% current_type = params[:type] %> | ||
<% all_active = current_type.blank? %> | ||
<% custom_conference_types.each do |item| %> | ||
<% hashtag = item[:hashtag] %> | ||
<% if Decidim::Conference.exists?(Decidim::Conference.filtered_by_hashtag(hashtag)) %> | ||
<% is_active = all_active || current_type == item[:key] %> | ||
<%= link_to I18n.t(item[:key], scope: "decidim.conferences.custom_conference_types"), | ||
conferences_path(type: item[:key]), | ||
class: "button button--sc #{item[:key]} conference-button #{is_active ? 'active-btn' : 'inactive-btn'}" %> | ||
<% end %> | ||
<% 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
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
Oops, something went wrong.