Skip to content

Commit

Permalink
Redesign the website for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatlinh300401 committed Nov 13, 2024
1 parent cb1851c commit 9796c36
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 32 deletions.
5 changes: 5 additions & 0 deletions base/static/css/navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
font-size: 1.2rem;
}

/* Show the dropdown menu on hover */
.nav-item.dropdown:hover .dropdown-menu {
display: block;
}

.dropdown-menu {
background-color: #326bb3;
}
Expand Down
20 changes: 16 additions & 4 deletions templates/base/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
<a class="dropdown-item"
style="color:black;
font-family: bold"
href="{% url 'project_requests' %}">Project Requests</a>
href="{% url 'projects' %}">All Projects</a>
<a class="dropdown-item"
style="color:black;
font-family: bold"
href="{% url 'projects' %}">Project List</a>
href="{% url 'project_requests' %}">Manage Requests</a>
</div>
{% else %}
<a class="nav-link" style="color:black;" href="{% url 'projects' %}">Projects</a>
Expand Down Expand Up @@ -80,11 +80,11 @@
<a class="dropdown-item"
style="color:black;
font-family: bold"
href="{% url 'user_requests' %}">Role Requests</a>
href="{% url 'user_groups' %}">All User Roles</a>
<a class="dropdown-item"
style="color:black;
font-family: bold"
href="{% url 'user_groups' %}">All User Roles</a>
href="{% url 'user_requests' %}">Role Requests</a>
</div>
</li>
{% endif %}
Expand Down Expand Up @@ -132,4 +132,16 @@
{% endif %}
</div>
</nav>

<script>
$(document).ready(function () {
$('.dropdown').hover(function () {
$(this).addClass('show');
$(this).find('.dropdown-menu').addClass('show');
}, function () {
$(this).removeClass('show');
$(this).find('.dropdown-menu').removeClass('show');
});
});
</script>
<!-- <div style="background-image: linear-gradient(90deg,#1CB5E0,#0d0d77); width: 100%; height: 0.5rem;"></div> -->
32 changes: 18 additions & 14 deletions templates/projects/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ <h2>Projects</h2>
</div>
<h3 style="padding-top: 3rem;">My Projects</h3>
<table class="table table-striped table-bordered mt-4">
<tr>
<th>Name</th>
<th>Description</th>
<th>Created By</th>
<th>Created Date</th>
<th>Last Modified</th>
</tr>
<thread class="thread-light">
<tr>
<th>Name</th>
<th>Description</th>
<th>Created By</th>
<th>Created Date</th>
<th>Last Modified</th>
</tr>
</thread>
{% for project in my_projects %}
<tr>
<td>
Expand All @@ -45,13 +47,15 @@ <h3 style="padding-top: 3rem;">My Projects</h3>
</table>
<h3>Public Projects</h3>
<table class="table table-striped table-bordered mt-4">
<tr>
<th>Name</th>
<th>Description</th>
<th>Created By</th>
<th>Created Date</th>
<th>Last Modified</th>
</tr>
<thead class="thead-dark">
<tr>
<th>Name</th>
<th>Description</th>
<th>Created By</th>
<th>Created Date</th>
<th>Last Modified</th>
</tr>
</thead>
{% for project in other_projects %}
{% if project.is_public %}
<tr>
Expand Down
28 changes: 14 additions & 14 deletions templates/schedule/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,7 @@ <h2 style="display: inline-block; position: absolute;">Experiments Schedule Mana
</p>
</div>

<div class="filter-container" style="display: flex; justify-content: space-between; margin-bottom: 20px;">
<div class="site-filter" style="flex: 1; margin-right: 10px; text-align: center;">
<h2>Filter By Your Site</h2>
<form method="post" action="{% url 'site_filter' %}">
{% csrf_token %}
<div>
{{ location_form.location }} <!-- Use location form -->
<button class="btn btn-primary" style="margin-left: 10px;" type="submit">
<i class="bi bi-filter"></i>
</button>
</div>
</form>
</div>

<div class="filter-container container mt-3" style="display: flex; justify-content: space-between; margin-bottom: 20px;">
<div class="exp-search" style="flex: 1; text-align: center; margin-left: 10px;"> <!-- Add margin-left to maintain spacing -->
<h2>Search For An Experiment</h2>
<form method="post" action="{% url 'search_experiments' %}">
Expand All @@ -37,6 +24,19 @@ <h2>Search For An Experiment</h2>
</div>
</form>
</div>

<div class="site-filter" style="flex: 1; margin-right: 10px; text-align: center;">
<h2>Filter By Your Site</h2>
<form method="post" action="{% url 'site_filter' %}">
{% csrf_token %}
<div>
{{ location_form.location }} <!-- Use location form -->
<button class="btn btn-primary" style="margin-left: 10px;" type="submit">
<i class="bi bi-filter"></i>
</button>
</div>
</form>
</div>
</div>


Expand Down

0 comments on commit 9796c36

Please sign in to comment.