Skip to content

Commit

Permalink
update icons
Browse files Browse the repository at this point in the history
  • Loading branch information
ElviaBth committed Aug 27, 2024
1 parent d04bfaa commit 00d259d
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def snippets
@snippets ||= Decidim::Snippets.new

unless @snippets.any?(:oauth2_civicrm)
@snippets.add(:oauth2_civicrm, ActionController::Base.helpers.javascript_pack_tag("decidim_civicrm"))
# @snippets.add(:oauth2_civicrm, ActionController::Base.helpers.javascript_pack_tag("decidim_civicrm"))
@snippets.add(:oauth2_civicrm, ActionController::Base.helpers.stylesheet_pack_tag("decidim_civicrm"))
@snippets.add(:head, @snippets.for(:oauth2_civicrm))
end
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/decidim/civicrm/admin/civicrm_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def last_sync_class(datetime)

def check_icon(valid, label: false, icon: true)
if valid
pic = icon "check", class: "action-icon text-success"
pic = icon "check-line", class: "action-icon text-success"
txt = "<span class='label success'>#{t("enabled", scope: "decidim.civicrm.admin")}</span>"
else
pic = icon "x", class: "action-icon text-muted"
pic = icon "close-line", class: "action-icon text-muted"
txt = "<span class='label alert'>#{t("disabled", scope: "decidim.civicrm.admin")}</span>"
end

Expand Down
6 changes: 3 additions & 3 deletions app/views/decidim/civicrm/admin/groups/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
<td class="<%= last_sync_class(group.last_sync) %>"><%= l(group.last_sync, format: :decidim_short) if group.last_sync %></td>
<td class="table-list__actions">
<% if group.auto_sync_members? %>
<%= icon_link_to "check", decidim_civicrm_admin.toggle_auto_sync_groups_path(id: group.id), t(".auto_sync.disable"), class: "action-icon action-icon--success", method: :put %>
<%= icon_link_to "check-line", decidim_civicrm_admin.toggle_auto_sync_groups_path(id: group.id), t(".auto_sync.disable"), class: "action-icon action-icon--success", method: :put %>
<% else %>
<%= icon_link_to "check", decidim_civicrm_admin.toggle_auto_sync_groups_path(id: group.id), t(".auto_sync.enable"), class: "action-icon action-icon--remove", method: :put %>
<%= icon_link_to "check-line", decidim_civicrm_admin.toggle_auto_sync_groups_path(id: group.id), t(".auto_sync.enable"), class: "action-icon action-icon--remove", method: :put %>
<% end %>
<%= icon_link_to "reload", decidim_civicrm_admin.sync_groups_path(id: group.id), t(".sync"), class: "action-icon--reload" %>
<%= icon_link_to "people", decidim_civicrm_admin.group_path(group), t(".members"), class: "action-icon" %>
<%= icon_link_to "group-line", decidim_civicrm_admin.group_path(group), t(".members"), class: "action-icon" %>
</td>
</tr>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/decidim/civicrm/admin/info/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ oauth_enabled = Decidim::Civicrm.omniauth.dig(:enabled)
<td><%= if Decidim::Civicrm.authorizations.respond_to?(:map)
Decidim::Civicrm.authorizations.map do |auth|
Decidim::Authorization.where(user: current_organization.users, name: auth).count.to_s + " " + Decidim::Verifications.find_workflow_manifest(auth).description + " " +
icon_link_to("key" , decidim_civicrm_admin.info_index_path(authorization: auth), t(".regenerate_authorizations"), method: :post)
icon_link_to("key-2-line" , decidim_civicrm_admin.info_index_path(authorization: auth), t(".regenerate_authorizations"), method: :post)
end.join("<br>").html_safe
else
check_icon false, label: true, icon: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@
<td><%= event_meeting.civicrm_registrations_count %></td>
<td class="<%= last_sync_class(event_meeting.last_sync) %>"><%= l(event_meeting.last_sync, format: :decidim_short) if event_meeting.last_sync %></td>
<td><% if event_meeting.redirect_active? %>
<%= icon "check", class: "action-icon text-success" %>
<%= icon "check-line", class: "action-icon text-success" %>
<% else %>
<%= icon "x", class: "action-icon text-muted" %>
<%= icon "close-line", class: "action-icon text-muted" %>
<% end %></td>
<td class="table-list__actions">
<% if event_meeting.redirect_url.present? %>
<% if event_meeting.redirect_active? %>
<%= icon_link_to "check", decidim_civicrm_admin.toggle_active_meeting_registrations_path(id: event_meeting.id), t(".redirect_active.disable"), class: "action-icon action-icon--success", method: :put %>
<%= icon_link_to "check-line", decidim_civicrm_admin.toggle_active_meeting_registrations_path(id: event_meeting.id), t(".redirect_active.disable"), class: "action-icon action-icon--success", method: :put %>
<% else %>
<%= icon_link_to "check", decidim_civicrm_admin.toggle_active_meeting_registrations_path(id: event_meeting.id), t(".redirect_active.enable"), class: "action-icon action-icon--remove", method: :put %>
<%= icon_link_to "check-line", decidim_civicrm_admin.toggle_active_meeting_registrations_path(id: event_meeting.id), t(".redirect_active.enable"), class: "action-icon action-icon--remove", method: :put %>
<% end %>
<% end %>
<%= icon_link_to "pencil", decidim_civicrm_admin.edit_meeting_registration_path(id: event_meeting.id), t(".edit"), class: "action-icon--pencil" %>
<%= icon_link_to "reload", decidim_civicrm_admin.sync_meeting_registrations_path(id: event_meeting.id), t(".sync"), class: "action-icon--reload" %>
<%= icon_link_to "people", decidim_civicrm_admin.meeting_registration_path(event_meeting), t(".registrations"), class: "action-icon" %>
<%= icon_link_to "group-line", decidim_civicrm_admin.meeting_registration_path(event_meeting), t(".registrations"), class: "action-icon" %>
<% unless event_meeting.civicrm_event_id.present? %>
<%= icon_link_to "x", decidim_civicrm_admin.meeting_path(event_meeting), t(".remove"), class: "action-icon action-icon--remove", method: :delete %>
<%= icon_link_to "close-line", decidim_civicrm_admin.meeting_path(event_meeting), t(".remove"), class: "action-icon action-icon--remove", method: :delete %>
<% end %>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion lib/decidim/civicrm/admin_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AdminEngine < ::Rails::Engine
menu.add_item :civicrm,
I18n.t("menu.civicrm", scope: "decidim.admin", default: "CiViCRM"),
decidim_civicrm_admin.info_index_path,
icon_name: "people",
icon_name: "group-line",
position: 5.75,
active: is_active_link?(decidim_civicrm_admin.info_index_path, :inclusive),
if: defined?(current_user) && current_user&.read_attribute("admin")
Expand Down

0 comments on commit 00d259d

Please sign in to comment.