Explorer

html-ui.branch-item

description
A branch in the list of the home page: the project (a link to its page), the branch, its status (status, '' for main), the number of snapshots, the account that created it, and whether it is the account of this server (me; '' when not editable)
type
Fn(
  language: String,
  project: String,
  branch: String,
  creator: String,
  creator_name: String,
  count: Number,
  me: String,
  status: String
) -> @html.node
expression
fn(language$990, project$0, branch$1, creator$2, creator_name$5, count$3, me$4, status$6) =>
  @html.element(
    name: "li",
    attributes: [],
    children: @core.list-concat(
      left: [
        @html.element(
          name: "a",
          attributes: [{name: "href", value: @core.string-concat(left: "/p/", right: $0)}],
          children: [@html.text(text: $0)]
        ),
        @html.text(text: " / "),
        @html.element(
          name: "a",
          attributes: [{name: "href", value: @core.string-join(items: ["/p/", $0, "/", $1], separator: "")}],
          children: [@html.text(text: $1)]
        )
      ],
      right: @core.list-concat(
        left: @html-ui.branch-status-badge(language: $990, status: $6),
        right: @core.list-concat(
          left: [
            @html.text(text: " "),
            @html.element(
              name: "span",
              attributes: [{name: "class", value: "muted"}],
              children: [
                @html.text(
                  text: @core.string-join(
                    items: [
                      "· ",
                      @std.number-to-string(value: $3),
                      @html-ui.text(
                        language: $990,
                        en: " snapshots · by ",
                        ja: " スナップショット · 作成 ",
                        eo: " momentfotoj · de "
                      )
                    ],
                    separator: ""
                  )
                )
              ]
            ),
            @html-ui.account-link(account_id: $2, name: $5)
          ],
          right: match @core.and(left: @core.not(value: @core.equal(left: $4, right: "")), right: @core.equal(left: $2, right: $4)) {
            true =>
              [
                @html.text(text: " "),
                @html.element(
                  name: "b",
                  attributes: [{name: "class", value: "mine"}],
                  children: [@html.text(text: @html-ui.text(language: $990, en: "yours", ja: "あなた", eo: "via"))]
                )
              ],
            false =>
              []
          }
        )
      )
    )
  )
visibility
public
html-ui.branch-item (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: rec4S634erd1seq-uGH3wIh5Af2z6FPemSM1ArVuX9g
content hash: OwrJ9q9A6nAI3PvzMu4AcoMkM1Dd4AQ-C8DtPNv2HTQ