badar_madeena/app/views/programs/index.html.erb

37 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% content_for :title, "Programs" %>
<% if notice.present? %>
<div class="alert alert-success alert-dismissible fade show mt-3" role="alert">
<%= notice %>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<% end %>
<div class="container my-5">
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="fw-bold text-primary mb-0">🎓 Programs</h1>
<%= link_to " New Program", new_program_path, class: "btn btn-success btn-lg" %>
</div>
<% if @programs.any? %>
<div id="programs" class="row g-4">
<% @programs.each do |program| %>
<div class="col-md-6 col-lg-4">
<div class="card shadow-sm border-0 h-100">
<div class="card-body">
<%= render program %>
<div class="mt-3 text-end">
<%= link_to "View Details →", program, class: "btn btn-outline-primary btn-sm" %>
</div>
</div>
</div>
</div>
<% end %>
</div>
<% else %>
<div class="text-center text-muted mt-5">
<p>No programs available yet. Start by creating one!</p>
</div>
<% end %>
</div>