Skip to content

Commit

Permalink
Hide initiative request links
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagemaru committed May 10, 2022
1 parent 3b70420 commit 94c6da6
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<div class="card" id="committee_members">
<div class="card-divider">
<h2 class="card-title"><%= t ".title" %></h2>
</div>

<div class="card-section">
<div class="table-scroll">
<table class="table-list">
<thead>
<tr>
<th><%= t "user", scope: "activemodel.attributes.initiatives_committee_member" %></th>
<th></th>
</tr>
</thead>
<tbody>
<% if current_initiative.committee_members.empty? %>
<tr>
<td><%= t ".no_members_yet" %></td>
<td></td>
</tr>
<% end %>

<% current_initiative.committee_members.each do |request| %>
<tr data-id="<%= request.id %>">
<td>
<%= link_to request.user.name, "mailto:#{request.user.email}" %>
</td>
<td class="table-list__actions">
<% if allowed_to? :approve, :initiative_committee_member, request: request %>
<%= icon_link_to "check",
approve_initiative_committee_request_path(current_initiative, request),
t(".approve"),
class: "action-icon--check" %>
<% end %>

<% if allowed_to? :revoke, :initiative_committee_member, request: request %>
<%= icon_link_to "circle-x",
revoke_initiative_committee_request_path(current_initiative, request),
t(".revoke"),
class: "action-icon--remove",
method: :delete,
data: { confirm: t(".confirm_revoke") } %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
</div>

<%= javascript_include_tag "decidim/initiatives/admin/invite_users.js" %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="card__content">
<%= t ".invite_to_committee_help" %>

<div class="column actions">
<%= link_to t(".continue"), next_wizard_path, class: "button expanded" %>
</div>

<%= javascript_include_tag "decidim/initiatives/admin/invite_users.js" %>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<p>
<%= t "decidim.initiatives.initiatives_mailer.creation_subject", title: translated_attribute(@initiative.title) %>.
<%= link_to t("decidim.initiatives.initiatives_mailer.more_information"), decidim.page_url("initiatives", host: @organization.host) %>
</p>

<% if @initiative.created_by_individual? %>
<p>
<%= t "decidim.initiatives.initiatives_mailer.promotal_committee_help",
member_count: Decidim::Initiatives.minimum_committee_members %>
</p>
<% end %>
<br><br>

<p>
<%= t("check_initiative_details", scope: "decidim.initiatives.initiatives_mailer.initiative_link") %>
<%= link_to t("here", scope: "decidim.initiatives.initiatives_mailer.initiative_link"),
decidim_admin_initiatives.initiative_url(@initiative, host: @organization.host) %>
</p>

0 comments on commit 94c6da6

Please sign in to comment.