hummingbird-me/hummingbird

View on GitHub
frontend/app/templates/modals/edit-manga.hbs

Summary

Maintainability
Test Coverage
<div class="edit-series-modal">
  {{#bootstrap-modal action="close"}}
    <div class="modal-header">
      <h4 class="modal-title">Edit Manga</h4>
      <button class="btn btn-primary" {{action "save"}} {{bind-attr disabled=canSave}}>
        {{#if model.isSaving}}<i class="fa fa-spin fa-spinner"></i>{{/if}}
        Request Edits
      </button>
    </div>
    <div class="modal-body">
      <div class="row">
        {{#if model.pendingEdits}}
          <div class="col-sm-12">
            <div class="alert alert-info">
              You have
              {{pluralize model.pendingEdits "pending edit" "pending edits"}}
              for this manga.
            </div>
          </div>
        {{/if}}

        <div class="col-sm-12">
          <div class="form-group">
            <label>Synopsis</label>
            {{textarea value=model.synopsis rows=3 class="form-control"}}
          </div>
        </div>
        <div class="form-row">
          <div class="col-sm-6">
            <label data-tooltip="Direct link to your replacement image.">
              Poster Image URL
              <i class="fa fa-question-circle"></i>
            </label>
            {{input value=model.posterImage class="form-control"}}
          </div>
          <div class="col-sm-6">
            <label data-tooltip="Direct link to your replacement image. Preferable images are desktop wallpapers at least 1500px wide.">Cover Image URL</label>
            <i class="fa fa-question-circle"></i>
            {{input value=model.coverImage class="form-control"}}
          </div>
        </div>
        <div class="form-row">
          <div class="col-sm-3">
            <label>Chapter Count</label>
            {{input type="number" value=model.chapterCount class="form-control"}}
          </div>
          <div class="col-sm-3">
            <label>Volume Count</label>
            {{input type="number" value=model.volumeCount class="form-control"}}
          </div>
          <div class="col-sm-3">
            <label data-tooltip="Distance in pixels that you want to move the visible part of the cover photo up.">Cover Image Top Offset</label>
            <i class="fa fa-question-circle"></i>
            {{input type="number" value=model.coverImageTopOffset class="form-control"}}
          </div>
        </div>

        {{! Comment area }}
        <div class="col-sm-12">
          <div class="form-group">
            <label data-tooltip="Let the reviewer know why this edit is awesome">Leave a comment</label>
            <i class="fa fa-question-circle"></i>
            {{textarea value=comment rows=3 maxlength="255" class="form-control"}}
          </div>
        </div>
      </div>
    </div>
  {{/bootstrap-modal}}
</div>