Eventually-decentralized project hosting and management platform

[[ 🗃 ^WvWbo vervis ]] :: [📥 Inbox] [📤 Outbox] [🐤 Followers] [🤝 Collaborators] [🛠 Changes]

Clone

HTTPS: darcs clone https://vervis.peers.community/repos/WvWbo

SSH: darcs clone USERNAME@vervis.peers.community:WvWbo

Tags

TODO

templates / cloth /

one.hamlet

$# This file is part of Vervis.
$#
$# Written in 2016, 2018, 2019, 2020, 2022
$# by fr33domlover <fr33domlover@riseup.net>.
$#
$# ♡ Copying is an act of love. Please copy, reuse and share.
$#
$# The author(s) have dedicated all copyright and related and neighboring
$# rights to this software to the public domain worldwide. This software is
$# distributed without any warranty.
$#
$# You should have received a copy of the CC0 Public Domain Dedication along
$# with this software. If not, see
$# <http://creativecommons.org/publicdomain/zero/1.0/>.

^{loomNavW eloom actor}

<h2>#{ticketTitle ticket}

<div>
  Created on #{showDate $ ticketCreated ticket} by
  ^{personLinkFedW author}

$maybe originRepo <- moriginRepo
  <div>
    Origin:
    $case originRepo
      $of Left (repoHash, name, maybeBranch)
        <a href=@{RepoR repoHash}>
          ^#{keyHashidText repoHash} #{name}
        $maybe branch <- maybeBranch
          : #
          <a href=@{RepoBranchSourceR repoHash branch []}>
            #{branch}
      $of Right (uRepo, maybeName, maybeBranch)
        <a href="#{renderObjURI uRepo}">
          $maybe name <- maybeName
            #{name}
          $nothing
            <i>[unnamed]
        $maybe (maybeURI, branch) <- maybeBranch
          : #
          $maybe uri <- maybeURI
            <a href="#{renderObjURI uri}">
              #{branch}
          $nothing
            #{branch}

$with (_repoID, repoHash, name, maybeBranch) <- targetRepo
  <div>
    Target:
    <a href=@{RepoR repoHash}>
      ^#{keyHashidText repoHash} #{name}
    $maybe branch <- maybeBranch
      :
      <a href=@{RepoBranchSourceR repoHash branch []}>
        #{branch}

$maybe (bundleID, patchIDs, maybeErrorOrCanApply) <- mbundle'
  <div>
    Bundle
    <a href=@{BundleR loomHash clothHash (hashBundle bundleID)}>
      #{keyHashidText $ hashBundle bundleID}
    patches, last to first:
    <ul>
      $forall patchID <- patchIDs
        <li>
          <a href=@{PatchR loomHash clothHash (hashBundle bundleID) (hashPatch patchID)}>
            #{keyHashidText $ hashPatch patchID}
  <div>
    Status: #
    $maybe errorOrCanApply <- maybeErrorOrCanApply
      $case errorOrCanApply
        $of Left e
          <span .apply-error>
            [Error! #{e}]
          ^{applyButton "Try applying anyway"}
        $of Right False
          <span .apply-no>
            [Apply check failed! Possibly conflicts exist]
          ^{applyButton "Try applying anyway"}
        $of Right True
          <span .apply-yes>
            [Can apply!]
          ^{applyButton "Apply"}
    $nothing
      RESOLVED

<div>
  <span>
    <a href=@{ClothFollowersR loomHash clothHash}>
      [🐤 Followers]
  <span>
    <a href=@{ClothDepsR loomHash clothHash}>
      [⤴ Dependencies]
  <span>
    <a href=@{ClothReverseDepsR loomHash clothHash}>
      [⤷ Dependants]
  <span>
      [✋ Claim requests]
  <span>
      [✏ Edit]

^{followButton}

<div>^{desc}

$# $if ticketStatus ticket /= TSClosed
$#   <p>
$#     $maybe (assignee, me) <- massignee
$#       $if me
$#         Assigned to you.
$#
$#         ^{buttonW POST "Unclaim this ticket" (ProjectTicketUnclaimR loomHash clothHash)}
$#       $else
$#         Assigned to ^{sharerLinkW assignee}.
$#
$#         ^{buttonW POST "Unassign this ticket" (ProjectTicketUnassignR loomHash clothHash)}
$#     $nothing
$#       Not assigned.
$#
$#       <a href=@{ClaimRequestNewR loomHash clothHash}>Ask to have it assigned to you
$#
$#       or
$#
$#       ^{buttonW POST "Claim this ticket" (ProjectTicketClaimR loomHash clothHash)}
$#
$#       or
$#
$#       <a href=@{ProjectTicketAssignR loomHash clothHash}>Assign to someone else
$#       .

<p>
  Status: #
  $maybe (closed, closer) <- resolved
    Closed on #{showDate closed} by ^{personLinkFedW closer}
$#  ^{buttonW POST "Reopen this MR" (ProjectTicketOpenR loomHash clothHash)}
  $nothing
    Open
$#  ^{buttonW POST "Close this MR" (ProjectTicketCloseR loomHash clothHash)}


<h3>Custom fields

<ul>
  $forall TicketTextParam field mvalue <- tparams
    <li .#{relevant $ wfsFilter field}>
$#       <a href=@{WorkflowFieldR wshr wfl $ wfsIdent field}>
        #{wfsName field}
      :
      $maybe value <- mvalue
        #{ttpvVal value}
      $nothing
        $if wfsRequired field
          NO VALUE FOR REQUIRED FIELD
        $else
          (none)
  $forall TicketEnumParam field enum mvalue <- eparams
    <li .#{relevant $ wfsFilter field}>
$#       <a href=@{WorkflowFieldR wshr wfl $ wfsIdent field}>
      #{wfsName field}
      :
      $maybe value <- mvalue
$#         <a href=@{WorkflowEnumCtorsR wshr wfl $ wesIdent enum}>
          #{tepvName value}
      $nothing
        $if wfsRequired field
          NO VALUE FOR REQUIRED FIELD
        $else
          (none)
  $forall TicketClassParam field mvalue <- cparams
    <li .#{relevant $ wfsFilter field}>
$#       <a href=@{WorkflowFieldR wshr wfl $ wfsIdent field}>
      #{wfsName field}
      :
      $maybe _tpcid <- mvalue
        Yes
      $nothing
        No

$# <p>
$#   ^{buttonW DELETE "Delete this ticket" (ProjectTicketR loomHash clothHash)}

<h3>Discussion

^{discuss}

[See repo JSON]