| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | @include 'layout/head.html' |
| 5 | </head> |
| 6 | <body> |
| 7 | @include 'layout/header.html' |
| 8 | |
| 9 | <div class="content"> |
| 10 | @include 'layout/repo_menu.html' |
| 11 | |
| 12 | <div class="issues-header"> |
| 13 | <h1 class="issues-header__title">@{project.formatted_name()}</h1> |
| 14 | @if can_edit |
| 15 | <form method="post" action="/@repo.user_name/@repo.name/projects/@project.id/delete" class="inline-form"> |
| 16 | <button type="submit" class="link-button link-button--danger">%project_delete</button> |
| 17 | </form> |
| 18 | @end |
| 19 | </div> |
| 20 | |
| 21 | @if project.description != '' |
| 22 | <p class="project-desc">@project.description</p> |
| 23 | @end |
| 24 | |
| 25 | <div class="kanban-board"> |
| 26 | @for cv in views |
| 27 | <div class="kanban-column"> |
| 28 | <div class="kanban-column__header"> |
| 29 | <h3>@cv.column.name</h3> |
| 30 | @if can_edit |
| 31 | <form method="post" action="/@repo.user_name/@repo.name/projects/@project.id/columns/@cv.column.id/delete" class="inline-form"> |
| 32 | <button type="submit" class="link-button link-button--danger" title="%project_column_delete">×</button> |
| 33 | </form> |
| 34 | @end |
| 35 | </div> |
| 36 | <ul class="kanban-cards"> |
| 37 | @if cv.cards.len == 0 |
| 38 | <li class="kanban-cards__empty">%project_column_empty</li> |
| 39 | @end |
| 40 | @for card in cv.cards |
| 41 | <li class="kanban-card"> |
| 42 | <div class="kanban-card__title">@card.title</div> |
| 43 | @if card.note != '' |
| 44 | <p class="kanban-card__note">@card.note</p> |
| 45 | @end |
| 46 | @if can_edit |
| 47 | <div class="kanban-card__actions"> |
| 48 | <form method="post" action="/@repo.user_name/@repo.name/projects/@project.id/cards/@card.id/move" class="inline-form"> |
| 49 | <select name="column_id"> |
| 50 | @for c2 in views |
| 51 | @if c2.column.id == cv.column.id |
| 52 | <option value="@c2.column.id" selected>@c2.column.name</option> |
| 53 | @else |
| 54 | <option value="@c2.column.id">@c2.column.name</option> |
| 55 | @end |
| 56 | @end |
| 57 | </select> |
| 58 | <button type="submit" class="link-button" title="Move">→</button> |
| 59 | </form> |
| 60 | <form method="post" action="/@repo.user_name/@repo.name/projects/@project.id/cards/@card.id/delete" class="inline-form"> |
| 61 | <button type="submit" class="link-button link-button--danger" title="%project_card_delete">×</button> |
| 62 | </form> |
| 63 | </div> |
| 64 | @end |
| 65 | </li> |
| 66 | @end |
| 67 | </ul> |
| 68 | @if can_edit |
| 69 | <form method="post" action="/@repo.user_name/@repo.name/projects/@project.id/columns/@cv.column.id/cards" class="kanban-card-form"> |
| 70 | <input type="text" name="title" placeholder="%project_card_title_placeholder" required> |
| 71 | <textarea name="note" placeholder="%project_card_note_placeholder" rows="2"></textarea> |
| 72 | <button type="submit" class="link-button">%project_card_save</button> |
| 73 | </form> |
| 74 | @end |
| 75 | </div> |
| 76 | @end |
| 77 | |
| 78 | @if can_edit |
| 79 | <div class="kanban-column kanban-column--add"> |
| 80 | <form method="post" action="/@repo.user_name/@repo.name/projects/@project.id/columns" class="kanban-card-form"> |
| 81 | <input type="text" name="name" placeholder="%project_column_name_placeholder" required> |
| 82 | <button type="submit" class="link-button">%project_add_column</button> |
| 83 | </form> |
| 84 | </div> |
| 85 | @end |
| 86 | </div> |
| 87 | </div> |
| 88 | |
| 89 | @include 'layout/footer.html' |
| 90 | </body> |
| 91 | </html> |
| 92 | |