jcbantuelle/dominion-meteor

View on GitHub
app/game/client/templates/choose_cards.html

Summary

Maintainability
Test Coverage
<template name="choose_cards">
  <strong>{{{instructions}}}</strong>
  <form id="turn-event">
    <div class="checkbox">
      {{#each cards}}
        <div class="form-check form-check-inline">
          <input type="checkbox" class="form-check-input" id="card_{{@index}}" value="{{@index}}" />
          {{#if ../game_cards}}
            <label class="{{top_card.types}} choose-card form-check-label" for="card_{{@index}}">{{top_card.name}}</label>
            <div class="card-tooltip">
              <img src="{{static_image top_card.image}}" width="220" height="341" />
            </div>
          {{else}}
            <label class="{{types}} choose-card form-check-label" for="card_{{@index}}">{{name}}</label>{{#if source}} ({{source}}){{/if}}
            <div class="card-tooltip">
              {{#if wide}}
                <img src="{{static_image image}}" width="341" height="220" />
              {{else}}
                {{#if trashing_token}}
                  <img src="{{static_image image}}" width="117" height="116" />
                {{else}}
                  <img src="{{static_image image}}" width="220" height="341" />
                {{/if}}
              {{/if}}
            </div>
          {{/if}}
        </div>
      {{/each}}
    </div>
    <button type="submit" id="turn-event-button" class="btn btn-primary btn-xs">Choose</button>
  </form>
</template>