diff options
Diffstat (limited to 'app/views/revisions/_revision.html.haml')
-rw-r--r-- | app/views/revisions/_revision.html.haml | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/app/views/revisions/_revision.html.haml b/app/views/revisions/_revision.html.haml new file mode 100644 index 0000000..747c746 --- /dev/null +++ b/app/views/revisions/_revision.html.haml | |||
@@ -0,0 +1,135 @@ | |||
1 | .pokemon{ class: (not @revision.pokemon.trainer.nil?) && "in-#{@revision.pokemon.trainer.game}" } | ||
2 | .pokemon-basics | ||
3 | .pokemon-nameline | ||
4 | = image_tag(@revision.pokemon.pokeball_icon_path, class: "pokemon-ball") | ||
5 | %span.pokemon-name= link_to_unless_current @revision.nickname, @revision.pokemon, target: "_blank" | ||
6 | %span.pokemon-gender{ class: @revision.pokemon.gender }= @revision.pokemon.gender_symbol | ||
7 | .pokemon-level= "Lv. #{@revision.level}" | ||
8 | .pokemon-image | ||
9 | .pokemon-image-wrap | ||
10 | = image_tag @revision.sprite_path, class: "pokemon-sprite" | ||
11 | - if @revision.pokemon.shiny? | ||
12 | = image_tag "ShinyIVStar.png", class: "pkv-shiny-star" | ||
13 | - if @revision.item.nil? | ||
14 | .pokemon-item-label Item | ||
15 | .pokemon-item None | ||
16 | - else | ||
17 | .pokemon-item-label.with-item Item | ||
18 | .pokemon-item.pkv-has-hover | ||
19 | = image_tag(@revision.item.icon_path) | ||
20 | = @revision.item.name | ||
21 | .pkv-hover | ||
22 | .pc-data-name= @revision.item.name | ||
23 | - if @revision.item.tm? | ||
24 | .pc-move-name= @revision.item.move.name | ||
25 | = @revision.item.description(@revision.pokemon.trainer.game) | ||
26 | .pokemon-tab.pokemon-details | ||
27 | %table | ||
28 | %tr | ||
29 | %th Pokédex No. | ||
30 | %td | ||
31 | .table-bubble.tb-top= @revision.species_id | ||
32 | %tr | ||
33 | %th Name | ||
34 | %td | ||
35 | .table-bubble= @revision.species.name | ||
36 | %tr | ||
37 | %th Type | ||
38 | %td | ||
39 | .table-bubble | ||
40 | = image_for_type @revision.species.type_1 | ||
41 | - if @revision.species.type_2 | ||
42 | = image_for_type @revision.species.type_2 | ||
43 | %tr | ||
44 | %th OT | ||
45 | %td.ot-gender{ class: @revision.pokemon.ot_gender } | ||
46 | .table-bubble= @revision.pokemon.ot_name | ||
47 | %tr | ||
48 | %th ID No. | ||
49 | %td | ||
50 | .table-bubble.tb-bottom= @revision.pokemon.display_ot_number | ||
51 | %tr | ||
52 | %th | ||
53 | %td | ||
54 | .pokemon-met-label Trainer Memo | ||
55 | .pokemon-description= display_met @revision.pokemon | ||
56 | .pokemon-tab.pokemon-stats | ||
57 | %table | ||
58 | %tr | ||
59 | %th HP | ||
60 | %td | ||
61 | .table-bubble.tb-top= @revision.hp | ||
62 | %tr | ||
63 | %th | ||
64 | Attack | ||
65 | - if @revision.pokemon.nature_benefits?(:attack) | ||
66 | %span.nature-benefit + | ||
67 | - if @revision.pokemon.nature_hinders?(:attack) | ||
68 | %span.nature-hinder - | ||
69 | %td | ||
70 | .table-bubble= @revision.attack | ||
71 | %tr | ||
72 | %th | ||
73 | Defense | ||
74 | - if @revision.pokemon.nature_benefits?(:defense) | ||
75 | %span.nature-benefit + | ||
76 | - if @revision.pokemon.nature_hinders?(:defense) | ||
77 | %span.nature-hinder - | ||
78 | %td | ||
79 | .table-bubble= @revision.defense | ||
80 | %tr | ||
81 | %th | ||
82 | Sp. Atk | ||
83 | - if @revision.pokemon.nature_benefits?(:special_attack) | ||
84 | %span.nature-benefit + | ||
85 | - if @revision.pokemon.nature_hinders?(:special_attack) | ||
86 | %span.nature-hinder - | ||
87 | %td | ||
88 | .table-bubble= @revision.special_attack | ||
89 | %tr | ||
90 | %th | ||
91 | Sp. Def | ||
92 | - if @revision.pokemon.nature_benefits?(:special_defense) | ||
93 | %span.nature-benefit + | ||
94 | - if @revision.pokemon.nature_hinders?(:special_defense) | ||
95 | %span.nature-hinder - | ||
96 | %td | ||
97 | .table-bubble= @revision.special_defense | ||
98 | %tr | ||
99 | %th | ||
100 | Speed | ||
101 | - if @revision.pokemon.nature_benefits?(:speed) | ||
102 | %span.nature-benefit + | ||
103 | - if @revision.pokemon.nature_hinders?(:speed) | ||
104 | %span.nature-hinder - | ||
105 | %td | ||
106 | .table-bubble.tb-bottom= @revision.speed | ||
107 | %tr.pokemon-nature-label | ||
108 | %th{ colspan: 2 } Nature | ||
109 | %tr | ||
110 | %th | ||
111 | %td | ||
112 | .tb-only= @revision.pokemon.nature_text | ||
113 | %tr | ||
114 | %th{ colspan: 2 } Ability | ||
115 | %tr | ||
116 | %th | ||
117 | %td | ||
118 | .tb-only.pkv-has-hover | ||
119 | = @revision.ability.name | ||
120 | .pkv-hover | ||
121 | .pc-data-name= @revision.ability.name | ||
122 | = @revision.ability.description | ||
123 | .pokemon-tab.pokemon-moves | ||
124 | %table | ||
125 | - (1..4).each do |i| | ||
126 | = move_details @revision, i | ||
127 | .pokemon-tab.pokemon-contest= condition_diagram @revision | ||
128 | .pokemon-tab.pokemon-ribbons | ||
129 | %ul | ||
130 | - @revision.ribbons.each do |ribbon| | ||
131 | %li.pkv-has-hover | ||
132 | = image_tag("ribbons/#{ribbon[:filename]}") | ||
133 | .pkv-hover | ||
134 | .pc-data-name= ribbon[:name] | ||
135 | = ribbon[:description] | ||