|
1 | 1 | <%= tag.div(data: { refresh: (defined?(@refresh) && @refresh) || "" }) do %> |
2 | | - <% if @available_tasks.empty? %> |
3 | | - <div class="content is-large"> |
4 | | - <h3 class="title is-3"> The MaintenanceTasks gem has been successfully installed! </h3> |
5 | | - <p> |
6 | | - Any new Tasks will show up here. To start writing your first Task, |
7 | | - run <code>bin/rails generate maintenance_tasks:task my_task</code>. |
8 | | - </p> |
9 | | - </div> |
10 | | - <% else %> |
11 | | - <% if active_tasks = @available_tasks[:active] %> |
12 | | - <h3 class="title is-4 has-text-weight-bold">Active Tasks</h3> |
13 | | - <%= render partial: 'task', collection: active_tasks %> |
14 | | - <% end %> |
15 | | - <% if new_tasks = @available_tasks[:new] %> |
16 | | - <h3 class="title is-4 has-text-weight-bold">New Tasks</h3> |
17 | | - <div class="grid is-col-min-20"> |
18 | | - <%= render partial: 'task', collection: new_tasks %> |
19 | | - </div> |
| 2 | + <div class="columns"> |
| 3 | + <% if @namespaces.present? %> |
| 4 | + <div class="column is-one-quarter"> |
| 5 | + <%= render 'sidebar' %> |
| 6 | + </div> |
20 | 7 | <% end %> |
21 | | - <% if completed_tasks = @available_tasks[:completed] %> |
22 | | - <h3 class="title is-4 has-text-weight-bold">Completed Tasks</h3> |
23 | | - <%= render partial: 'task', collection: completed_tasks %> |
24 | | - <% end %> |
25 | | - <% end %> |
| 8 | + <div class="column"> |
| 9 | + <% if @selected_namespace.present? %> |
| 10 | + <div class="mb-4"> |
| 11 | + <span class="tag is-medium is-info"> |
| 12 | + <%= @selected_namespace %> |
| 13 | + <%= link_to "×", tasks_path, class: "delete is-small ml-2" %> |
| 14 | + </span> |
| 15 | + </div> |
| 16 | + <% end %> |
| 17 | + |
| 18 | + <% if @available_tasks.empty? %> |
| 19 | + <div class="content is-large"> |
| 20 | + <% if @selected_namespace.present? %> |
| 21 | + <h3 class="title is-3">No tasks found in <%= @selected_namespace %></h3> |
| 22 | + <p> |
| 23 | + <%= link_to "View all tasks", tasks_path %> |
| 24 | + </p> |
| 25 | + <% else %> |
| 26 | + <h3 class="title is-3"> The MaintenanceTasks gem has been successfully installed! </h3> |
| 27 | + <p> |
| 28 | + Any new Tasks will show up here. To start writing your first Task, |
| 29 | + run <code>bin/rails generate maintenance_tasks:task my_task</code>. |
| 30 | + </p> |
| 31 | + <% end %> |
| 32 | + </div> |
| 33 | + <% else %> |
| 34 | + <% if active_tasks = @available_tasks[:active] %> |
| 35 | + <h3 class="title is-4 has-text-weight-bold">Active Tasks</h3> |
| 36 | + <%= render partial: 'task', collection: active_tasks %> |
| 37 | + <% end %> |
| 38 | + <% if new_tasks = @available_tasks[:new] %> |
| 39 | + <h3 class="title is-4 has-text-weight-bold">New Tasks</h3> |
| 40 | + <div class="grid is-col-min-20"> |
| 41 | + <%= render partial: 'task', collection: new_tasks %> |
| 42 | + </div> |
| 43 | + <% end %> |
| 44 | + <% if completed_tasks = @available_tasks[:completed] %> |
| 45 | + <h3 class="title is-4 has-text-weight-bold">Completed Tasks</h3> |
| 46 | + <%= render partial: 'task', collection: completed_tasks %> |
| 47 | + <% end %> |
| 48 | + <% end %> |
| 49 | + </div> |
| 50 | + </div> |
26 | 51 | <% end %> |
0 commit comments