about summary refs log tree commit diff stats
path: root/app/views/pokemon/index.html.haml
blob: 67ea2cf9bb646da10c6ccd934bc264d849d47517 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
- @trainers.each do |trainer, party, boxes|
  .trainer
    .trainer-info{ class: trainer.game }
      %h2= trainer.name
      %span.tid= trainer.display_number
    .pc-boxes
      %ul.party.pc-box
        %h3 Party
        - party.each do |p|
          %li
            %span.party-icon= image_tag p.current.icon_path
            %span.party-name= link_to p.current.nickname, p
      - boxes.each do |box|
        .pc-box
          %h3= box[:name]
          %table.pc-contents
            - box[:pokemon].each_slice(6) do |row|
              %tr
                - row.each do |p|
                  %td.pc-pokemon.pkv-has-hover
                    - if p.nil?
                      .spacer
                    - else
                      = link_to image_tag(p.current.icon_path), p
                      .pc-data.pkv-hover
                        .pc-data-name= p.current.nickname
                        .pc-data-ot
                          OT/
                          %span{ class: p.ot_gender }>= p.ot_name
- if @unaccounted.any?
  .trainer
    .trainer-info.unaccounted
      %h2 Pokémon Not In Any Game
    %ul.pokemon-list
      - @unaccounted.each do |p|
        %li.pc-pokemon.pkv-has-hover
          = link_to image_tag(p.current.icon_path), p
          .pc-data.pkv-hover
            .pc-data-name= p.current.nickname
            .pc-data-ot
              OT/
              %span{ class: p.ot_gender }>= p.ot_name