-
-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign: replace cells with redesigned versions if present and updat…
…e references (#11123) * Replace cells with redesigned versions if present and update references * Adapt test * Remove unused translations * Remove REDESIGN_PENDING comment * Update decidim-core/app/cells/decidim/author/flag_user.erb Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> * Update decidim-core/app/cells/decidim/card_cell.rb Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> * Update decidim-core/app/cells/decidim/endorsement_buttons_cell.rb Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro> * Improve official author presenter identification in card cell * Disable endorse button if endorsements blocked even when user is not logged in * Adapt test * Enable redesign in admin tests * Adapt admin pasword tests to redesign * Update accept_confirm calls with admin --------- Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
- Loading branch information
1 parent
227e4d5
commit f78a24b
Showing
117 changed files
with
469 additions
and
1,482 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,6 +1,4 @@ | ||
<% if commentable? %> | ||
<%= link_to "#{resource_locator(from_context).path}#comments", title: t("decidim.author.comments", count: from_context.comments_count) do %> | ||
<%= icon "comment-square", class: "icon--small", role: "img", "aria-hidden": true %> | ||
<%= from_context.comments_count %> <%= t("decidim.author.comments", count: from_context.comments_count) %> | ||
<% end %> | ||
<%= link_to "#{resource_locator(from_context).path}#comments", title: t("decidim.author.comments", count: from_context.comments_count), class: "author__metadata" do %> | ||
<%= icon "chat-1-line" if show_icons? %> | ||
<%= from_context.comments_count %> <%= t("decidim.author.comments", count: from_context.comments_count) %> | ||
<% 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,5 +1,4 @@ | ||
<% if creation_date? %> | ||
<span> | ||
<%= creation_date %> | ||
</span> | ||
<% end %> | ||
<span class="author__metadata"> | ||
<%= icon "calendar-line" if show_icons? %> | ||
<%= creation_date %> | ||
</span> |
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,6 +1,4 @@ | ||
<% if endorsable? %> | ||
<%= link_to "#{resource_locator(from_context).path}#list-of-endorsements", title: t("decidim.author.endorsements",count: from_context.endorsements_count) do %> | ||
<%= icon "bullhorn", class: "icon--small", role: "img", "aria-hidden": true %> | ||
<%= from_context.endorsements_count %> <%= t("decidim.author.endorsements", count: from_context.endorsements_count) %> | ||
<% end %> | ||
<%= link_to "#{resource_locator(from_context).path}#list-of-endorsements", title: t("decidim.author.endorsements", count: from_context.endorsements_count), class: "author__metadata" do %> | ||
<%= icon "heart-add-line" if show_icons? %> | ||
<%= from_context.endorsements_count %> <%= t("decidim.author.endorsements", count: from_context.endorsements_count) %> | ||
<% 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,8 +1,6 @@ | ||
<% if flaggable? %> | ||
<button type="button" class="link-alt" data-open="<%= current_user.present? ? "flagModal" : "loginModal" %>" title="<%= t("report", scope: "decidim.proposals.proposals.show") %>" aria-controls="<%= current_user.present? ? "flagModal" : "loginModal" %>" aria-haspopup="true" tabindex="0"> | ||
<%= icon "flag", aria_hidden: true, class: "icon--small", role: "img", "aria-hidden": true %> | ||
<span class="show-for-sr"> | ||
<%= t("report", scope: "decidim.proposals.proposals.show") %> | ||
</span> | ||
</button> | ||
<% end %> | ||
<button type="button" class="link-alt" data-open="<%= current_user.present? ? "flagModal" : "loginModal" %>" title="<%= t("report", scope: "decidim.proposals.proposals.show") %>" aria-controls="<%= current_user.present? ? "flagModal" : "loginModal" %>" aria-haspopup="true" tabindex="0"> | ||
<%= icon "flag", aria_hidden: true, class: "icon--small", role: "img", "aria-hidden": true %> | ||
<span class="show-for-sr"> | ||
<%= t("report", scope: "decidim.proposals.proposals.show") %> | ||
</span> | ||
</button> |
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,10 +1,14 @@ | ||
<% if user_flaggable? && model.try(:id) != current_user.try(:id) %> | ||
<button type="button" class="link-alt" data-open="<%= current_user.present? ? "flagUserModal" : "loginModal" %>" title="<%= t("report", scope: "decidim.proposals.proposals.show") %>" aria-controls="<%= current_user.present? ? "flagUserModal" : "loginModal" %>" aria-haspopup="dialog" tabindex="0"> | ||
<%= icon "flag", aria_hidden: true, class: "icon--small", role: "img", "aria-hidden": true %> | ||
<span class="show-for-sr"> | ||
<%= t("report", scope: "decidim.proposals.proposals.show") %> | ||
</span> | ||
</button> | ||
<%= cell( | ||
"decidim/button", | ||
{ icon: "flag-line", text: t("decidim.shared.flag_modal.report") }, | ||
button_classes: "button button__sm button__text-secondary only:m-auto", | ||
html_options: { | ||
"data-open" => current_user.present? ? "flagUserModal" : "loginModal", | ||
"aria-controls" => current_user.present? ? "flagUserModal" : "loginModal", | ||
"aria-haspopup" => "dialog" | ||
} | ||
) %> | ||
<%= cell("decidim/flag_modal", model).flag_user %> | ||
<% end %> |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
43 changes: 24 additions & 19 deletions
43
decidim-core/app/cells/decidim/author/profile_minicard.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,25 +1,30 @@ | ||
<div class="p-xs flex--sbc"> | ||
<div class="mr-s"> | ||
<div class="card__header collapse"> | ||
<%= cell("decidim/user_profile", raw_model).user_data %> | ||
</div> | ||
<div class="card__text card--picture-offset"> | ||
<%= text_link_to_current_or_new_conversation_with(model) %> | ||
</div> | ||
</div> | ||
<div class="ml-s"> | ||
<%= cell "decidim/follow_button", raw_model %> | ||
<div class="author__tooltip bottom" role="tooltip"> | ||
<div class="author__container"> | ||
<%= render :avatar %> | ||
|
||
<div> | ||
<%= link_to decidim.profile_followers_path(raw_model.nickname), class: "card__link" do %> | ||
<strong><%= model.followers_count %></strong> <%= t("decidim.profiles.show.followers") %> | ||
<% end %> | ||
<%= render :name %> | ||
<span class="text-md"><%= model.nickname %></span> | ||
</div> | ||
</div> | ||
|
||
<div class="author__tooltip-links"> | ||
<%= link_to decidim.profile_followers_path(raw_model.nickname) do %> | ||
<%= content_tag(:span, model.followers_count, id: dom_id(raw_model, :followers_count)) %> <%= t("decidim.profiles.show.followers") %> | ||
<% end %> | ||
<% if model.can_follow? %> | ||
<div> | ||
<%= link_to decidim.profile_following_path(raw_model.nickname), class: "card__link" do %> | ||
<strong><%= model.following_count %></strong> <%= t("decidim.profiles.show.following") %> | ||
<% end %> | ||
</div> | ||
<%= link_to decidim.profile_following_path(raw_model.nickname) do %> | ||
<%= model.following_count %> <%= t("decidim.profiles.show.following") %> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
|
||
<% if model.direct_messages_enabled?(context) %> | ||
<%= link_to current_or_new_conversation_path_with(model), class: "button button__sm button__transparent" do %> | ||
<span><%= t("decidim.profiles.show.send_private_message") %></span> | ||
<%= icon "mail-send-line" %> | ||
<% end %> | ||
<% end %> | ||
<%= follow_button_for(raw_model, false, button_classes: "button button__sm button__transparent") %> | ||
</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 |
---|---|---|
@@ -1,19 +1,27 @@ | ||
<div class="<%= author_classes %>"> | ||
<div class="author-data__main"> | ||
<%= render :profile %> | ||
</div> | ||
<% data = has_tooltip? ? { tooltip: render(:profile_minicard).html_safe } : nil %> | ||
<div class="author" data-author> | ||
<%= content_tag :div, class: "author__container#{" is-compact" if layout == :compact}", data: do %> | ||
<% if layout == :compact %> | ||
<%= render :avatar %> | ||
|
||
<% if actionable? %> | ||
<div class="author-data__extra"> | ||
<%= render :date %> | ||
<div> | ||
<%= render :name %> | ||
<%= render :comments %> | ||
<%= render :endorsements %> | ||
<%= render :flag %> | ||
<% context_actions.each do |action| %> | ||
<%= render action %> | ||
<% end %> | ||
</div> | ||
<% elsif layout == :avatar %> | ||
<%= render :avatar %> | ||
<% else %> | ||
<%= render :avatar %> | ||
<%= render :name %> | ||
<% end %> | ||
<% end %> | ||
<%= render :withdraw %> | ||
</div> | ||
<% if layout == :default %> | ||
<% context_actions.each do |action| %> | ||
<%= render action %> | ||
<% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
<% if withdrawable? %> | ||
<%= action_authorized_link_to :withdraw, withdraw_path, method: :put, class: "title-action__action button small hollow", title: t("withdraw_btn_hint", scope: resource_i18n_scope ), data: { confirm: t("withdraw_confirmation_html", scope: resource_i18n_scope ) } do %> | ||
<%= t("withdraw_#{resource_name}", scope: resource_i18n_scope) %> | ||
<%= icon "x", role: "img", "aria-hidden": true %> | ||
<% end %> | ||
<%= action_authorized_link_to :withdraw, withdraw_path, method: :put, class: "title-action__action button small hollow", title: t("withdraw_btn_hint", scope: resource_i18n_scope ), data: { confirm: t("withdraw_confirmation_html", scope: resource_i18n_scope ) } do %> | ||
<%= t("withdraw_#{resource_name}", scope: resource_i18n_scope) %> | ||
<%= icon "x", role: "img", "aria-hidden": true %> | ||
<% end %> |
Oops, something went wrong.