APTrust/dart

View on GitHub
ui/templates/job/metadata.html

Summary

Maintainability
Test Coverage
<h2>Bag Metadata</h2>


<div style="height: 50px;">
  <div>
    <div class="pull-right p-r-3">
      <button type="button" class="btn btn-primary" id="btnToggleHidden" style="margin-left: 25px;">{{ translate 'Show All Tags' }}</button>
    </div>
    <div class="pull-right">
      <a role="button" class="btn btn-primary" href="#JobMetadata/newTag?id={{ job.id }}" id="btnAddNewTag">{{ translate 'Add New Tag' }}</a>
    </div>
  </div>
</div>


<div>
  <form>

    {{#each form.sortedTagFileNames as |filename|}}

    <div class="card mb-3">
      <div class="card-header">
        <a data-toggle="collapse" href="#{{filename}}" aria-expanded="true" aria-controls="{{ filename }}">{{ filename }}</a>
        <div class="what-is-showing pull-right text-muted">
          <i>{{ translate "Tags with default values are not showing." }}</i>
        </div>
      </div>
      <div class="card-body collapse show" id={{ filename }}>

        {{#each (lookup ../form.tagFileNames filename) as |field| }}

          {{#if field.choices.length }}

            {{> inputSelect field = field }}

          {{else if field.looksLikeDescriptionTag }}

            {{> inputTextArea field = field }}

          {{else if field.wasAddedForJob }}

            <!-- Needs to be text with delete option. -->

            {{> inputText field = field }}

          {{else}}

            {{> inputText field = field }}

        {{/if}}

        {{/each}}

      </div>
    </div>

    {{/each}}

  </form>
</div>


<div>
  <div class="pull-left" id="btnBackDiv">
    <a class="btn btn-primary" href="#JobMetadata/back?id={{ job.id }}" role="button">&lt;&lt; Back</a>
  </div>
  <div class="pull-right" id="btnNextDiv">
    <a class="btn btn-primary" href="#JobMetadata/next?id={{ job.id }}" role="button">Next &gt;&gt;</a>
  </div>
</div>