mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
A feature's guide now sits under the menu it is used from, read from the templates rather than from where somebody once put it: Header-Bar, All-Boards, Pages, Board-Header (search and every Board View), Board-Sidebar (Board Settings, Filter, Members, Labels, Archive), Rules, Swimlanes, Lists, Cards, Member-Settings, Admin-Panel and Login-Page. Topics used from several menus (editor, history, theme, translations, email, troubleshooting) are in General. - Each area has a README mapping its menu entries to their guides and to the template or server module that implements them. Board-Header/README.md lists all 40 Board View entries with the template boardBody.jade renders; five views (Table, Calendar Mode, Time, Timeline, Map) have no guide of their own yet and say so. - Board-View.md listed 25 views while BOARD_VIEWS has 40; it now lists all of them with their English labels. - Pages keep their file names. Where a released changelog links an old path, a "# Moved" page stays there and points to the new one; test-menu.sh skips folders holding only those. - Undo was filed under Login; it is General/Undo now. - Every link in docs, code comments, scripts and tests follows the move; docsLinksResolve checks them all. Tests that read a doc follow it to its new place. boardViewSettings now fails when Board-View.md or Board-Header/README.md differs from BOARD_VIEWS, or names a template boardBody.jade does not render. Thanks to xet7 !
382 lines
15 KiB
Plaintext
382 lines
15 KiB
Plaintext
//- Board View / Version Control: the board as a GitHub / Gitea repository's
|
|
issue tracker, in the board's own theme. Design:
|
|
docs/Features/Board-Header/Board-Views/Version-Control-View.md. A card is an issue, the board's
|
|
labels are its labels, a label with a due date is a milestone, the comments
|
|
are the conversation, the attachments are the files and the board's change
|
|
history is the history, with its undo.
|
|
template(name="versionControlView")
|
|
.vcs-view
|
|
header.vcs-header
|
|
h2.vcs-repo
|
|
i.fa.fa-code-fork
|
|
span.vcs-repo-name
|
|
+inlineViewer
|
|
= boardTitle
|
|
if isPublic
|
|
span.vcs-badge {{_ 'public'}}
|
|
.vcs-header-actions
|
|
if canWrite
|
|
.vcs-import
|
|
span.quiet {{_ 'import'}}:
|
|
each importSources
|
|
a.vcs-import-link(href="{{pathFor 'import' source=key}}") {{name}}
|
|
if canWrite
|
|
each syncedLists
|
|
button.vcs-button.js-vcs-sync(type="button" data-list-id="{{_id}}" disabled="{{#if busy}}disabled{{/if}}" title="{{source}} {{project}}{{#if error}} - {{error}}{{/if}}")
|
|
i.fa.fa-refresh(class="{{#if busy}}fa-spin{{/if}}")
|
|
| {{_ 'vcs-sync-now' source}}:
|
|
+inlineViewer
|
|
= title
|
|
a.vcs-button.js-vcs-export(href="#")
|
|
i.fa.fa-download
|
|
| {{_ 'export-board'}}
|
|
nav.vcs-tabs(role="tablist" aria-label="{{_ 'board-view-version-control'}}")
|
|
each tabs
|
|
a.vcs-tab.js-vcs-tab(href="#" role="tab" data-tab="{{id}}" aria-selected="{{#if active}}true{{else}}false{{/if}}" class="{{#if active}}is-active{{/if}}")
|
|
i.fa(class="{{icon}}")
|
|
span {{_ labelKey}}
|
|
if count
|
|
span.vcs-counter {{count}}
|
|
|
|
if isTab 'issues'
|
|
if creating
|
|
+versionControlNewIssue
|
|
else if selectedIssue
|
|
+versionControlIssue(selectedIssue)
|
|
else
|
|
.vcs-toolbar
|
|
input.vcs-search.js-vcs-search(type="search" value="{{query}}" aria-label="{{_ 'search'}}" placeholder="is:open label:bug milestone:v1 author:@me")
|
|
a.vcs-button.js-vcs-tab(href="#" data-tab="labels")
|
|
i.fa.fa-tag
|
|
| {{_ 'labels'}}
|
|
a.vcs-button.js-vcs-tab(href="#" data-tab="milestones")
|
|
i.fa.fa-map-signs
|
|
| {{_ 'vcs-milestones'}}
|
|
if canWrite
|
|
button.primary.vcs-new.js-vcs-new(type="button") {{_ 'vcs-new-issue'}}
|
|
.vcs-box
|
|
.vcs-box-header
|
|
a.vcs-state.js-vcs-state(href="#" data-state="open" class="{{#if stateIs 'open'}}is-active{{/if}}")
|
|
i.fa.fa-dot-circle-o
|
|
| {{counts.open}} {{_ 'vcs-open'}}
|
|
a.vcs-state.js-vcs-state(href="#" data-state="closed" class="{{#if stateIs 'closed'}}is-active{{/if}}")
|
|
i.fa.fa-check
|
|
| {{counts.closed}} {{_ 'vcs-closed'}}
|
|
select.vcs-sort.js-vcs-sort(aria-label="{{_ 'sort'}}")
|
|
each sorts
|
|
option(value="{{id}}" selected="{{#if active}}selected{{/if}}") {{_ labelKey}}
|
|
ul.vcs-issues
|
|
each issues
|
|
li.vcs-issue
|
|
i.fa.vcs-issue-icon(class="{{#if closed}}fa-check-circle is-closed{{else}}fa-dot-circle-o is-open{{/if}}" aria-hidden="true")
|
|
.vcs-issue-main
|
|
//- Rendered titles and labels can hold links, and a link
|
|
inside a link is not one: the clickable ones are spans.
|
|
span.vcs-issue-title.js-vcs-open-issue(role="link" tabindex="0" data-card-id="{{_id}}")
|
|
+inlineViewer
|
|
= title
|
|
each labels
|
|
span.card-label.vcs-label.js-vcs-label(role="link" tabindex="0" data-name="{{name}}" class="{{labelColorClass color}}" style="{{labelColorStyle color}}")
|
|
+inlineViewer
|
|
= name
|
|
.vcs-issue-meta.quiet
|
|
if number
|
|
| {{numberText}}
|
|
| {{_ 'vcs-opened-by' date author}}
|
|
each milestones
|
|
span.vcs-issue-milestone.js-vcs-milestone(role="link" tabindex="0" data-title="{{title}}")
|
|
i.fa.fa-map-signs
|
|
|
|
|
+inlineViewer
|
|
= title
|
|
.vcs-issue-side
|
|
each assignees
|
|
+userAvatar(userId=this noRemove=true)
|
|
if comments
|
|
span.vcs-issue-comments(title="{{_ 'comments'}}")
|
|
i.fa.fa-comment-o
|
|
| {{comments}}
|
|
else
|
|
li.vcs-empty.quiet {{_ 'vcs-no-issues'}}
|
|
|
|
if isTab 'milestones'
|
|
.vcs-box
|
|
ul.vcs-milestones
|
|
each milestones
|
|
li.vcs-milestone
|
|
.vcs-milestone-main
|
|
span.vcs-milestone-title.js-vcs-milestone(role="link" tabindex="0" data-title="{{title}}")
|
|
+inlineViewer
|
|
= title
|
|
.quiet(class="{{#if overdue}}vcs-overdue{{/if}}")
|
|
if dueAt
|
|
i.fa.fa-calendar
|
|
| {{_ 'vcs-due' due}}
|
|
else
|
|
| {{_ 'vcs-no-due-date'}}
|
|
.vcs-milestone-progress
|
|
.vcs-progress(role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="{{percent}}")
|
|
.vcs-progress-bar(style="width: {{percent}}%")
|
|
.quiet {{percent}}% · {{open}} {{_ 'vcs-open'}} · {{closed}} {{_ 'vcs-closed'}}
|
|
else
|
|
li.vcs-empty.quiet {{_ 'vcs-no-milestones'}}
|
|
|
|
if isTab 'labels'
|
|
.vcs-box
|
|
ul.vcs-labels
|
|
each labelRows
|
|
li.vcs-label-row
|
|
span.card-label.vcs-label.js-vcs-label(role="link" tabindex="0" data-name="{{name}}" class="{{labelColorClass color}}" style="{{labelColorStyle color}}")
|
|
if name
|
|
+inlineViewer
|
|
= name
|
|
else
|
|
| {{color}}
|
|
span.quiet {{_ 'vcs-open-issues' open}}
|
|
else
|
|
li.vcs-empty.quiet {{_ 'vcs-no-labels'}}
|
|
|
|
if isTab 'releases'
|
|
ul.vcs-releases
|
|
each releases
|
|
li.vcs-box.vcs-release
|
|
.vcs-comment-header
|
|
i.fa.fa-tag
|
|
strong
|
|
+inlineViewer
|
|
= title
|
|
span.quiet {{date}}
|
|
.vcs-comment-body
|
|
+viewer
|
|
= body
|
|
if files.length
|
|
h4 {{_ 'attachments'}}
|
|
each files
|
|
p
|
|
i.fa.fa-file-archive-o
|
|
|
|
|
a(href="{{link}}" target="_blank" rel="noopener noreferrer") {{name}}
|
|
else
|
|
li.vcs-empty.quiet {{_ 'vcs-no-releases'}}
|
|
|
|
if isTab 'wiki'
|
|
if wikiPage
|
|
.vcs-wiki
|
|
.vcs-wiki-main
|
|
with wikiPage
|
|
h2.vcs-issue-heading
|
|
+inlineViewer
|
|
= title
|
|
p.vcs-wiki-tools
|
|
a.js-vcs-wiki-history(href="#")
|
|
i.fa.fa-history
|
|
| {{_ 'history'}}
|
|
if canWrite
|
|
a.js-vcs-wiki-edit(href="#")
|
|
i.fa.fa-pencil
|
|
| {{_ 'edit'}}
|
|
if wikiHistory
|
|
//- The page's history: each commit's edit, and Restore brings
|
|
an older text back - the card's own history table.
|
|
with wikiPage
|
|
+historyTable(scope="card" scopeId=_id)
|
|
else
|
|
.vcs-wiki-body
|
|
with wikiPage
|
|
+viewer
|
|
= text
|
|
if wikiFooter
|
|
.vcs-wiki-footer
|
|
+viewer
|
|
= wikiFooter
|
|
aside.vcs-wiki-side
|
|
.vcs-box
|
|
.vcs-box-header
|
|
strong {{_ 'vcs-wiki-pages'}}
|
|
ul.vcs-wiki-pages
|
|
each wikiPages
|
|
li(class="{{#if active}}is-active{{/if}}")
|
|
span.js-vcs-wiki-page(role="link" tabindex="0" data-card-id="{{_id}}")
|
|
+inlineViewer
|
|
= title
|
|
if wikiSidebar
|
|
.vcs-box.vcs-wiki-sidebar
|
|
.vcs-wiki-body
|
|
+viewer
|
|
= wikiSidebar
|
|
else
|
|
p.vcs-empty.quiet {{_ 'vcs-no-wiki'}}
|
|
|
|
if isTab 'files'
|
|
.vcs-box
|
|
table.vcs-files
|
|
tbody
|
|
each files
|
|
//- The controls of an opened card's attachments
|
|
(cards/attachments.jade attachmentGallery): a click on the
|
|
thumbnail or the name views it in the same viewer, walking the
|
|
tab's files; then download, rename, delete and the cover /
|
|
background menu, for the same members.
|
|
tr.vcs-file(data-attachment-id="{{_id}}")
|
|
td.vcs-file-name
|
|
if canPreview
|
|
button.vcs-file-view.js-vcs-file-view(type="button" data-attachment-id="{{_id}}" title="{{_ 'preview'}}" aria-label="{{_ 'preview'}}: {{cleanFilename name}}")
|
|
if isImage
|
|
img.vcs-file-thumbnail(src="{{attachmentPreviewUrl attachment}}" alt="" loading="lazy")
|
|
else
|
|
i.fa.fa-file-o
|
|
| {{cleanFilename name}}
|
|
else
|
|
i.fa.fa-file-o
|
|
|
|
|
a(href="{{link}}" target="_blank" rel="noopener noreferrer") {{name}}
|
|
td.quiet {{size}}
|
|
td.vcs-file-actions
|
|
if canPreview
|
|
a.js-vcs-file-view(data-attachment-id="{{_id}}" title="{{_ 'preview'}}")
|
|
i.fa.fa-search-plus
|
|
a.js-download(href="{{link}}?download=true" download="{{downloadFilename name}}" title="{{_ 'download'}}")
|
|
i.fa.fa-arrow-down
|
|
if currentUser.isBoardMember
|
|
unless currentUser.isCommentOnly
|
|
unless currentUser.isWorker
|
|
a.js-vcs-file-rename(data-attachment-id="{{_id}}" title="{{_ 'rename'}}")
|
|
i.fa.fa-pencil-square-o
|
|
a.js-vcs-file-delete(data-attachment-id="{{_id}}" title="{{_ 'delete'}}")
|
|
i.fa.fa-trash
|
|
a.js-vcs-file-menu(data-attachment-id="{{_id}}" title="{{_ 'attachmentActionsPopup-title'}}")
|
|
i.fa.fa-bars
|
|
td
|
|
span.js-vcs-open-issue(role="link" tabindex="0" data-card-id="{{cardId}}")
|
|
if number
|
|
| {{numberText}}
|
|
+inlineViewer
|
|
= issueTitle
|
|
td.quiet {{date}}
|
|
else
|
|
tr
|
|
td.vcs-empty.quiet {{_ 'vcs-no-files'}}
|
|
|
|
if isTab 'history'
|
|
//- The board's change history, as git log: who changed what, when -
|
|
and Restore undoes it, through the same history every board has.
|
|
+historyTable(scope="board" scopeId=boardId)
|
|
|
|
//- One issue: the conversation on the left, labels, people, milestone and
|
|
files on the right - GitHub's issue page.
|
|
template(name="versionControlIssue")
|
|
.vcs-issue-page
|
|
a.vcs-back.js-vcs-back(href="#")
|
|
i.fa.fa-arrow-left
|
|
| {{_ 'vcs-issues'}}
|
|
h2.vcs-issue-heading
|
|
+inlineViewer
|
|
= title
|
|
|
|
|
if number
|
|
span.quiet {{numberText}}
|
|
.vcs-issue-status
|
|
span.vcs-state-badge(class="{{#if closed}}is-closed{{else}}is-open{{/if}}")
|
|
i.fa(class="{{#if closed}}fa-check-circle{{else}}fa-dot-circle-o{{/if}}")
|
|
| {{#if closed}}{{_ 'vcs-closed'}}{{else}}{{_ 'vcs-open'}}{{/if}}
|
|
span.quiet {{_ 'vcs-opened-by' date author}} · {{_ 'vcs-comment-count' comments}}
|
|
.vcs-issue-layout
|
|
.vcs-timeline
|
|
.vcs-comment
|
|
.vcs-comment-header
|
|
strong {{author}}
|
|
span.quiet {{date}}
|
|
.vcs-comment-body
|
|
if body
|
|
+viewer
|
|
= body
|
|
else
|
|
p.quiet {{_ 'vcs-no-description'}}
|
|
each conversation
|
|
.vcs-comment
|
|
.vcs-comment-header
|
|
+userAvatar(userId=userId noRemove=true)
|
|
strong {{author}}
|
|
span.quiet {{time}}
|
|
.vcs-comment-body
|
|
+viewer
|
|
= text
|
|
if canComment
|
|
form.vcs-comment-form.js-vcs-comment
|
|
textarea.js-vcs-comment-text(rows="4" aria-label="{{_ 'vcs-leave-comment'}}" placeholder="{{_ 'vcs-leave-comment'}}")
|
|
.vcs-comment-actions
|
|
if synced
|
|
span.quiet.vcs-synced
|
|
i.fa.fa-refresh
|
|
| {{_ 'vcs-synced-from' syncSource}}
|
|
else if canWrite
|
|
if closed
|
|
button.js-vcs-set-state(type="button" data-state="open")
|
|
i.fa.fa-dot-circle-o
|
|
| {{_ 'vcs-reopen'}}
|
|
else
|
|
button.js-vcs-set-state(type="button" data-state="closed")
|
|
i.fa.fa-check-circle
|
|
| {{_ 'vcs-close'}}
|
|
button.primary(type="submit") {{_ 'comment'}}
|
|
aside.vcs-sidebar
|
|
.vcs-side-block
|
|
h3 {{_ 'assignee'}}
|
|
each assignees
|
|
+userAvatar(userId=this noRemove=true)
|
|
else
|
|
p.quiet {{_ 'vcs-none'}}
|
|
.vcs-side-block
|
|
h3 {{_ 'labels'}}
|
|
each labels
|
|
span.card-label.vcs-label(class="{{labelColorClass color}}" style="{{labelColorStyle color}}")
|
|
+inlineViewer
|
|
= name
|
|
else
|
|
p.quiet {{_ 'vcs-none'}}
|
|
.vcs-side-block
|
|
h3 {{_ 'vcs-milestones'}}
|
|
each milestones
|
|
p
|
|
i.fa.fa-map-signs
|
|
|
|
|
+inlineViewer
|
|
= title
|
|
else
|
|
p.quiet {{_ 'vcs-none'}}
|
|
.vcs-side-block
|
|
h3 {{_ 'attachments'}}
|
|
each issueFiles
|
|
p
|
|
a(href="{{link}}" target="_blank" rel="noopener noreferrer") {{name}}
|
|
else
|
|
p.quiet {{_ 'vcs-none'}}
|
|
//- Everything else - editing labels, people, dates, uploading files to
|
|
the Admin Panel's default storage - is the card's own popup.
|
|
button.js-vcs-open-card(type="button" data-card-id="{{_id}}")
|
|
i.fa.fa-id-card-o
|
|
| {{_ 'vcs-open-card'}}
|
|
|
|
template(name="versionControlNewIssue")
|
|
form.vcs-new-issue.js-vcs-create
|
|
h2 {{_ 'vcs-new-issue'}}
|
|
input.js-vcs-new-title(type="text" required aria-label="{{_ 'title'}}" placeholder="{{_ 'title'}}" autofocus)
|
|
textarea.js-vcs-new-body(rows="10" aria-label="{{_ 'description'}}" placeholder="{{_ 'description'}}")
|
|
if boardLabels.length
|
|
fieldset.vcs-new-labels
|
|
legend {{_ 'labels'}}
|
|
each boardLabels
|
|
label.vcs-new-label
|
|
input.js-vcs-new-label(type="checkbox" value="{{_id}}")
|
|
span.card-label(class="{{labelColorClass color}}" style="{{labelColorStyle color}}")
|
|
if name
|
|
+inlineViewer
|
|
= name
|
|
else
|
|
| {{color}}
|
|
if error
|
|
p.warning {{error}}
|
|
.vcs-comment-actions
|
|
button.js-vcs-cancel(type="button") {{_ 'cancel'}}
|
|
button.primary(type="submit") {{_ 'vcs-submit-issue'}}
|