Skip to content

Commit

Permalink
Merge branch '20240807-students-view-updates' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
DevAdm committed Aug 14, 2024
2 parents fe36163 + becd87d commit 8d4d58a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 28 deletions.
2 changes: 1 addition & 1 deletion app/views/students/_header.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="row">
<h4 class="fw-lighter my-0 fs-5">Student Record</h4>
<span class="fw-lighter text-secondary d-block lead ">Student Record</span>
<div class="col-sm-12 col-lg-7">
<h1 title="<%= @student.sisid %>">
<%= link_to_unless controller.controller_name == "students" && controller.action_name == "show", @student.name, @student, title: @student.sisid %>
Expand Down
25 changes: 23 additions & 2 deletions app/views/students/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,32 @@
</div>
</div>
</div>
<div class="students mt-4">

<div class="table-responsive">
<table class="table">
<tr>
<th></th>
<th></th>
<th></th>
</tr>
<% @students.each do |student| %>
<tr>
<td><%= fa_stacked_icon "graduation-cap",base: "none", class: "fa-2x border rounded", style:"color:grey" %></td>
<td><h5><%= link_to student.name, student %></h5>created by <%= student.created_by.name %> on <%= student.created_at.strftime("%B %d, %Y") %></td>
<td> <b><%= student.sisid %></b></td>
</tr>
<% end %>
</table>
</div>
<%
=begin%>
<div class="students mt-4">
<% @students.each do |student| %>
<%= render partial: student %>
<% end %>
</div>
</div>
<%
=end%>
<div class="pagination">
Expand Down
52 changes: 27 additions & 25 deletions app/views/students/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,33 @@
<% end %>

<div class="card mt-3">
<div class="card-body">
<div class="row">
<div class="col-6">
<h6>Username</h6>
<p><%= @student.username%></p>
<h6>Email</h6>
<p><%= @student.email%></p>
<h6>Invitation</h6>
<p>
<% if @student.invitation_sent_at.nil? %>
<%= link_to_if AppSettings.email_welcome_allow, "Send invitation email", send_invite_student_path(@student) %>
<% else %>
Sent on <%= @student.invitation_sent_at.strftime("%B %d, %Y")%>
<span class="soft weak">(<%= link_to_if AppSettings.email_welcome_allow, "Send Again", send_invite_student_path(@student), class: "soft weak"%>)</span>
<% end %>
</p>
</div>
<div class="col-6">
<h6>SISID</h6>
<p><%= @student.sisid %></p>
<h6>Joined on</h6>
<p><%= @student.created_at.strftime("%B %d, %Y")%></p>
</div>
</div>
</div>
<div class="card-body">
<div class="data-grid">
<div class="row">
<div class="col-6">
<h4>Username</h4>
<p><%= @student.username%></p>
<h4>Email</h4>
<p><%= @student.email%></p>
<h4>Invitation</h4>
<p>
<% if @student.invitation_sent_at.nil? %>
<%= link_to_if AppSettings.email_welcome_allow, "Send invitation email", send_invite_student_path(@student) %>
<% else %>
Sent on <%= @student.invitation_sent_at.strftime("%B %d, %Y")%>
<span class="soft weak">(<%= link_to_if AppSettings.email_welcome_allow, "Send Again", send_invite_student_path(@student), class: "soft weak"%>)</span>
<% end %>
</p>
</div>
<div class="col-6">
<h4>SISID</h4>
<p><%= @student.sisid %></p>
<h4>Joined on</h4>
<p><%= @student.created_at.strftime("%B %d, %Y")%></p>
</div>
</div>
</div>
</div>
</div>

<div>
Expand Down

0 comments on commit 8d4d58a

Please sign in to comment.