about summary refs log tree commit diff stats
path: root/app/views/pokeviewer/pokemon/show.html.haml
blob: e90148e5efc82613fdadb72eb36292087b7ff38c (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.pokemon
  .pokemon-basics
    .pokemon-species-id= "No. #{@pokemon.species_id}"
    .pokemon-species-name= @pokemon.species.name
    .pokemon-image= image_tag @pokemon.sprite_path
    .pokemon-name= @pokemon.revisions.last.nickname
    .pokemon-ot
      OT/
      %span{ class: @pokemon.ot_gender }>= @pokemon.ot_name
    .pokemon-id= "ID/#{@pokemon.display_ot_number}"
    .pokemon-level= "Lv. #{@pokemon.revisions.last.level}"
  .pokemon-column
    .pokemon-stats
      .pd-details Stats
      %table.pd-contents
        %tr
          %th HP
          %th
            Attack
            - if @pokemon.nature_benefits?(:attack)
              %span.nature-benefit +
            - if @pokemon.nature_hinders?(:attack)
              %span.nature-hinder -
          %th
            Defense
            - if @pokemon.nature_benefits?(:defense)
              %span.nature-benefit +
            - if @pokemon.nature_hinders?(:defense)
              %span.nature-hinder -
          %th
            Sp. Atk
            - if @pokemon.nature_benefits?(:special_attack)
              %span.nature-benefit +
            - if @pokemon.nature_hinders?(:special_attack)
              %span.nature-hinder -
          %th
            Sp. Def
            - if @pokemon.nature_benefits?(:special_defense)
              %span.nature-benefit +
            - if @pokemon.nature_hinders?(:special_defense)
              %span.nature-hinder -
          %th
            Speed
            - if @pokemon.nature_benefits?(:speed)
              %span.nature-benefit +
            - if @pokemon.nature_hinders?(:speed)
              %span.nature-hinder -
        %tr
          %td= @pokemon.revisions.last.hp
          %td= @pokemon.revisions.last.attack
          %td= @pokemon.revisions.last.defense
          %td= @pokemon.revisions.last.special_attack
          %td= @pokemon.revisions.last.special_defense
          %td= @pokemon.revisions.last.speed
    .pokemon-row
      .pokemon-moves
        .pd-details Moves
        %ul
          %li= @pokemon.revisions.last.move_1.name
          - if @pokemon.revisions.last.move_2
            %li= @pokemon.revisions.last.move_2.name
          - else
            %li -
          - if @pokemon.revisions.last.move_3
            %li= @pokemon.revisions.last.move_3.name
          - else
            %li -
          - if @pokemon.revisions.last.move_4
            %li= @pokemon.revisions.last.move_4.name
          - else
            %li -
      .pokemon-memo
        .pd-details Trainer Memo
        .pd-contents
          %p
            %span.pokemon-nature<= @pokemon.nature.titlecase
            nature.
          %p= @pokemon.display_met
  .pokemon-contest
    .pd-details Contest Condition
    = condition_diagram @pokemon.revisions.last
  .pokemon-ribbons
    .pd-details Ribbons
    %ul
      - @pokemon.revisions.last.ribbons.each do |ribbon|
        %li.pkv-has-hover
          = image_tag("pokeviewer/ribbons/#{ribbon[:filename]}")
          .pkv-hover
            .pc-data-name= ribbon[:name]
            = ribbon[:description]