Explorer

html-ui.batch-page

description
The page /batch/<project>/<branch> of the editable html-ui: edits, adds and deletes several parts in one snapshot (html-ui.batch-script)
type
Fn(language: String, project: String, branch: String) -> @definy.service-io
expression
fn(language$990, project$0, branch$1) =>
  @html-ui.page(
    language: $990,
    title: @html-ui.text(language: $990, en: "Edit several parts", ja: "まとめて編集", eo: "Redakti plurajn partojn"),
    body: [
      @html-ui.breadcrumb(language: $990, project: $0, branch: $1),
      @html-ui.text-element(
        name: "h1",
        text: @html-ui.text(language: $990, en: "Edit several parts", ja: "まとめて編集", eo: "Redakti plurajn partojn")
      ),
      @html.element(
        name: "p",
        attributes: [],
        children: @html-ui.text-nodes(
          language: $990,
          en: [
            @html.text(
              text: "Changes, adds and deletes several parts in one snapshot (for example parts that reference each other). Enter "
            ),
            @html-ui.text-element(name: "code", text: "module.name"),
            @html.text(
              text: " and press Load to edit an existing part. An empty type or expression removes it from a loaded part, and keeps it otherwise. Signed with the key of this local definy server."
            )
          ],
          ja: [
            @html.text(
              text: "いくつものパーツを 1 つのスナップショットで変える・足す・消す (互いに参照し合うパーツなど)。今あるパーツを編集するときは "
            ),
            @html-ui.text-element(name: "code", text: "モジュール.名前"),
            @html.text(
              text: " を入れて「読み込む」を押します。読み込んだパーツの型や式を空にするとそれを消し, 読み込んでいなければ今のままにします。手元の definy サーバーの鍵で署名します。"
            )
          ],
          eo: [
            @html.text(
              text: "Ŝanĝas, aldonas kaj forigas plurajn partojn en unu momentfoto (ekzemple partojn, kiuj referencas unu la alian). Enigu "
            ),
            @html-ui.text-element(name: "code", text: "modulo.nomo"),
            @html.text(
              text: " kaj premu Ŝargi por redakti ekzistantan parton. Malplena tipo aŭ esprimo forigas ĝin el ŝargita parto, alie ĝi restas. Subskribita per la ŝlosilo de ĉi tiu loka definy-servilo."
            )
          ]
        )
      ),
      @html.element(
        name: "template",
        attributes: [{name: "id", value: "batch-part"}],
        children: [
          @html.element(
            name: "fieldset",
            attributes: [{name: "class", value: "batch-part"}],
            children: [
              @html.element(
                name: "div",
                attributes: [{name: "class", value: "batch-head"}],
                children: [
                  @html.element(
                    name: "input",
                    attributes: [
                      {name: "name", value: "part"},
                      {name: "placeholder", value: "module.name"},
                      {name: "spellcheck", value: "false"}
                    ],
                    children: []
                  ),
                  @html.text(text: " "),
                  @html.element(
                    name: "button",
                    attributes: [{name: "type", value: "button"}, {name: "class", value: "load"}],
                    children: [@html.text(text: @html-ui.text(language: $990, en: "Load", ja: "読み込む", eo: "Ŝargi"))]
                  ),
                  @html.text(text: " "),
                  @html.element(
                    name: "label",
                    attributes: [{name: "class", value: "inline"}],
                    children: [
                      @html.element(
                        name: "input",
                        attributes: [{name: "type", value: "checkbox"}, {name: "name", value: "delete"}],
                        children: []
                      ),
                      @html.text(text: " "),
                      @html.text(text: @html-ui.text(language: $990, en: "Delete", ja: "消す", eo: "Forigi"))
                    ]
                  ),
                  @html.text(text: " "),
                  @html.element(
                    name: "button",
                    attributes: [{name: "type", value: "button"}, {name: "class", value: "remove"}],
                    children: [
                      @html.text(
                        text: @html-ui.text(language: $990, en: "Remove from the list", ja: "一覧から外す", eo: "Forigi el la listo")
                      )
                    ]
                  ),
                  @html.text(text: " "),
                  @html.element(name: "span", attributes: [{name: "class", value: "status muted"}], children: [])
                ]
              ),
              @html-ui.labeled(
                label: @html-ui.text(language: $990, en: "Type", ja: "型", eo: "Tipo"),
                control: @html.element(
                  name: "textarea",
                  attributes: [{name: "name", value: "type"}, {name: "rows", value: "2"}, {name: "spellcheck", value: "false"}],
                  children: []
                )
              ),
              @html-ui.labeled(
                label: @html-ui.text(language: $990, en: "Expression", ja: "式", eo: "Esprimo"),
                control: @html.element(
                  name: "textarea",
                  attributes: [
                    {name: "name", value: "expression"},
                    {name: "rows", value: "10"},
                    {name: "spellcheck", value: "false"}
                  ],
                  children: []
                )
              ),
              @html-ui.labeled(
                label: @html-ui.text(
                  language: $990,
                  en: "English description (unchanged if empty)",
                  ja: "英語の説明 (空なら今のまま)",
                  eo: "Angla priskribo (senŝanĝa se malplena)"
                ),
                control: @html.element(name: "input", attributes: [{name: "name", value: "description"}], children: [])
              )
            ]
          )
        ]
      ),
      @html.element(
        name: "form",
        attributes: [
          {name: "id", value: "batch-form"},
          {name: "data-project", value: $0},
          {name: "data-branch", value: $1}
        ],
        children: [
          @html.element(name: "div", attributes: [{name: "id", value: "batch-parts"}], children: []),
          @html.element(
            name: "p",
            attributes: [],
            children: [
              @html.element(
                name: "button",
                attributes: [{name: "type", value: "button"}, {name: "id", value: "batch-add"}],
                children: [
                  @html.text(
                    text: @html-ui.text(language: $990, en: "Add a part", ja: "パーツを追加", eo: "Aldoni parton")
                  )
                ]
              )
            ]
          ),
          @html-ui.labeled(
            label: @html-ui.text(
              language: $990,
              en: "Snapshot message",
              ja: "スナップショットのメッセージ",
              eo: "Mesaĝo de la momentfoto"
            ),
            control: @html.element(name: "input", attributes: [{name: "name", value: "message"}], children: [])
          ),
          @html.element(
            name: "p",
            attributes: [],
            children: [
              @html.element(
                name: "button",
                attributes: [{name: "type", value: "submit"}],
                children: [
                  @html.text(
                    text: @html-ui.text(
                      language: $990,
                      en: "Take a snapshot of all",
                      ja: "まとめてスナップショットを作る",
                      eo: "Fari momentfoton de ĉio"
                    )
                  )
                ]
              )
            ]
          )
        ]
      ),
      @html.element(name: "pre", attributes: [{name: "id", value: "out"}], children: []),
      @html.element(
        name: "script",
        attributes: [{name: "type", value: "module"}],
        children: [@html.text(text: @html-ui.batch-script)]
      )
    ]
  )
visibility
public
html-ui.batch-page (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: pOW79vkfQXlzygBWvtMtqiCz02dsS0n1p9CS7wegPgs
content hash: 3kehEo_QHv-JI-BObHKGGMg4v1mHZq_9X6SCLbP7gZk