Skip to content

Commit

Permalink
Merge pull request #111 from WildMeOrg/task-action-cleanup
Browse files Browse the repository at this point in the history
moved label button and cleanup
  • Loading branch information
erinz2020 authored Nov 20, 2024
2 parents bb07e9b + 508ce1b commit a2bd3e6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 48 deletions.
38 changes: 31 additions & 7 deletions views/layouts/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,39 @@
<% if(userRole == 'admin'){ %>
<div class="container d-flex justify-content-between">
<a href="/tasks/new" class="btn btn-primary"><i class="bi-plus"></i> Create Task</a>
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Export Filtered Results
<div>
<button id="editLabelButton" class="btn btn-primary" style="display:inline-block">
Manage Labels
</button>
<ul class="dropdown-menu">
<li><div id="exportAnnotations" class="dropdown-item">Export Annotations</div></li>
<li><div id="exportImages" class="dropdown-item">Export Images</div></li>
</ul>
<div class="dropdown" style="display:inline">
<button class="btn btn-primary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Export Filtered Results
</button>
<ul class="dropdown-menu">
<li><div id="exportAnnotations" class="dropdown-item">Export Annotations</div></li>
<li><div id="exportImages" class="dropdown-item">Export Images</div></li>
</ul>
</div>
</div>
</div>
<div class="modal fade" id="labelEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="labelsWrapper">
<div class="labelsContainerHeader">
<button id="backToTasks" class="btn btn-primary" data-bs-dismiss="modal">
<span class="bi bi-arrow-return-left"></span>
Task Table
</button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="labelsList" id="labelsList"></div>
<div class="addNewLabel">
<button id="addNewLabel" class="btn btn-primary"> + ADD NEW LABELS</button>
</div>
</div>
</div>
</div>
</div>
<% } %>
</div>
Expand Down
43 changes: 2 additions & 41 deletions views/pages/tasks.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,16 @@
</div>

<div class="container border p-3 mb-3">
<div class="row mb-2">
<% if(userRole == 'admin'){ %>
<div class="col-9">
<h4>Filters</h4>
</div>
<div class="col-1">
<button id="editLabelButton" type="button" class="btn btn-primary">Labels</button>
</div>
<div class="col-1">
<button id="taskFilterButton" type="button" class="btn btn-primary">Filter</button>
</div>
<div class="col-1">
<button id="taskResetButton" type="button" class="btn btn-secondary">Reset</button>
</div>
<% } %>
<% if(userRole !== 'admin'){ %>
<div class="row mb-2">
<div class="col-10">
<h4>Filters</h4>
</div>
<div class="col-1">
<button id="taskFilterButton" type="button" class="btn btn-primary">Filter</button>
<button id="taskFilterButton" type="button" class="btn btn-primary">Apply</button>
</div>
<div class="col-1">
<button id="taskResetButton" type="button" class="btn btn-secondary">Reset</button>
</div>
<% } %>
</div>
<div class="row mb-4">
<div class="col-6">
Expand Down Expand Up @@ -192,27 +176,4 @@
</div>
</div>

<div class="modal fade" id="labelEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
aria-labelledby="staticBackdropLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="labelsWrapper">
<div class="labelsContainerHeader">
<button id="backToTasks" class="btn btn-primary" data-bs-dismiss="modal">
<span class="bi bi-arrow-return-left"></span>
Task Table
</button>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>

</div>
<div class="labelsList" id="labelsList">
</div>
<div class="addNewLabel">
<button id="addNewLabel" class="btn btn-primary"> + ADD NEW LABELS</button>
</div>
</div>
</div>
</div>
</div>

</main>

0 comments on commit a2bd3e6

Please sign in to comment.