This repository has been archived by the owner on Mar 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from mena-devs/enhance-invitations-views
Enhance invitations views
- Loading branch information
Showing
16 changed files
with
175 additions
and
289 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<tr> | ||
<td><%= admin_invitation.invitee_name %></td> | ||
<td><%= admin_invitation.invitee_email %></td> | ||
<td><%= admin_invitation.location_name %></td> | ||
<td><%= admin_invitation.aasm_state.humanize %></td> | ||
<td><%= admin_invitation.retries %></td> | ||
<td><%= admin_invitation.updated_at.strftime("%d %b %Y") %></td> | ||
<td><%= link_to("Resend", resend_invitation_path(admin_invitation), class: "button button-3d button-mini button-rounded button-red", method: :put) %></td> | ||
<td><%= link_to("View", admin_invitation, class: "button button-3d button-mini button-rounded button-green") %></td> | ||
</tr> |
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 |
---|---|---|
|
@@ -30,9 +30,7 @@ | |
<%= paginate @admin_invitations %> | ||
</div> | ||
<% end %> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</section><!-- #content 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,84 +1,64 @@ | ||
<!-- Document Wrapper | ||
============================================= --> | ||
<div id="wrapper" class="clearfix"> | ||
<!-- Page Title | ||
============================================= --> | ||
<section id="page-title"> | ||
<!-- Page Title | ||
============================================= --> | ||
<section id="page-title"> | ||
|
||
<div class="container clearfix"> | ||
<div class="col-md-8 col-xs-12"> | ||
<h1>Slack Group sent invitations</h1> | ||
<span class='hidden-xs'>Invitations sent to contacts to join MENAdevs Slack Group</span> | ||
</div> | ||
<div class="container clearfix"> | ||
<div class="row clearfix"> | ||
<div class="col-md-8 col-xs-12 nopadding"> | ||
<h1>Slack Group invitations</h1> | ||
<span class='hidden-xs'>Invitations sent to your contacts</span> | ||
</div> | ||
|
||
<div class="col-md-4 hidden-xs"> | ||
<%= link_to new_invitation_path, :class => "button button-3d notopmargin fright" do %> | ||
<%= fa_icon("plus", :text => "Invite") %> | ||
<% end %> | ||
</div> | ||
<div class="col-md-4 hidden-xs"> | ||
<%= link_to new_invitation_path, :class => "button button-3d notopmargin fright" do %> | ||
<%= fa_icon("plus", :text => "New invitation") %> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</section><!-- #page-title end --> | ||
</section><!-- #page-title end --> | ||
|
||
<%= content_for :flash %> | ||
<%= content_for :flash %> | ||
|
||
<!-- Content | ||
============================================= --> | ||
<section id="content"> | ||
<!-- Content | ||
============================================= --> | ||
<section id="content"> | ||
|
||
<div class="content-wrap"> | ||
<div class="content-wrap"> | ||
|
||
<div class="container clearfix"> | ||
|
||
<div class="table-responsive"> | ||
<% if @invitations.blank? %> | ||
<div class="container clearfix"> | ||
|
||
<div class="alert alert-info alert-dismissible" role="alert"> | ||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
<i class="icon-warning-sign"></i>You have sent 0 invitations | ||
</div> | ||
<div class="table-responsive"> | ||
<% if @invitations.blank? %> | ||
|
||
<% else %> | ||
<table id="invitations-datatable" class="table table-striped table-bordered" cellspacing="0" width="100%"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Email</th> | ||
<th>Location</th> | ||
<th>State</th> | ||
<th>Retries</th> | ||
<th>Sent on</th> | ||
<% if current_user.admin %> | ||
<th> </th> | ||
<% end %> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<%= render partial: "invitation", collection: @invitations %> | ||
<div class="alert alert-info alert-dismissible" role="alert"> | ||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> | ||
<i class="icon-warning-sign"></i>You have sent 0 invitations | ||
</div> | ||
|
||
<%= paginate @invitations %> | ||
</tbody> | ||
</table> | ||
<% end %> | ||
</div> | ||
<% else %> | ||
<table id="invitations-datatable" class="table table-striped table-bordered" cellspacing="0" width="100%"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Email</th> | ||
<th>State</th> | ||
<% if authorised_admin? %> | ||
<th> </th> | ||
<% end %> | ||
<th> </th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<%= render partial: "invitation", collection: @invitations %> | ||
</tbody> | ||
</table> | ||
<% end %> | ||
</div> | ||
<div class="center"> | ||
<%= paginate @invitations %> | ||
</div> | ||
</div> | ||
</section><!-- #content end --> | ||
</div> | ||
|
||
<!-- Bootstrap Data Table Plugin --> | ||
<%= javascript_include_tag "components/bs-datatable.js", "data-turbolinks-track" => false %> | ||
<%= stylesheet_link_tag('bs-datatable', media: 'all', | ||
'data-turbolinks-track': false) %> | ||
|
||
<script> | ||
|
||
$(document).ready(function() { | ||
$('#invitations-datatable').dataTable( | ||
{ | ||
aaSorting: [[5, 'desc']] | ||
} | ||
); | ||
}); | ||
|
||
</script> | ||
</div> | ||
</section><!-- #content end --> |
Oops, something went wrong.