@@ -1,16 +1,8 @@ |
||
1 |
-// Color Swatch |
|
1 |
+// Avalanche Theme Stylesheet |
|
2 |
+// ------------------------------------------------ |
|
2 | 3 |
|
3 |
-@black: #202020; |
|
4 |
-@dark-gray: #1D1D26; |
|
5 |
-@medium-gray: #737389; |
|
6 |
-@ligh-gray: #D4D4DE; |
|
7 |
-@red: #F26C63; |
|
8 |
-@blue: #55B3DA; |
|
9 |
-@yellow: #F2CB63; |
|
10 |
-@green: #92BC64; |
|
11 |
-@white: white; |
|
4 |
+@import "colors.less"; |
|
12 | 5 |
|
13 |
-// Avalanche Theme |
|
14 | 6 |
|
15 | 7 |
html, body { |
16 | 8 |
height: 100%; |
@@ -27,13 +19,37 @@ html, body { |
||
27 | 19 |
|
28 | 20 |
|
29 | 21 |
.top-container { |
30 |
- margin-top: 85px |
|
22 |
+ margin-top: 85px; |
|
23 |
+} |
|
24 |
+ |
|
25 |
+.container-bg { |
|
26 |
+ background-color: @bg-ligh-gray; |
|
27 |
+ margin-top: 0px; |
|
28 |
+ min-height: 500px; |
|
29 |
+ padding-bottom: 20px; |
|
30 |
+} |
|
31 |
+ |
|
32 |
+.top-container.container-bg { |
|
33 |
+ margin-top: 58px; |
|
34 |
+} |
|
35 |
+ |
|
36 |
+.container-tabs { |
|
37 |
+ margin-top: -38px; |
|
38 |
+} |
|
39 |
+ |
|
40 |
+.container-pre-tabs { |
|
41 |
+ padding-bottom: 56px; |
|
42 |
+ border-bottom: 1px solid #ddd; |
|
43 |
+} |
|
44 |
+ |
|
45 |
+.container-last { |
|
46 |
+ margin-bottom: 60px; |
|
31 | 47 |
} |
32 | 48 |
|
33 | 49 |
.page-header { |
34 | 50 |
padding-bottom: 0; |
35 | 51 |
margin: 20px 0 30px; |
36 |
- border-bottom: 2px solid @ligh-gray; |
|
52 |
+ border-bottom: 2px solid @hr-dark; |
|
37 | 53 |
} |
38 | 54 |
|
39 | 55 |
.page-header h1 { |
@@ -76,6 +92,20 @@ h2 { |
||
76 | 92 |
font-weight: 200; |
77 | 93 |
} |
78 | 94 |
|
95 |
+h4 { |
|
96 |
+ font-family: Avenir-MediumOblique; |
|
97 |
+ font-size: 18px; |
|
98 |
+ color: #1D1D26; |
|
99 |
+ line-height: 25px; |
|
100 |
+ text-transform: uppercase; |
|
101 |
+ font-style: italic; |
|
102 |
+ font-weight: 200; |
|
103 |
+} |
|
104 |
+ |
|
105 |
+.img-circle { |
|
106 |
+ border-radius: 360px; |
|
107 |
+} |
|
108 |
+ |
|
79 | 109 |
.thumbnail { |
80 | 110 |
display: block; |
81 | 111 |
line-height: 20px; |
@@ -118,6 +148,17 @@ h2 { |
||
118 | 148 |
color: black; |
119 | 149 |
} |
120 | 150 |
|
151 |
+.thumbnail-content h4 { |
|
152 |
+ font-family: Avenir-MediumOblique; |
|
153 |
+ font-size: 18px; |
|
154 |
+ color: #1D1D26; |
|
155 |
+ line-height: 25px; |
|
156 |
+ text-transform: none; |
|
157 |
+ font-style: italic; |
|
158 |
+ font-weight: 200; |
|
159 |
+ text-align: center; |
|
160 |
+} |
|
161 |
+ |
|
121 | 162 |
.thumbnail h3 a:hover, .box h3 a:hover { |
122 | 163 |
text-decoration: underline; |
123 | 164 |
} |
@@ -133,6 +174,10 @@ h2 { |
||
133 | 174 |
padding: 4px; |
134 | 175 |
} |
135 | 176 |
|
177 |
+.thumbnail-line-top { |
|
178 |
+ border-top: @theme-border; |
|
179 |
+} |
|
180 |
+ |
|
136 | 181 |
.box .box-content { |
137 | 182 |
padding-right: 4px; |
138 | 183 |
margin-left: -26px; |
@@ -155,61 +200,6 @@ h2 { |
||
155 | 200 |
} |
156 | 201 |
|
157 | 202 |
|
158 |
- |
|
159 |
-// Mission Status |
|
160 |
- |
|
161 |
-.mission-status { |
|
162 |
- padding-left: 6px; |
|
163 |
- padding-right: 6px; |
|
164 |
- font-family: Avenir-Oblique; |
|
165 |
- font-size: 18px; |
|
166 |
- color: @black; |
|
167 |
- line-height: 28px; |
|
168 |
-} |
|
169 |
- |
|
170 |
-.page-header-type .mission-status { |
|
171 |
- margin-top: 12px; |
|
172 |
-} |
|
173 |
- |
|
174 |
-.status-planning { |
|
175 |
- background-color: @ligh-gray; |
|
176 |
-} |
|
177 |
- |
|
178 |
-.status-launched { |
|
179 |
- background-color: @blue; |
|
180 |
-} |
|
181 |
- |
|
182 |
-.status-completed { |
|
183 |
- background-color: @green; |
|
184 |
-} |
|
185 |
- |
|
186 |
-.status-failed { |
|
187 |
- background-color: @red; |
|
188 |
-} |
|
189 |
- |
|
190 |
-.mission-counter { |
|
191 |
- font-family: Avenir-Medium; |
|
192 |
- font-size: 18px; |
|
193 |
- color: @black; |
|
194 |
- line-height: 28px; |
|
195 |
- padding: 0px; |
|
196 |
-} |
|
197 |
- |
|
198 |
-.mission-counter i { |
|
199 |
- font-size: 28px; |
|
200 |
-} |
|
201 |
- |
|
202 |
-.mission-counter span { |
|
203 |
- margin-bottom: 3px; |
|
204 |
-} |
|
205 |
- |
|
206 |
-.mission-counter.center_position { |
|
207 |
- width: 30%; |
|
208 |
- margin-left: auto; |
|
209 |
- margin-right: auto; |
|
210 |
- text-align: center; |
|
211 |
-} |
|
212 |
- |
|
213 | 203 |
// Buttons |
214 | 204 |
|
215 | 205 |
.btn.btn-success { |
@@ -226,8 +216,8 @@ h2 { |
||
226 | 216 |
cursor: pointer; |
227 | 217 |
color: #333333; |
228 | 218 |
background-color: transparent; |
229 |
- border: 2px solid #cccccc; |
|
230 |
- border-bottom-color: #b3b3b3; |
|
219 |
+ border: 2px solid @black; |
|
220 |
+ border-bottom-color: @black; |
|
231 | 221 |
border-radius: 4px; |
232 | 222 |
text-shadow: none; |
233 | 223 |
/* Create Mission: */ |
@@ -237,6 +227,37 @@ h2 { |
||
237 | 227 |
text-transform: none; |
238 | 228 |
} |
239 | 229 |
|
230 |
+// Progress Bar |
|
231 |
+ |
|
232 |
+.progress-success.progress-striped .bar, .progress-striped .bar-success { |
|
233 |
+ background-color: #92BC64; |
|
234 |
+} |
|
235 |
+ |
|
236 |
+.bar { |
|
237 |
+ |
|
238 |
+} |
|
239 |
+ |
|
240 |
+.progress { |
|
241 |
+ background-color: white; |
|
242 |
+ border-radius: 5px; |
|
243 |
+ height: 33px; |
|
244 |
+} |
|
245 |
+ |
|
246 |
+.progress-bar .percentage { |
|
247 |
+ margin-top: -51px; |
|
248 |
+ font-family: Avenir-Medium; |
|
249 |
+ font-size: 24px; |
|
250 |
+ color: #000000; |
|
251 |
+ line-height: 33px; |
|
252 |
+} |
|
253 |
+ |
|
254 |
+.progress-bar-mission-stats { |
|
255 |
+ width: 70%; |
|
256 |
+ margin-left: auto; |
|
257 |
+ margin-right: auto; |
|
258 |
+} |
|
259 |
+ |
|
260 |
+ |
|
240 | 261 |
// Footer |
241 | 262 |
|
242 | 263 |
footer { |
@@ -333,4 +354,20 @@ footer .copyright { |
||
333 | 354 |
|
334 | 355 |
footer hr { |
335 | 356 |
margin-bottom: 10px; |
357 |
+} |
|
358 |
+ |
|
359 |
+// Hacks |
|
360 |
+ |
|
361 |
+.videoWrapper { |
|
362 |
+ position: relative; |
|
363 |
+ padding-bottom: 56.25%; /* 16:9 */ |
|
364 |
+ padding-top: 25px; |
|
365 |
+ height: 0; |
|
366 |
+} |
|
367 |
+.videoWrapper iframe { |
|
368 |
+ position: absolute; |
|
369 |
+ top: 0; |
|
370 |
+ left: 0; |
|
371 |
+ width: 100%; |
|
372 |
+ height: 100%; |
|
336 | 373 |
} |
@@ -0,0 +1,20 @@ |
||
1 |
+// Color Swatch |
|
2 |
+// ----------------------- |
|
3 |
+ |
|
4 |
+@black: #202020; |
|
5 |
+@dark-gray: #1D1D26; |
|
6 |
+@medium-gray: #737389; |
|
7 |
+@ligh-gray: #D4D4DE; |
|
8 |
+@red: #F26C63; |
|
9 |
+@blue: #55B3DA; |
|
10 |
+@yellow: #F2CB63; |
|
11 |
+@green: #92BC64; |
|
12 |
+@white: white; |
|
13 |
+ |
|
14 |
+@bg-ligh-gray: #F3F3F3; |
|
15 |
+@hr-dark: @dark-gray; |
|
16 |
+ |
|
17 |
+@border-dark: @dark-gray; |
|
18 |
+@border-width: 2px; |
|
19 |
+ |
|
20 |
+@theme-border: 2px solid @ligh-gray; |
@@ -0,0 +1,232 @@ |
||
1 |
+// Mission Stylesheet |
|
2 |
+//------------------------------------ |
|
3 |
+ |
|
4 |
+ |
|
5 |
+// Mission Status |
|
6 |
+ |
|
7 |
+@import "colors.less"; |
|
8 |
+ |
|
9 |
+.mission-status { |
|
10 |
+ padding-left: 6px; |
|
11 |
+ padding-right: 6px; |
|
12 |
+ font-family: Avenir-Oblique; |
|
13 |
+ font-size: 18px; |
|
14 |
+ color: @black; |
|
15 |
+ line-height: 28px; |
|
16 |
+} |
|
17 |
+ |
|
18 |
+.page-header-type .mission-status { |
|
19 |
+ margin-top: 12px; |
|
20 |
+} |
|
21 |
+ |
|
22 |
+.status-planning { |
|
23 |
+ background-color: @ligh-gray; |
|
24 |
+} |
|
25 |
+ |
|
26 |
+.status-launched { |
|
27 |
+ background-color: @blue; |
|
28 |
+} |
|
29 |
+ |
|
30 |
+.status-completed { |
|
31 |
+ background-color: @green; |
|
32 |
+} |
|
33 |
+ |
|
34 |
+.status-failed { |
|
35 |
+ background-color: @red; |
|
36 |
+} |
|
37 |
+ |
|
38 |
+.mission-counter { |
|
39 |
+ font-family: Avenir-Medium; |
|
40 |
+ font-size: 18px; |
|
41 |
+ color: @black; |
|
42 |
+ line-height: 28px; |
|
43 |
+ padding: 0px; |
|
44 |
+} |
|
45 |
+ |
|
46 |
+.mission-counter i { |
|
47 |
+ font-size: 28px; |
|
48 |
+} |
|
49 |
+ |
|
50 |
+.mission-counter span { |
|
51 |
+ margin-bottom: 3px; |
|
52 |
+} |
|
53 |
+ |
|
54 |
+.mission-counter.center_position { |
|
55 |
+ width: 30%; |
|
56 |
+ margin-left: auto; |
|
57 |
+ margin-right: auto; |
|
58 |
+ text-align: center; |
|
59 |
+} |
|
60 |
+ |
|
61 |
+// Mission Stats |
|
62 |
+ |
|
63 |
+.mission-stats { |
|
64 |
+ text-align: center; |
|
65 |
+} |
|
66 |
+ |
|
67 |
+.mission-timer { |
|
68 |
+ font-family: Avenir-Black; |
|
69 |
+ color: #0F2105; |
|
70 |
+ |
|
71 |
+} |
|
72 |
+ |
|
73 |
+.timer-large { |
|
74 |
+ font-size: 144px; |
|
75 |
+ line-height:144px; |
|
76 |
+} |
|
77 |
+ |
|
78 |
+.timer-legend { |
|
79 |
+ margin-top: -20px; |
|
80 |
+ margin-bottom: 25px; |
|
81 |
+} |
|
82 |
+ |
|
83 |
+.mission-completion-stats { |
|
84 |
+ width: 50%; |
|
85 |
+ margin-top: 30px; |
|
86 |
+ margin-left: auto; |
|
87 |
+ margin-right: auto; |
|
88 |
+} |
|
89 |
+ |
|
90 |
+.mission-director-stats { |
|
91 |
+ width: 50%; |
|
92 |
+ margin-top: 100px; |
|
93 |
+ margin-left: auto; |
|
94 |
+ margin-right: auto; |
|
95 |
+} |
|
96 |
+ |
|
97 |
+.mission-director-text { |
|
98 |
+ float: left; |
|
99 |
+ text-align: left; |
|
100 |
+ margin-top: 10px; |
|
101 |
+ margin-left: 15px; |
|
102 |
+} |
|
103 |
+ |
|
104 |
+.mission-director-avatar { |
|
105 |
+ float: left; |
|
106 |
+} |
|
107 |
+ |
|
108 |
+.mission-director-legend { |
|
109 |
+ font-family: Avenir-Medium; |
|
110 |
+ font-size: 18px; |
|
111 |
+ color: #0F2105; |
|
112 |
+ line-height: 20px; |
|
113 |
+ font-style: italic; |
|
114 |
+ font-weight: 200; |
|
115 |
+ text-transform: uppercase; |
|
116 |
+} |
|
117 |
+ |
|
118 |
+.mission-director-name { |
|
119 |
+ font-family: Avenir-Light; |
|
120 |
+ font-size: 18px; |
|
121 |
+ color: #1D1D26; |
|
122 |
+ line-height: 25px; |
|
123 |
+} |
|
124 |
+ |
|
125 |
+.mission-call-to-action { |
|
126 |
+ text-align: center; |
|
127 |
+ margin-top: 35px; |
|
128 |
+} |
|
129 |
+ |
|
130 |
+.mission-briefing { |
|
131 |
+ font-family: Avenir-Light; |
|
132 |
+ font-size: 18px; |
|
133 |
+ color: #1D1D26; |
|
134 |
+ line-height: 25px; |
|
135 |
+} |
|
136 |
+ |
|
137 |
+// Rewards |
|
138 |
+ |
|
139 |
+.rewards { |
|
140 |
+ margin-left: 0px; |
|
141 |
+} |
|
142 |
+ |
|
143 |
+.rewards li { |
|
144 |
+ list-style: none; |
|
145 |
+ background-color: @bg-ligh-gray; |
|
146 |
+ padding: 8px; |
|
147 |
+ font-family: Avenir-Light; |
|
148 |
+ font-size: 18px; |
|
149 |
+ color: #3C3F47; |
|
150 |
+ line-height: 25px; |
|
151 |
+} |
|
152 |
+ |
|
153 |
+.reward-badge { |
|
154 |
+ text-align: center; |
|
155 |
+ margin-bottom: 15px; |
|
156 |
+} |
|
157 |
+ |
|
158 |
+.reward-badge p { |
|
159 |
+ margin-top: -25px; |
|
160 |
+} |
|
161 |
+ |
|
162 |
+.reward-agent-title { |
|
163 |
+ font-family: Avenir-MediumOblique; |
|
164 |
+ font-size: 14px; |
|
165 |
+ color: #3C3F47; |
|
166 |
+ line-height: 19px; |
|
167 |
+} |
|
168 |
+ |
|
169 |
+.reward-agent-role { |
|
170 |
+ /* Agentes: Designer de: */ |
|
171 |
+ font-family: Avenir-Light; |
|
172 |
+ font-size: 14px; |
|
173 |
+ color: @blue; |
|
174 |
+ line-height: 19px; |
|
175 |
+} |
|
176 |
+ |
|
177 |
+// Steps |
|
178 |
+ |
|
179 |
+.thumbnail-task { |
|
180 |
+ padding-left: 8px; |
|
181 |
+ padding-right: 8px; |
|
182 |
+ border-top: @theme-border; |
|
183 |
+ border-bottom: @theme-border; |
|
184 |
+ margin-bottom: -2px; |
|
185 |
+} |
|
186 |
+ |
|
187 |
+.thumbnail-task p { |
|
188 |
+ height: 44px; |
|
189 |
+ margin-bottom: 4px; |
|
190 |
+} |
|
191 |
+ |
|
192 |
+.task-number { |
|
193 |
+ font-family: Avenir-Black; |
|
194 |
+ font-size: 36px; |
|
195 |
+ color: #000000; |
|
196 |
+ line-height: 49px; |
|
197 |
+ float: left; |
|
198 |
+} |
|
199 |
+ |
|
200 |
+.task-text { |
|
201 |
+ font-family: Avenir-Medium; |
|
202 |
+ font-size: 14px; |
|
203 |
+ color: #000000; |
|
204 |
+ line-height: 19px; |
|
205 |
+ float: left; |
|
206 |
+ padding-top: 15px; |
|
207 |
+ padding-left: 5px; |
|
208 |
+} |
|
209 |
+ |
|
210 |
+.task-icon { |
|
211 |
+ font-size: 24px; |
|
212 |
+ float: right; |
|
213 |
+ padding-top: 13px; |
|
214 |
+} |
|
215 |
+ |
|
216 |
+.thumbnail-task .task-show-all { |
|
217 |
+ text-align: center; |
|
218 |
+ font-family: Avenir-Medium; |
|
219 |
+ font-size: 14px; |
|
220 |
+ color: #000000; |
|
221 |
+ line-height: 19px; |
|
222 |
+ height: 20px; |
|
223 |
+ padding-top: 12px; |
|
224 |
+ padding-bottom: 12px; |
|
225 |
+} |
|
226 |
+ |
|
227 |
+.thumbnail-open-agent-slot { |
|
228 |
+ background-color: @green; |
|
229 |
+ height: 30px; |
|
230 |
+ text-align: center; |
|
231 |
+ padding: 15px; |
|
232 |
+} |
@@ -1,3 +0,0 @@ |
||
1 |
-// Place all the styles related to the missions controller here. |
|
2 |
-// They will automatically be included in application.css. |
|
3 |
-// You can use Sass (SCSS) here: http://sass-lang.com/ |
@@ -1,5 +1,5 @@ |
||
1 | 1 |
class MissionsController < ApplicationController |
2 |
- before_action :set_mission, only: [:show, :edit, :update, :destroy] |
|
2 |
+ before_action :set_mission, only: [:show, :show_agents, :edit, :update, :destroy] |
|
3 | 3 |
|
4 | 4 |
# GET /missions |
5 | 5 |
# GET /missions.json |
@@ -13,6 +13,11 @@ class MissionsController < ApplicationController |
||
13 | 13 |
# GET /missions/1.json |
14 | 14 |
def show |
15 | 15 |
end |
16 |
+ |
|
17 |
+ # GET /missions/1 |
|
18 |
+ # GET /missions/1.json |
|
19 |
+ def show_agents |
|
20 |
+ end |
|
16 | 21 |
|
17 | 22 |
# GET /missions/new |
18 | 23 |
def new |
@@ -15,16 +15,18 @@ module MissionsHelper |
||
15 | 15 |
end |
16 | 16 |
end |
17 | 17 |
|
18 |
- def mission_agent_counter(mission) |
|
19 |
- content_tag(:div, class: 'mission-counter pull-left') do |
|
20 |
- #content_tag(:i, '', class: 'icon-agent') |
|
18 |
+ |
|
19 |
+ # Mission Stats Helpers |
|
20 |
+ # Position can be pull-left, pull-right, center_position |
|
21 |
+ |
|
22 |
+ def mission_agent_counter(mission, position = 'pull-left') |
|
23 |
+ content_tag(:div, class: 'mission-counter ' + position) do |
|
21 | 24 |
'<i class="icon-agent"></i><span>'.html_safe + mission.agent_position_count.to_s + '/' + mission.confirmed_agent_count.to_s + '</span>'.html_safe |
22 | 25 |
end |
23 | 26 |
end |
24 | 27 |
|
25 |
- def mission_steps_counter(mission) |
|
26 |
- content_tag(:div, class: 'mission-counter center_position') do |
|
27 |
- #content_tag(:i, '', class: 'icon-agent') |
|
28 |
+ def mission_steps_counter(mission, position = 'center_position') |
|
29 |
+ content_tag(:div, class: 'mission-counter '+ position) do |
|
28 | 30 |
'<i class="icon-task"></i><span>'.html_safe + mission.agent_position_count.to_s + '/' + mission.confirmed_agent_count.to_s + '</span>'.html_safe |
29 | 31 |
end |
30 | 32 |
end |
@@ -1,44 +1,58 @@ |
||
1 | 1 |
<% title (t "admin_panel.contact_messages") + " - " + @config.website_name %> |
2 |
-<div class="row"> |
|
3 |
- <%= render 'admin_panel/sidebar_nav' %> |
|
4 |
- <div class="span9"> |
|
5 |
- <div class="page-header"> |
|
6 |
- <h1> |
|
7 |
- <i class="fa fa-envelope"></i> |
|
8 |
- <%= t "admin_panel.contact_messages" %> |
|
9 |
- </h1> |
|
10 |
- </div> |
|
11 |
- <%= bootstrap_flash %> |
|
12 |
- <% @contact_messages.each do |msg| %> |
|
13 |
- <div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;"> |
|
14 |
- <div class="media-body pull-left"> |
|
15 |
- <h4 class="media-heading" style="margin-bottom: 0px;"> |
|
16 |
- <%= ('<span class="badge badge-warning" style="margin-top: -11px">' + (t "admin_panel.new") + '</span>').html_safe if msg.unread %> |
|
17 |
- <%= link_to msg.title, show_contact_message_path(msg) %> |
|
2 |
+ |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <div class="row"> |
|
11 |
+ <%= render 'admin_panel/sidebar_nav' %> |
|
12 |
+ <div class="span9"> |
|
13 |
+ <div class="page-header"> |
|
14 |
+ <h1> |
|
15 |
+ <i class="fa fa-envelope"></i> |
|
16 |
+ <%= t "admin_panel.contact_messages" %> |
|
17 |
+ </h1> |
|
18 |
+ </div> |
|
19 |
+ <%= bootstrap_flash %> |
|
20 |
+ <% @contact_messages.each do |msg| %> |
|
21 |
+ <div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;"> |
|
22 |
+ <div class="media-body pull-left"> |
|
23 |
+ <h4 class="media-heading" style="margin-bottom: 0px;"> |
|
24 |
+ <%= ('<span class="badge badge-warning" style="margin-top: -11px">' + (t "admin_panel.new") + '</span>').html_safe if msg.unread %> |
|
25 |
+ <%= link_to msg.title, show_contact_message_path(msg) %> |
|
18 | 26 |
|
19 |
- <span style="margin-top: -5px;"><small><%= t "contact.by" %> |
|
20 |
- <% if msg.user != nil %> |
|
21 |
- <%= msg.user.full_name %> |
|
22 |
- <% else %> |
|
23 |
- <%= msg.email %> |
|
24 |
- <% end %> |
|
25 |
- , <%= time_ago_in_words(msg.created_at) %> <%= t "blog.ago" %> |
|
26 |
- </small></span> |
|
27 |
- </h4> |
|
28 |
- <p style="margin-top: 15px;"><%= truncate( msg.content, length: 120, omission: '...') %></p> |
|
29 |
- </div> |
|
30 |
- <div class="pull-right"> |
|
31 |
- <div class="btn-group btn-group-vertical"> |
|
32 |
- <% if msg.unread %> |
|
33 |
- <%= link_to '<i class="icon-eye-open"></i>'.html_safe, mark_contact_message_as_readed_path(msg), :class => 'btn' %> |
|
34 |
- <% else %> |
|
35 |
- <%= link_to '<i class="icon-eye-close"></i>'.html_safe, mark_contact_message_as_unread_path(msg), :class => 'btn' %> |
|
36 |
- <% end %> |
|
37 |
- <%= link_to '<i class="icon-remove"></i>'.html_safe, msg, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-danger' %> |
|
38 |
- </div> |
|
39 |
- </div> |
|
40 |
- </div> |
|
41 |
- <% end %> |
|
27 |
+ <span style="margin-top: -5px;"><small><%= t "contact.by" %> |
|
28 |
+ <% if msg.user != nil %> |
|
29 |
+ <%= msg.user.full_name %> |
|
30 |
+ <% else %> |
|
31 |
+ <%= msg.email %> |
|
32 |
+ <% end %> |
|
33 |
+ , <%= time_ago_in_words(msg.created_at) %> <%= t "blog.ago" %> |
|
34 |
+ </small></span> |
|
35 |
+ </h4> |
|
36 |
+ <p style="margin-top: 15px;"><%= truncate( msg.content, length: 120, omission: '...') %></p> |
|
37 |
+ </div> |
|
38 |
+ <div class="pull-right"> |
|
39 |
+ <div class="btn-group btn-group-vertical"> |
|
40 |
+ <% if msg.unread %> |
|
41 |
+ <%= link_to '<i class="icon-eye-open"></i>'.html_safe, mark_contact_message_as_readed_path(msg), :class => 'btn' %> |
|
42 |
+ <% else %> |
|
43 |
+ <%= link_to '<i class="icon-eye-close"></i>'.html_safe, mark_contact_message_as_unread_path(msg), :class => 'btn' %> |
|
44 |
+ <% end %> |
|
45 |
+ <%= link_to '<i class="icon-remove"></i>'.html_safe, msg, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-danger' %> |
|
46 |
+ </div> |
|
47 |
+ </div> |
|
48 |
+ </div> |
|
49 |
+ <% end %> |
|
42 | 50 |
|
43 |
- </div> |
|
44 |
-</div> |
|
51 |
+ </div> |
|
52 |
+ </div> |
|
53 |
+ |
|
54 |
+ |
|
55 |
+ <% # End of Page Content %> |
|
56 |
+ <% end %> |
|
57 |
+ <% end %> |
|
58 |
+<% end %> |
@@ -1,40 +1,53 @@ |
||
1 | 1 |
<% title (t "admin_panel.dashboard") + " - " + @config.website_name %> |
2 | 2 |
|
3 |
-<div class="row"> |
|
4 |
- <%= render 'admin_panel/sidebar_nav' %> |
|
5 |
- <div class="span9"> |
|
6 |
- <div class="hero-unit well" style="margin-top: 20px; padding-top: 20px; padding-bottom: 30px;"> |
|
7 |
- <h1> |
|
8 |
- <span class="fa-stack fa-lg"> |
|
9 |
- <i class="fa fa-square-o fa-stack-2x"></i> |
|
10 |
- <i class="fa fa-tachometer fa-stack-1x"></i> |
|
11 |
- </span> |
|
12 |
- <%= t "admin_panel.dashboard" %></h1> |
|
13 |
- </div> |
|
14 |
- <%= bootstrap_flash %> |
|
15 |
- <div class="well summary"> |
|
16 |
- <ul> |
|
17 |
- <li style="width: 25%"> |
|
18 |
- <a href="<%= admin_contact_messages_path %>"><span class="count"><%= (@new_messages.length.to_s + '/' + @contact_messages.length.to_s) %></span> |
|
19 |
- <% if @new_messages.length > 1 %> |
|
20 |
- <% t "admin_panel.new_messages" %> <%= t "admin_panel.contact_messages" %> |
|
21 |
- <% elsif @new_messages.length == 1 %> |
|
22 |
- <% t "admin_panel.new" %> <%= t "admin_panel.message" %> |
|
23 |
- <% else %> |
|
24 |
- <%= t "admin_panel.contact_messages" %> |
|
25 |
- <% end %> |
|
26 |
- </a> |
|
27 |
- </li> |
|
28 |
- <li style="width: 25%"> |
|
29 |
- <a href="<%= admin_users_path %>"><span class="count"><%= @users.length %></span> <%= t "admin_panel.users" %></a> |
|
30 |
- </li> |
|
31 |
- <li style="width: 25%"> |
|
32 |
- <a href="<%= admin_files_path %>"><span class="count"><%= @files.length %></span> <%= t "admin_panel.files" %></a> |
|
33 |
- </li> |
|
34 |
- <li class="last" style="width: 25%"> |
|
35 |
- <a href="<%= admin_posts_path %>"><span class="count"><%= @posts.length %></span> <%= t "admin_panel.posts" %></a> |
|
36 |
- </li> |
|
37 |
- </ul> |
|
38 |
- </div> |
|
39 |
- </div> |
|
40 |
-</div> |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <div class="row"> |
|
11 |
+ <%= render 'admin_panel/sidebar_nav' %> |
|
12 |
+ <div class="span9"> |
|
13 |
+ <div class="hero-unit well" style="margin-top: 20px; padding-top: 20px; padding-bottom: 30px;"> |
|
14 |
+ <h1> |
|
15 |
+ <span class="fa-stack fa-lg"> |
|
16 |
+ <i class="fa fa-square-o fa-stack-2x"></i> |
|
17 |
+ <i class="fa fa-tachometer fa-stack-1x"></i> |
|
18 |
+ </span> |
|
19 |
+ <%= t "admin_panel.dashboard" %></h1> |
|
20 |
+ </div> |
|
21 |
+ <%= bootstrap_flash %> |
|
22 |
+ <div class="well summary"> |
|
23 |
+ <ul> |
|
24 |
+ <li style="width: 25%"> |
|
25 |
+ <a href="<%= admin_contact_messages_path %>"><span class="count"><%= (@new_messages.length.to_s + '/' + @contact_messages.length.to_s) %></span> |
|
26 |
+ <% if @new_messages.length > 1 %> |
|
27 |
+ <% t "admin_panel.new_messages" %> <%= t "admin_panel.contact_messages" %> |
|
28 |
+ <% elsif @new_messages.length == 1 %> |
|
29 |
+ <% t "admin_panel.new" %> <%= t "admin_panel.message" %> |
|
30 |
+ <% else %> |
|
31 |
+ <%= t "admin_panel.contact_messages" %> |
|
32 |
+ <% end %> |
|
33 |
+ </a> |
|
34 |
+ </li> |
|
35 |
+ <li style="width: 25%"> |
|
36 |
+ <a href="<%= admin_users_path %>"><span class="count"><%= @users.length %></span> <%= t "admin_panel.users" %></a> |
|
37 |
+ </li> |
|
38 |
+ <li style="width: 25%"> |
|
39 |
+ <a href="<%= admin_files_path %>"><span class="count"><%= @files.length %></span> <%= t "admin_panel.files" %></a> |
|
40 |
+ </li> |
|
41 |
+ <li class="last" style="width: 25%"> |
|
42 |
+ <a href="<%= admin_posts_path %>"><span class="count"><%= @posts.length %></span> <%= t "admin_panel.posts" %></a> |
|
43 |
+ </li> |
|
44 |
+ </ul> |
|
45 |
+ </div> |
|
46 |
+ </div> |
|
47 |
+ </div> |
|
48 |
+ |
|
49 |
+ |
|
50 |
+ <% # End of Page Content %> |
|
51 |
+ <% end %> |
|
52 |
+ <% end %> |
|
53 |
+<% end %> |
@@ -1,27 +1,41 @@ |
||
1 | 1 |
<% title (t "admin_panel.files") + " - " + @config.website_name %> |
2 |
-<div class="row"> |
|
3 |
- <%= render 'admin_panel/sidebar_nav' %> |
|
4 |
- <div class="span9"> |
|
5 |
- <div class="page-header"> |
|
6 |
- <h1><i class="fa fa-file-image-o"></i> <%= t "admin_panel.files" %> <%= link_to (t "admin_panel.upload_file"), new_upload_path, :class => 'btn btn-primary btn-mini' %></h1> |
|
7 |
- </div> |
|
8 |
- <%= bootstrap_flash %> |
|
9 |
- <% if @uploads != nil %> |
|
10 |
- <ul class="thumbnails"> |
|
11 |
- <% @uploads.each do |upload| %> |
|
12 |
- <li class="span3" style=""> |
|
13 |
- <div class="thumbnail" style="height: 250px;"> |
|
14 |
- <% if upload.file.content_type.to_s.start_with?('image') && upload.file.thumb.to_s != nil %> |
|
15 |
- <%= image_tag upload.file.thumb.to_s %> |
|
16 |
- <% else %> |
|
17 |
- <img src="http://placehold.it/300x200" alt=""> |
|
18 |
- <% end %> |
|
19 |
- <h5 style="height: 40px"><%= link_to upload.title, upload_path(upload) %></h5> |
|
20 |
- <p><%= upload.description %></p> |
|
21 |
- </div> |
|
22 |
- </li> |
|
23 |
- <% end %> |
|
24 |
- </ul> |
|
2 |
+ |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <div class="row"> |
|
11 |
+ <%= render 'admin_panel/sidebar_nav' %> |
|
12 |
+ <div class="span9"> |
|
13 |
+ <div class="page-header"> |
|
14 |
+ <h1><i class="fa fa-file-image-o"></i> <%= t "admin_panel.files" %> <%= link_to (t "admin_panel.upload_file"), new_upload_path, :class => 'btn btn-primary btn-mini' %></h1> |
|
15 |
+ </div> |
|
16 |
+ <%= bootstrap_flash %> |
|
17 |
+ <% if @uploads != nil %> |
|
18 |
+ <ul class="thumbnails"> |
|
19 |
+ <% @uploads.each do |upload| %> |
|
20 |
+ <li class="span3" style=""> |
|
21 |
+ <div class="thumbnail" style="height: 250px;"> |
|
22 |
+ <% if upload.file.content_type.to_s.start_with?('image') && upload.file.thumb.to_s != nil %> |
|
23 |
+ <%= image_tag upload.file.thumb.to_s %> |
|
24 |
+ <% else %> |
|
25 |
+ <img src="http://placehold.it/300x200" alt=""> |
|
26 |
+ <% end %> |
|
27 |
+ <h5 style="height: 40px"><%= link_to upload.title, upload_path(upload) %></h5> |
|
28 |
+ <p><%= upload.description %></p> |
|
29 |
+ </div> |
|
30 |
+ </li> |
|
31 |
+ <% end %> |
|
32 |
+ </ul> |
|
33 |
+ <% end %> |
|
34 |
+ </div> |
|
35 |
+ </div> |
|
36 |
+ |
|
37 |
+ |
|
38 |
+ <% # End of Page Content %> |
|
25 | 39 |
<% end %> |
26 |
- </div> |
|
27 |
-</div> |
|
40 |
+ <% end %> |
|
41 |
+<% end %> |
@@ -1,34 +1,48 @@ |
||
1 | 1 |
<% title (t "admin_panel.posts") + " - " + @config.website_name %> |
2 |
-<div class="row"> |
|
3 |
- <%= render 'admin_panel/sidebar_nav' %> |
|
4 |
- <div class="span9"> |
|
5 |
- <div class="page-header"> |
|
6 |
- <h1><i class="fa fa-file-text"></i> <%= t "admin_panel.posts" %> <%= link_to (t "admin_panel.new_blog_post"), new_blog_post_path, :class => 'btn btn-primary pull-right' %></h1> |
|
7 |
- </div> |
|
8 |
- <%= bootstrap_flash %> |
|
9 |
- <% @posts.each do |post| %> |
|
10 |
- <div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;"> |
|
11 |
- <span class="pull-left"> |
|
12 |
- <% if post.image.mini.to_s != '' %> |
|
13 |
- <%= image_tag post.image.mini.to_s %> |
|
14 |
- <% else %> |
|
15 |
- <img src="http://placehold.it/150x100" alt=""> |
|
16 |
- <% end %> |
|
17 |
- </span> |
|
18 |
- <div class="media-body pull-left"> |
|
19 |
- <h3 class="media-heading" style="margin-bottom: 0px;"><%= link_to post.title, post_path(post) %></h3> |
|
20 |
- <p style="margin-top: -5px;"><small><%= t "blog.by" %> <%= post.author.full_name %>, <%= time_ago_in_words(post.created_at) %> <%= t "blog.ago" %></small></p> |
|
21 |
- <p><%= post.description %></p> |
|
22 |
- </div> |
|
23 |
- <div class="pull-right"> |
|
24 |
- <div class="btn-group btn-group-vertical"> |
|
25 |
- <%= link_to '<i class="icon-eye-open"></i>'.html_safe, post_path(post), :class => 'btn' %> |
|
26 |
- <%= link_to '<i class="icon-pencil"></i>'.html_safe, edit_blog_post_path(post), :class => 'btn' %> |
|
27 |
- <%= link_to '<i class="icon-remove"></i>'.html_safe, post, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-danger', :id => ['delete_' + post.slug] %> |
|
28 |
- </div> |
|
29 |
- </div> |
|
30 |
- </div> |
|
31 |
- <% end %> |
|
2 |
+ |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <div class="row"> |
|
11 |
+ <%= render 'admin_panel/sidebar_nav' %> |
|
12 |
+ <div class="span9"> |
|
13 |
+ <div class="page-header"> |
|
14 |
+ <h1><i class="fa fa-file-text"></i> <%= t "admin_panel.posts" %> <%= link_to (t "admin_panel.new_blog_post"), new_blog_post_path, :class => 'btn btn-primary pull-right' %></h1> |
|
15 |
+ </div> |
|
16 |
+ <%= bootstrap_flash %> |
|
17 |
+ <% @posts.each do |post| %> |
|
18 |
+ <div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;"> |
|
19 |
+ <span class="pull-left"> |
|
20 |
+ <% if post.image.mini.to_s != '' %> |
|
21 |
+ <%= image_tag post.image.mini.to_s %> |
|
22 |
+ <% else %> |
|
23 |
+ <img src="http://placehold.it/150x100" alt=""> |
|
24 |
+ <% end %> |
|
25 |
+ </span> |
|
26 |
+ <div class="media-body pull-left"> |
|
27 |
+ <h3 class="media-heading" style="margin-bottom: 0px;"><%= link_to post.title, post_path(post) %></h3> |
|
28 |
+ <p style="margin-top: -5px;"><small><%= t "blog.by" %> <%= post.author.full_name %>, <%= time_ago_in_words(post.created_at) %> <%= t "blog.ago" %></small></p> |
|
29 |
+ <p><%= post.description %></p> |
|
30 |
+ </div> |
|
31 |
+ <div class="pull-right"> |
|
32 |
+ <div class="btn-group btn-group-vertical"> |
|
33 |
+ <%= link_to '<i class="icon-eye-open"></i>'.html_safe, post_path(post), :class => 'btn' %> |
|
34 |
+ <%= link_to '<i class="icon-pencil"></i>'.html_safe, edit_blog_post_path(post), :class => 'btn' %> |
|
35 |
+ <%= link_to '<i class="icon-remove"></i>'.html_safe, post, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-danger', :id => ['delete_' + post.slug] %> |
|
36 |
+ </div> |
|
37 |
+ </div> |
|
38 |
+ </div> |
|
39 |
+ <% end %> |
|
32 | 40 |
|
33 |
- </div> |
|
34 |
-</div> |
|
41 |
+ </div> |
|
42 |
+ </div> |
|
43 |
+ |
|
44 |
+ |
|
45 |
+ <% # End of Page Content %> |
|
46 |
+ <% end %> |
|
47 |
+ <% end %> |
|
48 |
+<% end %> |
@@ -1,38 +1,52 @@ |
||
1 | 1 |
<% title @msg.title + " - " + @config.website_name %> |
2 |
-<div class="row"> |
|
3 |
- <%= render 'admin_panel/sidebar_nav' %> |
|
4 |
- <div class="span9"> |
|
5 |
- <div class="page-header"> |
|
6 |
- <h1> |
|
7 |
- <%= @msg.title %> |
|
2 |
+ |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <div class="row"> |
|
11 |
+ <%= render 'admin_panel/sidebar_nav' %> |
|
12 |
+ <div class="span9"> |
|
13 |
+ <div class="page-header"> |
|
14 |
+ <h1> |
|
15 |
+ <%= @msg.title %> |
|
8 | 16 |
|
9 |
- <div class="btn-group pull-right" > |
|
10 |
- <%= link_to (t 'nav.back'), admin_contact_messages_path, class: 'btn' %> |
|
11 |
- </div> |
|
17 |
+ <div class="btn-group pull-right" > |
|
18 |
+ <%= link_to (t 'nav.back'), admin_contact_messages_path, class: 'btn' %> |
|
19 |
+ </div> |
|
12 | 20 |
|
13 |
- <div class="btn-group pull-right" style="margin-right: 10px;"> |
|
14 |
- <% if @msg.unread %> |
|
15 |
- <%= link_to '<i class="icon-eye-open"></i>'.html_safe, mark_contact_message_as_readed_path(@msg), :class => 'btn' %> |
|
16 |
- <% else %> |
|
17 |
- <%= link_to '<i class="icon-eye-close"></i>'.html_safe, mark_contact_message_as_unread_path(@msg), :class => 'btn' %> |
|
18 |
- <% end %> |
|
19 |
- <%= link_to '<i class="icon-remove"></i>'.html_safe, @msg, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-danger' %> |
|
20 |
- </div> |
|
21 |
+ <div class="btn-group pull-right" style="margin-right: 10px;"> |
|
22 |
+ <% if @msg.unread %> |
|
23 |
+ <%= link_to '<i class="icon-eye-open"></i>'.html_safe, mark_contact_message_as_readed_path(@msg), :class => 'btn' %> |
|
24 |
+ <% else %> |
|
25 |
+ <%= link_to '<i class="icon-eye-close"></i>'.html_safe, mark_contact_message_as_unread_path(@msg), :class => 'btn' %> |
|
26 |
+ <% end %> |
|
27 |
+ <%= link_to '<i class="icon-remove"></i>'.html_safe, @msg, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-danger' %> |
|
28 |
+ </div> |
|
21 | 29 |
|
22 |
- </h1> |
|
23 |
- </div> |
|
24 |
- <%= bootstrap_flash %> |
|
25 |
- <span style="margin-top: -15px;"><small><%= t "contact.by" %> |
|
26 |
- <% if @msg.user != nil %> |
|
27 |
- <%= @msg.user.full_name %>, |
|
28 |
- <% else %> |
|
29 |
- <%= @msg.email %>, |
|
30 |
- <% end %> |
|
31 |
- <%= time_ago_in_words(@msg.created_at) %> <%= t "blog.ago" %> |
|
32 |
- </small></span> |
|
30 |
+ </h1> |
|
31 |
+ </div> |
|
32 |
+ <%= bootstrap_flash %> |
|
33 |
+ <span style="margin-top: -15px;"><small><%= t "contact.by" %> |
|
34 |
+ <% if @msg.user != nil %> |
|
35 |
+ <%= @msg.user.full_name %>, |
|
36 |
+ <% else %> |
|
37 |
+ <%= @msg.email %>, |
|
38 |
+ <% end %> |
|
39 |
+ <%= time_ago_in_words(@msg.created_at) %> <%= t "blog.ago" %> |
|
40 |
+ </small></span> |
|
33 | 41 |
|
34 | 42 |
|
35 |
- <p style="margin-top: 15px;"><%= @msg.content %></p> |
|
43 |
+ <p style="margin-top: 15px;"><%= @msg.content %></p> |
|
36 | 44 |
|
37 |
- </div> |
|
38 |
-</div> |
|
45 |
+ </div> |
|
46 |
+ </div> |
|
47 |
+ |
|
48 |
+ |
|
49 |
+ <% # End of Page Content %> |
|
50 |
+ <% end %> |
|
51 |
+ <% end %> |
|
52 |
+<% end %> |
@@ -1,49 +1,63 @@ |
||
1 | 1 |
<% title (t "admin_panel.configurations") + " - " + @config.website_name %> |
2 |
-<div class="row"> |
|
3 |
- <%= render 'admin_panel/sidebar_nav' %> |
|
4 |
- <div class="span9"> |
|
5 |
- <div class="page-header"> |
|
6 |
- <h1><i class="fa fa-cog"></i> <%= t "admin_panel.configurations" %> </h1> |
|
7 |
- </div> |
|
8 |
- <%= bootstrap_flash %> |
|
9 |
- <div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;"> |
|
10 |
- <%= bootstrap_form_for(@config, :url => config_update_path, :method => 'POST') do |f| %> |
|
11 |
- <%= f.alert_message "Please fix the errors below." %> |
|
12 | 2 |
|
13 |
- <div class="form-inputs"> |
|
14 |
- <%= f.text_field :website_name, :label => (t 'admin_panel.website_name'), class:'input-xlarge' %> |
|
15 |
- <%= f.text_field :tagline, :label => (t 'admin_panel.tagline'), class: 'input-xxlarge' %> |
|
16 |
- <% help = ("<button type=\"button\" style=\"margin-top: -8px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.website_link'}\" data-content=\"#{(t 'help.website_link')}\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
17 |
- <%= f.text_field :website_link, :label => (t 'admin_panel.website_link'), class:'input-xlarge', append: help %> |
|
18 |
- <div class="popover-content"></div> |
|
19 |
- <% help_language = ("<button type=\"button\" style=\"margin-top: 24px;\" data-html=\"true\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.default_language'}\" data-content=\"<p>#{(t 'help.default_language')}</p><p><i>*#{(t 'admin_panel.language_hint')}</i></p>\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
20 |
- <div class="pull-left"><%= f.select :default_language, ["en", "pt-BR"], :label => (t 'admin_panel.default_language') %></div> |
|
21 |
- <div class="pull-left"><%= help_language %></div>, |
|
22 |
- <div class="clearfix"></div> |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <div class="row"> |
|
11 |
+ <%= render 'admin_panel/sidebar_nav' %> |
|
12 |
+ <div class="span9"> |
|
13 |
+ <div class="page-header"> |
|
14 |
+ <h1><i class="fa fa-cog"></i> <%= t "admin_panel.configurations" %> </h1> |
|
15 |
+ </div> |
|
16 |
+ <%= bootstrap_flash %> |
|
17 |
+ <div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;"> |
|
18 |
+ <%= bootstrap_form_for(@config, :url => config_update_path, :method => 'POST') do |f| %> |
|
19 |
+ <%= f.alert_message "Please fix the errors below." %> |
|
20 |
+ |
|
21 |
+ <div class="form-inputs"> |
|
22 |
+ <%= f.text_field :website_name, :label => (t 'admin_panel.website_name'), class:'input-xlarge' %> |
|
23 |
+ <%= f.text_field :tagline, :label => (t 'admin_panel.tagline'), class: 'input-xxlarge' %> |
|
24 |
+ <% help = ("<button type=\"button\" style=\"margin-top: -8px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.website_link'}\" data-content=\"#{(t 'help.website_link')}\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
25 |
+ <%= f.text_field :website_link, :label => (t 'admin_panel.website_link'), class:'input-xlarge', append: help %> |
|
26 |
+ <div class="popover-content"></div> |
|
27 |
+ <% help_language = ("<button type=\"button\" style=\"margin-top: 24px;\" data-html=\"true\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.default_language'}\" data-content=\"<p>#{(t 'help.default_language')}</p><p><i>*#{(t 'admin_panel.language_hint')}</i></p>\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
28 |
+ <div class="pull-left"><%= f.select :default_language, ["en", "pt-BR"], :label => (t 'admin_panel.default_language') %></div> |
|
29 |
+ <div class="pull-left"><%= help_language %></div>, |
|
30 |
+ <div class="clearfix"></div> |
|
23 | 31 |
|
24 |
- <% help = ("<button type=\"button\" style=\"margin-top: -8px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.contact_email'}\" data-content=\"#{(t 'help.contact_email')}\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
25 |
- <%= f.email_field :contact_email, :label => (t 'admin_panel.contact_email'), class:'input-xlarge', append: help %> |
|
32 |
+ <% help = ("<button type=\"button\" style=\"margin-top: -8px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.contact_email'}\" data-content=\"#{(t 'help.contact_email')}\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
33 |
+ <%= f.email_field :contact_email, :label => (t 'admin_panel.contact_email'), class:'input-xlarge', append: help %> |
|
26 | 34 |
|
27 |
- <% help = ("<button type=\"button\" style=\"margin-top: -8px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.server_email'}\" data-content=\"#{(t 'help.server_email')} no-reply@website.com\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
28 |
- <%= f.email_field :server_email, :label => (t 'admin_panel.server_email'), class:'input-xlarge', append: help %> |
|
29 |
- <hr> |
|
30 |
- <% help_maintenance = ("<button type=\"button\" style=\"margin-top: 2px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.maintenance_mode'}\" data-content=\"#{(t 'help.maintenance_mode')}\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
31 |
- <%= f.form_group :maintenance_mode, class: 'bootstrap_switch_group' do %> |
|
32 |
- <div class="pull-left"><%= f.check_box :maintenance_mode, :label => (t 'admin_panel.maintenance_mode'), class: 'bootstrap_switch', |
|
33 |
- data: { on_text: (t 'admin_panel.on_switch'), off_text: (t 'admin_panel.off_switch') } %></div> |
|
34 |
- <div class="pull-left"><%= help_maintenance %></div> |
|
35 |
- <div class="clearfix"></div> |
|
36 |
- <% end %> |
|
37 |
- <%= f.text_field :maintenance_title, :label => (t 'admin_panel.maintenance_title'), class:'input-xlarge' %> |
|
38 |
- <%= f.text_area :maintenance_message, :label => (t 'admin_panel.maintenance_message'), class:'input-block-level' %> |
|
35 |
+ <% help = ("<button type=\"button\" style=\"margin-top: -8px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.server_email'}\" data-content=\"#{(t 'help.server_email')} no-reply@website.com\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
36 |
+ <%= f.email_field :server_email, :label => (t 'admin_panel.server_email'), class:'input-xlarge', append: help %> |
|
37 |
+ <hr> |
|
38 |
+ <% help_maintenance = ("<button type=\"button\" style=\"margin-top: 2px;\" class=\"btn help_btn btn-link\" data-trigger=\"focus\" data-toggle=\"popover\" data-placement=\"right\" title=\"#{t 'admin_panel.maintenance_mode'}\" data-content=\"#{(t 'help.maintenance_mode')}\"><i class=\"fa fa-question-circle\"></i></button>").html_safe %> |
|
39 |
+ <%= f.form_group :maintenance_mode, class: 'bootstrap_switch_group' do %> |
|
40 |
+ <div class="pull-left"><%= f.check_box :maintenance_mode, :label => (t 'admin_panel.maintenance_mode'), class: 'bootstrap_switch', |
|
41 |
+ data: { on_text: (t 'admin_panel.on_switch'), off_text: (t 'admin_panel.off_switch') } %></div> |
|
42 |
+ <div class="pull-left"><%= help_maintenance %></div> |
|
43 |
+ <div class="clearfix"></div> |
|
44 |
+ <% end %> |
|
45 |
+ <%= f.text_field :maintenance_title, :label => (t 'admin_panel.maintenance_title'), class:'input-xlarge' %> |
|
46 |
+ <%= f.text_area :maintenance_message, :label => (t 'admin_panel.maintenance_message'), class:'input-block-level' %> |
|
39 | 47 |
|
40 |
- </div> |
|
48 |
+ </div> |
|
41 | 49 |
|
42 |
- <div class="form-actions" style="margin-left: -10px; margin-right: -10px; margin-bottom: -30px;"> |
|
43 |
- <%= f.submit (t 'admin_panel.update_config_btn'), class: 'btn btn-success' %> |
|
44 |
- </div> |
|
45 |
- <% end %> |
|
46 |
- </div> |
|
50 |
+ <div class="form-actions" style="margin-left: -10px; margin-right: -10px; margin-bottom: -30px;"> |
|
51 |
+ <%= f.submit (t 'admin_panel.update_config_btn'), class: 'btn btn-success' %> |
|
52 |
+ </div> |
|
53 |
+ <% end %> |
|
54 |
+ </div> |
|
47 | 55 |
|
48 |
- </div> |
|
49 |
-</div> |
|
56 |
+ </div> |
|
57 |
+ </div> |
|
58 |
+ <div class="clearfix" style="margin-bottom: 50px;"></div> |
|
59 |
+ |
|
60 |
+ <% # End of Page Content %> |
|
61 |
+ <% end %> |
|
62 |
+ <% end %> |
|
63 |
+<% end %> |
@@ -1,37 +1,49 @@ |
||
1 | 1 |
<% title (t "admin_panel.subscribers") + " - " + @config.website_name %> |
2 |
-<div class="row"> |
|
3 |
- <%= render 'admin_panel/sidebar_nav' %> |
|
4 |
- <div class="span9"> |
|
5 |
- <div class="page-header"> |
|
6 |
- <h1> |
|
7 |
- <i class="fa fa-envelope"></i> |
|
8 |
- <%= t "admin_panel.subscribers" %> <%= link_to (t "subscription.export"), export_subscribers_list_path(format: :csv), class: 'btn btn-primary btn-mini pull-right', style: 'margin-top: 10px' %> |
|
9 |
- </h1> |
|
10 |
- </div> |
|
11 |
- <%= bootstrap_flash %> |
|
12 |
- |
|
13 |
- <table class="table table-bordered"> |
|
14 |
- <thead> |
|
15 |
- <tr> |
|
16 |
- <th>Name</th> |
|
17 |
- <th>Email</th> |
|
18 |
- <th>User</th> |
|
19 |
- <th>Language</th> |
|
20 |
- <th>Registered</th> |
|
21 |
- </tr> |
|
22 |
- </thead> |
|
23 |
- <tbody> |
|
24 |
- <% @subscribers.each do |subscription| %> |
|
25 |
- <tr> |
|
26 |
- <td><%= subscription.full_name %></td> |
|
27 |
- <td><%= subscription.email %></td> |
|
28 |
- <td><%= subscription.registered_user %></td> |
|
29 |
- <td><%= subscription.language %></td> |
|
30 |
- <td><%= time_ago_in_words(subscription.created_at) %></td> |
|
31 |
- </tr> |
|
32 |
- <% end %> |
|
33 |
- </tbody> |
|
34 |
- </table> |
|
35 |
- </div> |
|
36 |
-</div> |
|
37 | 2 |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <div class="row"> |
|
11 |
+ <%= render 'admin_panel/sidebar_nav' %> |
|
12 |
+ <div class="span9"> |
|
13 |
+ <div class="page-header"> |
|
14 |
+ <h1> |
|
15 |
+ <i class="fa fa-envelope"></i> |
|
16 |
+ <%= t "admin_panel.subscribers" %> <%= link_to (t "subscription.export"), export_subscribers_list_path(format: :csv), class: 'btn btn-primary btn-mini pull-right', style: 'margin-top: 10px' %> |
|
17 |
+ </h1> |
|
18 |
+ </div> |
|
19 |
+ <%= bootstrap_flash %> |
|
20 |
+ |
|
21 |
+ <table class="table table-bordered"> |
|
22 |
+ <thead> |
|
23 |
+ <tr> |
|
24 |
+ <th>Name</th> |
|
25 |
+ <th>Email</th> |
|
26 |
+ <th>User</th> |
|
27 |
+ <th>Language</th> |
|
28 |
+ <th>Registered</th> |
|
29 |
+ </tr> |
|
30 |
+ </thead> |
|
31 |
+ <tbody> |
|
32 |
+ <% @subscribers.each do |subscription| %> |
|
33 |
+ <tr> |
|
34 |
+ <td><%= subscription.full_name %></td> |
|
35 |
+ <td><%= subscription.email %></td> |
|
36 |
+ <td><%= subscription.registered_user %></td> |
|
37 |
+ <td><%= subscription.language %></td> |
|
38 |
+ <td><%= time_ago_in_words(subscription.created_at) %></td> |
|
39 |
+ </tr> |
|
40 |
+ <% end %> |
|
41 |
+ </tbody> |
|
42 |
+ </table> |
|
43 |
+ </div> |
|
44 |
+ </div> |
|
45 |
+ |
|
46 |
+ <% # End of Page Content %> |
|
47 |
+ <% end %> |
|
48 |
+ <% end %> |
|
49 |
+<% end %> |
@@ -1,48 +1,62 @@ |
||
1 | 1 |
<% title (t "admin_panel.users") + " - " + @config.website_name %> |
2 |
-<div class="row"> |
|
3 |
- <%= render 'admin_panel/sidebar_nav' %> |
|
4 |
- <div class="span9"> |
|
5 |
- <div class="page-header"> |
|
6 |
- <h1><i class="fa fa-users"></i> <%= t "admin_panel.users" %></h1> |
|
7 |
- </div> |
|
8 |
- <%= bootstrap_flash %> |
|
9 |
- <% @users.each do |user| %> |
|
10 |
- <div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;"> |
|
11 |
- <span class="pull-left"> |
|
12 |
- <% if user.avatar.file != nil %> |
|
13 |
- <%= image_tag user.avatar.thumb.to_s, :class => 'img-circle' %> |
|
14 |
- <% else %> |
|
15 |
- <%= image_tag "user.png", size: "50x50", :class => 'img-circle' %> |
|
16 |
- <% end %> |
|
17 |
- </span> |
|
18 |
- <div class="media-body pull-left" style="min-width: 180px;"> |
|
19 |
- <h4 class="media-heading"><%= user.full_name %></h4> |
|
20 |
- <p><%= user.email %></p> |
|
21 |
- </div> |
|
22 |
- <div class="pull-left" style=" padding: 5px; padding-bottom: 0px; padding-top: 0px; margin-top: -6px; text-align: center; margin-left: 25px;"> |
|
23 |
- <span class="summary" style="margin-bottom: 0px;"> |
|
24 |
- <span class="count"><%= user.sign_in_count %></span> |
|
25 |
- <span><%= t "admin_panel.logins" %></span></span> |
|
26 |
- </div> |
|
27 |
- <% if user.admin %> |
|
28 |
- <div class="pull-left" style=" padding: 5px; padding-bottom: 0px; padding-top: 0px; margin-top: -6px; text-align: center; margin-left: 25px;"> |
|
2 |
+ |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <div class="row"> |
|
11 |
+ <%= render 'admin_panel/sidebar_nav' %> |
|
12 |
+ <div class="span9"> |
|
13 |
+ <div class="page-header"> |
|
14 |
+ <h1><i class="fa fa-users"></i> <%= t "admin_panel.users" %></h1> |
|
15 |
+ </div> |
|
16 |
+ <%= bootstrap_flash %> |
|
17 |
+ <% @users.each do |user| %> |
|
18 |
+ <div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;"> |
|
19 |
+ <span class="pull-left"> |
|
20 |
+ <% if user.avatar.file != nil %> |
|
21 |
+ <%= image_tag user.avatar.to_s, size: "50x50", :class => 'img-circle' %> |
|
22 |
+ <% else %> |
|
23 |
+ <%= image_tag "user.png", size: "50x50", :class => 'img-circle' %> |
|
24 |
+ <% end %> |
|
25 |
+ </span> |
|
26 |
+ <div class="media-body pull-left" style="min-width: 180px;"> |
|
27 |
+ <h4 class="media-heading"><%= user.full_name %></h4> |
|
28 |
+ <p><%= user.email %></p> |
|
29 |
+ </div> |
|
30 |
+ <div class="pull-left" style=" padding: 5px; padding-bottom: 0px; padding-top: 0px; margin-top: -6px; text-align: center; margin-left: 25px;"> |
|
31 |
+ <span class="summary" style="margin-bottom: 0px;"> |
|
32 |
+ <span class="count"><%= user.sign_in_count %></span> |
|
33 |
+ <span><%= t "admin_panel.logins" %></span></span> |
|
34 |
+ </div> |
|
35 |
+ <% if user.admin %> |
|
36 |
+ <div class="pull-left" style=" padding: 5px; padding-bottom: 0px; padding-top: 0px; margin-top: -6px; text-align: center; margin-left: 25px;"> |
|
29 | 37 |
|
30 |
- <span class="summary" style="margin-bottom: 0px;"> |
|
31 |
- <span class="count"> |
|
38 |
+ <span class="summary" style="margin-bottom: 0px;"> |
|
39 |
+ <span class="count"> |
|
32 | 40 |
|
33 |
- <i class="icon-user"></i> |
|
34 |
- </span> |
|
35 |
- <span>Admin</span></span> |
|
36 |
- </div> |
|
37 |
- <% end %> |
|
38 |
- <div class="pull-right"> |
|
39 |
- <% if !user.admin %> |
|
40 |
- <%= link_to (t 'admin_panel.make_admin'), make_admin_path(user.id), class: 'btn btn-mini', style: 'width: 100px; margin-top: 6px; line-height: 17px;' %> |
|
41 |
- <% else %> |
|
42 |
- <%= link_to (t 'admin_panel.unmake_admin'), make_admin_path(user.id), class: 'btn btn-mini btn-danger', style: 'width: 100px; margin-top: 6px; line-height: 17px;' %> |
|
43 |
- <% end %> |
|
44 |
- </div> |
|
41 |
+ <i class="icon-user"></i> |
|
42 |
+ </span> |
|
43 |
+ <span>Admin</span></span> |
|
44 |
+ </div> |
|
45 |
+ <% end %> |
|
46 |
+ <div class="pull-right"> |
|
47 |
+ <% if !user.admin %> |
|
48 |
+ <%= link_to (t 'admin_panel.make_admin'), make_admin_path(user.id), class: 'btn btn-mini', style: 'width: 100px; margin-top: 6px; line-height: 17px;' %> |
|
49 |
+ <% else %> |
|
50 |
+ <%= link_to (t 'admin_panel.unmake_admin'), make_admin_path(user.id), class: 'btn btn-mini btn-danger', style: 'width: 100px; margin-top: 6px; line-height: 17px;' %> |
|
51 |
+ <% end %> |
|
52 |
+ </div> |
|
53 |
+ </div> |
|
54 |
+ <% end %> |
|
55 |
+ </div> |
|
45 | 56 |
</div> |
57 |
+ |
|
58 |
+ |
|
59 |
+ <% # End of Page Content %> |
|
46 | 60 |
<% end %> |
47 |
- </div> |
|
48 |
-</div> |
|
61 |
+ <% end %> |
|
62 |
+<% end %> |
@@ -1,23 +1,35 @@ |
||
1 | 1 |
<% title "Blog - " + @config.website_name %> |
2 | 2 |
|
3 |
-<div class="page-header"> |
|
4 |
- <h1>Blog</h1> |
|
5 |
-</div> |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
6 | 7 |
|
7 |
-<ul class="thumbnails"> |
|
8 |
- <% @blog_posts.each do |post| %> |
|
9 |
- <li class="span3"> |
|
10 |
- <div class="thumbnail" style="height: 300px;"> |
|
11 |
- <% if post.image.file != nil %> |
|
12 |
- <%= image_tag post.image.thumb.to_s %> |
|
13 |
- <% else %> |
|
14 |
- <img src="http://placehold.it/300x200" alt=""> |
|
15 |
- <% end %> |
|
16 |
- <h3><%= link_to post.title, post_path(post) %></h3> |
|
17 |
- <p><%= post.description %></p> |
|
18 |
- </div> |
|
19 |
- </li> |
|
20 |
- <% end %> |
|
21 |
-</ul> |
|
8 |
+ <% # Page Content %> |
|
22 | 9 |
|
23 |
-<br> |
|
10 |
+ <div class="page-header"> |
|
11 |
+ <h1>Blog</h1> |
|
12 |
+ </div> |
|
13 |
+ |
|
14 |
+ <ul class="thumbnails"> |
|
15 |
+ <% @blog_posts.each do |post| %> |
|
16 |
+ <li class="span3"> |
|
17 |
+ <div class="thumbnail" style="height: 300px;"> |
|
18 |
+ <% if post.image.file != nil %> |
|
19 |
+ <%= image_tag post.image.thumb.to_s %> |
|
20 |
+ <% else %> |
|
21 |
+ <img src="http://placehold.it/300x200" alt=""> |
|
22 |
+ <% end %> |
|
23 |
+ <h3><%= link_to post.title, post_path(post) %></h3> |
|
24 |
+ <p><%= post.description %></p> |
|
25 |
+ </div> |
|
26 |
+ </li> |
|
27 |
+ <% end %> |
|
28 |
+ </ul> |
|
29 |
+ |
|
30 |
+ <br> |
|
31 |
+ <% # End of Page Content %> |
|
32 |
+ |
|
33 |
+ <% end %> |
|
34 |
+ <% end %> |
|
35 |
+<% end %> |
@@ -1,14 +1,27 @@ |
||
1 | 1 |
<% title @blog_post.title + " - " + @config.website_name %> |
2 | 2 |
|
3 |
-<div class="page-header"> |
|
4 |
- <h1><%= @blog_post.title %></h1> |
|
5 |
- <small><%= t "blog.by" %> <%= @blog_post.author.full_name %>, <%= time_ago_in_words(@blog_post.created_at) %> <%= t "blog.ago" %></small> |
|
6 |
-</div> |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 | 7 |
|
8 |
-<%= @blog_post.content.html_safe %> |
|
8 |
+ <% # Page Content %> |
|
9 | 9 |
|
10 |
+ <div class="page-header"> |
|
11 |
+ <h1><%= @blog_post.title %></h1> |
|
12 |
+ <small><%= t "blog.by" %> <%= @blog_post.author.full_name %>, <%= time_ago_in_words(@blog_post.created_at) %> <%= t "blog.ago" %></small> |
|
13 |
+ </div> |
|
10 | 14 |
|
11 |
-<div style="margin-top: 40px; text-align: center;"> |
|
12 |
-<%= link_to (t "nav.edit"), edit_blog_post_path(@blog_post), :class => 'btn btn-small', :id => ['edit_' + @blog_post.slug] if user_signed_in? %> |
|
13 |
-<%= link_to (t "nav.back"), blog_path, :class => 'btn btn-small' %> |
|
14 |
-</div> |
|
15 |
+ <%= @blog_post.content.html_safe %> |
|
16 |
+ |
|
17 |
+ |
|
18 |
+ <div style="margin-top: 40px; text-align: center;"> |
|
19 |
+ <%= link_to (t "nav.edit"), edit_blog_post_path(@blog_post), :class => 'btn btn-small', :id => ['edit_' + @blog_post.slug] if user_signed_in? %> |
|
20 |
+ <%= link_to (t "nav.back"), blog_path, :class => 'btn btn-small' %> |
|
21 |
+ </div> |
|
22 |
+ |
|
23 |
+ <% # End of Page Content %> |
|
24 |
+ |
|
25 |
+ <% end %> |
|
26 |
+ <% end %> |
|
27 |
+<% end %> |
@@ -1,15 +1,28 @@ |
||
1 | 1 |
<% title (t "contact.contact") + " - " + @config.website_name %> |
2 | 2 |
|
3 |
-<div class="page-header"> |
|
4 |
- <h1><%= t 'contact.contact'%></h1> |
|
5 |
-</div> |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
6 | 7 |
|
8 |
+ <% # Page Content %> |
|
7 | 9 |
|
8 |
-<div class="row"> |
|
9 |
-<div class="well span4"> |
|
10 |
-<p><%= t 'contact.greeting1' %> <%= mail_to(@config.contact_email) %> <%= t 'contact.greeting2' %></p> |
|
10 |
+ <div class="page-header"> |
|
11 |
+ <h1><%= t 'contact.contact'%></h1> |
|
12 |
+ </div> |
|
11 | 13 |
|
12 |
-<%= render 'form' %> |
|
13 |
-</div> |
|
14 |
-</div> |
|
14 |
+ |
|
15 |
+ <div class="row"> |
|
16 |
+ <div class="well span4"> |
|
17 |
+ <p><%= t 'contact.greeting1' %> <%= mail_to(@config.contact_email) %> <%= t 'contact.greeting2' %></p> |
|
18 |
+ |
|
19 |
+ <%= render 'form' %> |
|
20 |
+ </div> |
|
21 |
+ </div> |
|
22 |
+ |
|
23 |
+ <% # End of Page Content %> |
|
24 |
+ |
|
25 |
+ <% end %> |
|
26 |
+ <% end %> |
|
27 |
+<% end %> |
|
15 | 28 |
|
@@ -1,58 +1,71 @@ |
||
1 | 1 |
<% title (t 'registration.edit_profile') + ' - ' + @config.website_name %> |
2 |
-<%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> |
|
3 |
- <div class="span6 offset3 media thumbnail" style="padding: 0px"> |
|
4 |
- <div class="login-panel panel panel-default" style="padding: 10px;"> |
|
5 |
- <div class="panel-heading"> |
|
6 |
- <h3 class="panel-title"><%= t 'registration.edit_profile'%></h3> |
|
7 |
- </div> |
|
8 |
- <div class="panel-body"> |
|
9 |
- <%= f.alert_message "Please fix the errors below."%> |
|
10 |
- <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> |
|
11 |
- <p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p> |
|
12 |
- <% end %> |
|
13 |
- <div class="form-inputs"> |
|
2 |
+ |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> |
|
11 |
+ <div class="span6 offset3 media thumbnail" style="padding: 0px"> |
|
12 |
+ <div class="login-panel panel panel-default" style="padding: 10px;"> |
|
13 |
+ <div class="panel-heading"> |
|
14 |
+ <h3 class="panel-title"><%= t 'registration.edit_profile'%></h3> |
|
15 |
+ </div> |
|
16 |
+ <div class="panel-body"> |
|
17 |
+ <%= f.alert_message "Please fix the errors below."%> |
|
18 |
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> |
|
19 |
+ <p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p> |
|
20 |
+ <% end %> |
|
21 |
+ <div class="form-inputs"> |
|
14 | 22 |
|
15 |
- <div class="fileupload fileupload-new pull-right" data-provides="fileupload" style="margin-top: 5px;"> |
|
16 |
- <div class="fileupload-preview thumbnail" data-trigger="fileinput" style="width: 140px; height: 140px;"> |
|
17 |
- <%= image_tag @user.avatar.to_s if @user.avatar? %> |
|
18 |
- </div> |
|
19 |
- <br> |
|
20 |
- <span class="btn btn-default btn-file btn-mini" style="width: 135px;"> |
|
21 |
- <span class="fileinput-new"></span> |
|
22 |
- <span class="fileinput-exists"></span> |
|
23 |
- <%= f.file_field :avatar, class: 'hidden', label: (t 'blog.select_image') %> |
|
24 |
- </span> |
|
25 |
- </div> |
|
23 |
+ <div class="fileupload fileupload-new pull-right" data-provides="fileupload" style="margin-top: 5px;"> |
|
24 |
+ <div class="fileupload-preview thumbnail" data-trigger="fileinput" style="width: 140px; height: 140px;"> |
|
25 |
+ <%= image_tag @user.avatar.to_s if @user.avatar? %> |
|
26 |
+ </div> |
|
27 |
+ <br> |
|
28 |
+ <span class="btn btn-default btn-file btn-mini" style="width: 135px;"> |
|
29 |
+ <span class="fileinput-new"></span> |
|
30 |
+ <span class="fileinput-exists"></span> |
|
31 |
+ <%= f.file_field :avatar, class: 'hidden', label: (t 'blog.select_image') %> |
|
32 |
+ </span> |
|
33 |
+ </div> |
|
26 | 34 |
|
27 |
- <%= f.text_field :first_name, label: (t 'registration.first_name'), required: true, autofocus: true, class: 'span4' %> |
|
28 |
- <%= f.text_field :last_name, label: (t 'registration.last_name'), required: false, class: 'span4' %> |
|
29 |
- <%= f.email_field :email, required: true, class: 'span4' %> |
|
30 |
- </div> |
|
31 |
- <hr> |
|
32 |
- <div class="form-inputs"> |
|
33 |
- <%= f.form_group :title, class: "pull-left", style: 'margin-left: 0px; width: 30%;' do %> |
|
34 |
- <%= f.password_field :password, label: (t 'registration.password'), required: false, class: 'input-block-level' %> |
|
35 |
- <% end %> |
|
36 |
- <%= f.form_group :slug, class: "pull-left", style: 'margin-left: 27px; width: 30%;' do %> |
|
37 |
- <%= f.password_field :password_confirmation, label: (t 'registration.password_confirmation'), required: false, class: 'input-block-level' %> |
|
38 |
- <% end %> |
|
39 |
- <%= f.form_group :slug, class: "pull-left", style: 'margin-left: 27px; width: 30%;' do %> |
|
40 |
- <%= f.password_field :current_password, label: (t 'registration.current_password'), required: false, class: 'input-block-level' %> |
|
41 |
- <% end %> |
|
42 |
- </div> |
|
35 |
+ <%= f.text_field :first_name, label: (t 'registration.first_name'), required: true, autofocus: true, class: 'span4' %> |
|
36 |
+ <%= f.text_field :last_name, label: (t 'registration.last_name'), required: false, class: 'span4' %> |
|
37 |
+ <%= f.email_field :email, required: true, class: 'span4' %> |
|
38 |
+ </div> |
|
39 |
+ <hr> |
|
40 |
+ <div class="form-inputs"> |
|
41 |
+ <%= f.form_group :title, class: "pull-left", style: 'margin-left: 0px; width: 30%;' do %> |
|
42 |
+ <%= f.password_field :password, label: (t 'registration.password'), required: false, class: 'input-block-level' %> |
|
43 |
+ <% end %> |
|
44 |
+ <%= f.form_group :slug, class: "pull-left", style: 'margin-left: 27px; width: 30%;' do %> |
|
45 |
+ <%= f.password_field :password_confirmation, label: (t 'registration.password_confirmation'), required: false, class: 'input-block-level' %> |
|
46 |
+ <% end %> |
|
47 |
+ <%= f.form_group :slug, class: "pull-left", style: 'margin-left: 27px; width: 30%;' do %> |
|
48 |
+ <%= f.password_field :current_password, label: (t 'registration.current_password'), required: false, class: 'input-block-level' %> |
|
49 |
+ <% end %> |
|
50 |
+ </div> |
|
43 | 51 |
|
44 | 52 |
|
45 | 53 |
|
46 |
- </div> |
|
47 |
- <div class="clearfix"></div> |
|
48 |
- </div> |
|
49 |
- <div class="form-actions" style="margin: 0px; margin-top: 15px;"> |
|
50 |
- <%= f.submit (t 'registration.update') %> |
|
51 |
- <%= link_to ('<i class="fa fa-exclamation-triangle"></i> '+(t 'registration.cancel_account')).html_safe, delete_user_account_path, data: { confirm: (t 'registration.cancel_confirmation') }, method: :delete, class: 'btn btn-danger pull-right', id: "delete_account" %> |
|
52 |
- </div> |
|
53 |
- </div> |
|
54 |
- </div> |
|
55 |
- </div> |
|
56 |
-<% end %> |
|
54 |
+ </div> |
|
55 |
+ <div class="clearfix"></div> |
|
56 |
+ </div> |
|
57 |
+ <div class="form-actions" style="margin: 0px; margin-top: 15px;"> |
|
58 |
+ <%= f.submit (t 'registration.update') %> |
|
59 |
+ <%= link_to ('<i class="fa fa-exclamation-triangle"></i> '+(t 'registration.cancel_account')).html_safe, delete_user_account_path, data: { confirm: (t 'registration.cancel_confirmation') }, method: :delete, class: 'btn btn-danger pull-right', id: "delete_account" %> |
|
60 |
+ </div> |
|
61 |
+ </div> |
|
62 |
+ </div> |
|
63 |
+ </div> |
|
64 |
+ <% end %> |
|
57 | 65 |
|
58 | 66 |
|
67 |
+ |
|
68 |
+ <% # End of Page Content %> |
|
69 |
+ <% end %> |
|
70 |
+ <% end %> |
|
71 |
+<% end %> |
@@ -1,28 +1,41 @@ |
||
1 | 1 |
<% title (t 'registration.sign_up') + ' - ' + @config.website_name %> |
2 |
-<%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> |
|
3 |
- <div class="span4 offset4 well" style=""> |
|
4 |
- <div class="login-panel panel panel-default"> |
|
5 |
- <div class="panel-heading"> |
|
6 |
- <h3 class="panel-title"><%= t 'registration.sign_up'%></h3> |
|
7 |
- </div> |
|
8 |
- <div class="panel-body"> |
|
9 |
- <form role="form"> |
|
10 |
- <%= f.alert_message "Please fix the errors below."%> |
|
11 |
- <div class="form-inputs"> |
|
12 |
- <%= f.text_field :first_name, label: (t 'registration.first_name'), required:true, autofocus: true, class: 'input-block-level' %> |
|
13 |
- <%= f.text_field :last_name, label: (t 'registration.last_name'), required:true, class: 'input-block-level' %> |
|
14 |
- <%= f.email_field :email, required: true, class: 'input-block-level' %> |
|
15 |
- <%= f.password_field :password, label: (t 'registration.password'), required: true, class: 'input-block-level' %> |
|
16 |
- <%= f.password_field :password_confirmation, label: (t 'registration.password_confirmation'), required: true, class: 'input-block-level' %> |
|
17 |
- </div> |
|
18 |
- <div class="form-group" style="margin-top: 15px;"> |
|
19 |
- <%= f.submit t 'registration.sign_up_submit' %> |
|
20 |
- <%= link_to (t 'registration.sign_in'), new_user_session_path, class: 'btn btn-link ' %> |
|
21 |
- </div> |
|
22 |
- </form> |
|
23 |
- </div> |
|
24 |
- </div> |
|
25 |
- </div> |
|
26 |
-<% end %> |
|
27 | 2 |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
28 | 9 |
|
10 |
+ <%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> |
|
11 |
+ <div class="span4 offset4 well" style=""> |
|
12 |
+ <div class="login-panel panel panel-default"> |
|
13 |
+ <div class="panel-heading"> |
|
14 |
+ <h3 class="panel-title"><%= t 'registration.sign_up'%></h3> |
|
15 |
+ </div> |
|
16 |
+ <div class="panel-body"> |
|
17 |
+ <form role="form"> |
|
18 |
+ <%= f.alert_message "Please fix the errors below."%> |
|
19 |
+ <div class="form-inputs"> |
|
20 |
+ <%= f.text_field :first_name, label: (t 'registration.first_name'), required:true, autofocus: true, class: 'input-block-level' %> |
|
21 |
+ <%= f.text_field :last_name, label: (t 'registration.last_name'), required:true, class: 'input-block-level' %> |
|
22 |
+ <%= f.email_field :email, required: true, class: 'input-block-level' %> |
|
23 |
+ <%= f.password_field :password, label: (t 'registration.password'), required: true, class: 'input-block-level' %> |
|
24 |
+ <%= f.password_field :password_confirmation, label: (t 'registration.password_confirmation'), required: true, class: 'input-block-level' %> |
|
25 |
+ </div> |
|
26 |
+ <div class="form-group" style="margin-top: 15px;"> |
|
27 |
+ <%= f.submit t 'registration.sign_up_submit' %> |
|
28 |
+ <%= link_to (t 'registration.sign_in'), new_user_session_path, class: 'btn btn-link ' %> |
|
29 |
+ </div> |
|
30 |
+ </form> |
|
31 |
+ </div> |
|
32 |
+ </div> |
|
33 |
+ </div> |
|
34 |
+ <% end %> |
|
35 |
+ |
|
36 |
+ |
|
37 |
+ |
|
38 |
+ <% # End of Page Content %> |
|
39 |
+ <% end %> |
|
40 |
+ <% end %> |
|
41 |
+<% end %> |
@@ -1,36 +1,48 @@ |
||
1 | 1 |
<% title (t 'registration.sign_in') + ' - ' + @config.website_name %> |
2 |
-<%= bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> |
|
3 |
-<div class="span4 offset4 well" style=""> |
|
4 |
- <div class="login-panel panel panel-default"> |
|
5 |
- <div class="panel-heading"> |
|
6 |
- <h3 class="panel-title"><%= t 'registration.sign_in' %></h3> |
|
7 |
- </div> |
|
8 |
- <div class="panel-body"> |
|
9 |
- <form role="form"> |
|
10 |
- <% bootstrap_flash %> |
|
11 |
- <%= f.alert_message "Please fix the errors below."%> |
|
12 |
- <fieldset> |
|
13 |
- <%= f.email_field :email, required: true, autofocus: true, class: "input-block-level" %> |
|
14 |
- <div class="form-group"> |
|
15 |
- <%= f.password_field :password, label: (t 'registration.password'), required: true, class: "input-block-level" %> |
|
16 |
- </div> |
|
17 |
- <%= f.check_box :remember_me, as: :boolean, label: (t 'registration.remember_me') if devise_mapping.rememberable? %> |
|
18 |
- <!-- Change this to a button or input when using this as a form --> |
|
19 |
- <div class="form-group" style="margin-top: 25px;"> |
|
20 |
- <%= f.submit (t 'registration.sign_in_submit'), id: 'submit_login_btn' %> |
|
21 |
- <%= link_to (t 'registration.sign_up'), new_user_registration_path, class: 'btn btn-link ' %> |
|
22 |
- <%= link_to (t 'registration.forgot_password'), new_user_password_path, class: 'btn btn-link ' %> |
|
2 |
+ |
|
3 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
4 |
+ <%= content_tag(:div, class: 'row') do %> |
|
5 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
6 |
+ <%= bootstrap_flash %> |
|
7 |
+ |
|
8 |
+ <% # Page Content %> |
|
9 |
+ |
|
10 |
+ <%= bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> |
|
11 |
+ <div class="span4 offset4 well" style=""> |
|
12 |
+ <div class="login-panel panel panel-default"> |
|
13 |
+ <div class="panel-heading"> |
|
14 |
+ <h3 class="panel-title"><%= t 'registration.sign_in' %></h3> |
|
15 |
+ </div> |
|
16 |
+ <div class="panel-body"> |
|
17 |
+ <form role="form"> |
|
18 |
+ <% bootstrap_flash %> |
|
19 |
+ <%= f.alert_message "Please fix the errors below."%> |
|
20 |
+ <fieldset> |
|
21 |
+ <%= f.email_field :email, required: true, autofocus: true, class: "input-block-level" %> |
|
22 |
+ <div class="form-group"> |
|
23 |
+ <%= f.password_field :password, label: (t 'registration.password'), required: true, class: "input-block-level" %> |
|
24 |
+ </div> |
|
25 |
+ <%= f.check_box :remember_me, as: :boolean, label: (t 'registration.remember_me') if devise_mapping.rememberable? %> |
|
26 |
+ <!-- Change this to a button or input when using this as a form --> |
|
27 |
+ <div class="form-group" style="margin-top: 25px;"> |
|
28 |
+ <%= f.submit (t 'registration.sign_in_submit'), id: 'submit_login_btn' %> |
|
29 |
+ <%= link_to (t 'registration.sign_up'), new_user_registration_path, class: 'btn btn-link ' %> |
|
30 |
+ <%= link_to (t 'registration.forgot_password'), new_user_password_path, class: 'btn btn-link ' %> |
|
23 | 31 |
|
24 | 32 |
|
25 |
- </div> |
|
26 |
- <div class="form-group" style="margin-top: 10px;"> |
|
33 |
+ </div> |
|
34 |
+ <div class="form-group" style="margin-top: 10px;"> |
|
27 | 35 |
|
28 |
- </div> |
|
29 |
- </fieldset> |
|
30 |
- </form> |
|
31 |
- </div> |
|
32 |
- </div> |
|
33 |
-</div> |
|
34 |
- |
|
35 |
- |
|
36 |
+ </div> |
|
37 |
+ </fieldset> |
|
38 |
+ </form> |
|
39 |
+ </div> |
|
40 |
+ </div> |
|
41 |
+ </div> |
|
42 |
+ <% end %> |
|
43 |
+ |
|
44 |
+ |
|
45 |
+ <% # End of Page Content %> |
|
46 |
+ <% end %> |
|
47 |
+ <% end %> |
|
36 | 48 |
<% end %> |
@@ -1,5 +1,6 @@ |
||
1 | 1 |
<div class="container nav-collapse"> |
2 | 2 |
<ul class="nav"> |
3 |
+ <li><%= link_to (t 'missions.missions'), missions_path %></li> |
|
3 | 4 |
<li><%= link_to "Blog", blog_path %></li> |
4 | 5 |
<li><%= link_to (t 'contact.contact'), contact_messages_path %></li> |
5 | 6 |
</ul> |
@@ -37,30 +37,28 @@ |
||
37 | 37 |
<%= javascript_include_tag "application" %> |
38 | 38 |
</head> |
39 | 39 |
<body> |
40 |
- |
|
41 |
- <div class="navbar navbar-fixed-top"> |
|
42 |
- <div class="navbar-inner"> |
|
43 |
- <div class="container"> |
|
44 |
- <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse"> |
|
45 |
- <span class="icon-bar"></span> |
|
46 |
- <span class="icon-bar"></span> |
|
47 |
- <span class="icon-bar"></span> |
|
48 |
- </a> |
|
49 |
- <%= render 'layouts/logo' %> |
|
50 |
- |
|
51 |
- <%= render 'layouts/navigation_links' %> |
|
52 |
- |
|
53 |
- </div> |
|
54 |
- </div> |
|
40 |
+ <div class="wrapper"> |
|
41 |
+ <div class="navbar navbar-fixed-top"> |
|
42 |
+ <div class="navbar-inner past-main"> |
|
43 |
+ <div class="container"> |
|
44 |
+ <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse"> |
|
45 |
+ <span class="icon-bar"></span> |
|
46 |
+ <span class="icon-bar"></span> |
|
47 |
+ <span class="icon-bar"></span> |
|
48 |
+ </a> |
|
49 |
+ <%= render 'layouts/logo' %> |
|
50 |
+ |
|
51 |
+ <%= render 'layouts/navigation_links' %> |
|
52 |
+ |
|
53 |
+ </div> |
|
54 |
+ </div> |
|
55 |
+ </div> |
|
56 |
+ |
|
57 |
+ <%= yield %> |
|
58 |
+ |
|
59 |
+ <div class="push"></div> |
|
55 | 60 |
</div> |
56 |
- |
|
57 |
- <div class="container top-container "> |
|
58 |
- <%= yield %> |
|
59 |
- |
|
60 |
- <%= render 'layouts/footer' %> |
|
61 |
- |
|
62 |
- |
|
63 |
- </div> <!-- /container --> |
|
64 |
- |
|
61 |
+ |
|
62 |
+ <%= render 'layouts/footer' %> |
|
65 | 63 |
</body> |
66 | 64 |
</html> |
@@ -53,16 +53,10 @@ |
||
53 | 53 |
</div> |
54 | 54 |
</div> |
55 | 55 |
</div> |
56 |
+ |
|
57 |
+ <%= yield %> |
|
56 | 58 |
|
57 |
- <div class="container top-container "> |
|
58 |
- <div class="row"> |
|
59 |
- <div class="span12"> |
|
60 |
- <%= bootstrap_flash %> |
|
61 |
- <%= yield %> |
|
62 |
- </div> |
|
63 |
- </div><!--/row--> |
|
64 |
- </div> <!-- /container --> |
|
65 |
- <div class="push"></div> |
|
59 |
+ <div class="push"></div> |
|
66 | 60 |
</div> |
67 | 61 |
|
68 | 62 |
<%= render 'layouts/footer' %> |
@@ -1,49 +1,59 @@ |
||
1 |
-<%= content_tag(:div, class: 'page-header') do %> |
|
2 |
- <%= content_tag(:h1) do %> |
|
3 |
- <%= t 'mission.missions' %> |
|
4 |
- <%= link_to 'New Mission', new_mission_path, class: 'btn btn-success' %> |
|
5 |
- <% end %> |
|
6 |
-<% end %> |
|
7 |
- |
|
8 |
-<%= content_tag(:h2, (t 'mission.featured_missions'))%> |
|
1 |
+<%= content_tag(:div, class: 'container top-container') do %> |
|
2 |
+ <%= content_tag(:div, class: 'row') do %> |
|
3 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
4 |
+ <%= bootstrap_flash %> |
|
5 |
+ |
|
6 |
+ <% # Page Content %> |
|
7 |
+ |
|
8 |
+ <%= content_tag(:div, class: 'page-header') do %> |
|
9 |
+ <%= content_tag(:h1) do %> |
|
10 |
+ <%= t 'mission.missions' %> |
|
11 |
+ <%= link_to 'New Mission', new_mission_path, class: 'btn btn-success' %> |
|
12 |
+ <% end %> |
|
13 |
+ <% end %> |
|
9 | 14 |
|
10 |
-<%= content_tag(:div, class: 'row-fluid box') do %> |
|
11 |
- <%= content_tag(:div, class: 'span8') do %> |
|
12 |
- <%= image_tag('http://placehold.it/1200x780')%> |
|
13 |
- <% end %> |
|
14 |
- <%= content_tag(:div, class: 'span4') do %> |
|
15 |
- <%= content_tag(:div, class: 'box-content') do%> |
|
16 |
- <%= content_tag(:h3, link_to(@featured_missions.title, @featured_missions)) %> |
|
17 |
- <%= content_tag(:p, @featured_missions.owner.full_name, class: 'mission-director-name') %> |
|
18 |
- <%= content_tag(:p, @featured_missions.objective, class: 'box-mission-description') %> |
|
19 |
- <%= content_tag(:div) do %> |
|
20 |
- <%= mission_agent_counter(@featured_missions) %> |
|
21 |
- <%= status(@featured_missions.status) %> |
|
22 |
- <%= mission_steps_counter(@featured_missions) %> |
|
15 |
+ <%= content_tag(:h2, (t 'mission.featured_missions'))%> |
|
16 |
+ |
|
17 |
+ <%= content_tag(:div, class: 'row-fluid box') do %> |
|
18 |
+ <%= content_tag(:div, class: 'span8') do %> |
|
19 |
+ <%= image_tag('http://placehold.it/1200x780')%> |
|
20 |
+ <% end %> |
|
21 |
+ <%= content_tag(:div, class: 'span4') do %> |
|
22 |
+ <%= content_tag(:div, class: 'box-content') do%> |
|
23 |
+ <%= content_tag(:h3, link_to(@featured_missions.title, @featured_missions)) %> |
|
24 |
+ <%= content_tag(:p, @featured_missions.owner.full_name, class: 'mission-director-name') %> |
|
25 |
+ <%= content_tag(:p, @featured_missions.objective, class: 'box-mission-description') %> |
|
26 |
+ <%= content_tag(:div) do %> |
|
27 |
+ <%= mission_agent_counter(@featured_missions) %> |
|
28 |
+ <%= status(@featured_missions.status) %> |
|
29 |
+ <%= mission_steps_counter(@featured_missions) %> |
|
30 |
+ <% end %> |
|
31 |
+ <% end %> |
|
32 |
+ <% end %> |
|
23 | 33 |
<% end %> |
24 |
- <% end %> |
|
25 |
- <% end %> |
|
26 |
-<% end %> |
|
27 | 34 |
|
28 | 35 |
|
29 | 36 |
|
30 | 37 |
|
31 |
-<%= content_tag(:h2, (t 'mission.open_missions'))%> |
|
38 |
+ <%= content_tag(:h2, (t 'mission.open_missions'))%> |
|
32 | 39 |
|
33 |
-<%= content_tag(:ul, class: 'thumbnails mission-list') do %> |
|
34 |
- <% @open_missions.each do |mission| %> |
|
35 |
- <%= render partial: "mission_box", locals: {mission: mission} %> |
|
36 |
- <% end %> |
|
37 |
-<% end %> |
|
40 |
+ <%= content_tag(:ul, class: 'thumbnails mission-list') do %> |
|
41 |
+ <% @open_missions.each do |mission| %> |
|
42 |
+ <%= render partial: "mission_box", locals: {mission: mission} %> |
|
43 |
+ <% end %> |
|
44 |
+ <% end %> |
|
45 |
+ |
|
46 |
+ <%= content_tag(:h2, (t 'mission.finished_missions'))%> |
|
38 | 47 |
|
39 |
-<%= content_tag(:h2, (t 'mission.finished_missions'))%> |
|
48 |
+ <%= content_tag(:ul, class: 'thumbnails mission-list') do %> |
|
49 |
+ <% @finished_missions.each do |mission| %> |
|
50 |
+ <%= render partial: "mission_box", locals: {mission: mission} %> |
|
51 |
+ <% end %> |
|
52 |
+ <% end %> |
|
53 |
+ |
|
54 |
+ <% # End of Page Content %> |
|
40 | 55 |
|
41 |
-<%= content_tag(:ul, class: 'thumbnails mission-list') do %> |
|
42 |
- <% @finished_missions.each do |mission| %> |
|
43 |
- <%= render partial: "mission_box", locals: {mission: mission} %> |
|
56 |
+ <% end %> |
|
44 | 57 |
<% end %> |
45 | 58 |
<% end %> |
46 | 59 |
|
47 |
-<br> |
|
48 |
- |
|
49 |
- |
@@ -1,53 +1,110 @@ |
||
1 |
-<%= content_tag(:div, class: 'page-header page-header-type') do %> |
|
2 |
- <%= content_tag(:small, (t 'mission.mission')+':') %> |
|
3 |
- <%= content_tag(:h1) do %> |
|
4 |
- <%= @mission.title %> |
|
5 |
- <%= status(@mission.status) %> |
|
1 |
+<%= content_tag(:div, class: 'container-bg container-pre-tabs') do %> |
|
2 |
+ <%= content_tag(:div, class: 'container top-container container-bg') do %> |
|
3 |
+ <%= content_tag(:div, class: 'row') do %> |
|
4 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
5 |
+ |
|
6 |
+ |
|
7 |
+ <% # Page Content %> |
|
8 |
+ |
|
9 |
+ |
|
10 |
+ <%= content_tag(:div, class: 'page-header page-header-type') do %> |
|
11 |
+ <%= content_tag(:small, (t 'mission.mission')+':') %> |
|
12 |
+ <%= content_tag(:h1) do %> |
|
13 |
+ <%= @mission.title %> |
|
14 |
+ <%= status(@mission.status) %> |
|
15 |
+ <% end %> |
|
16 |
+ <% end %> |
|
17 |
+ <% end %> |
|
18 |
+ <% end %> |
|
19 |
+ <%= content_tag(:div, class: 'row') do %> |
|
20 |
+ <%= content_tag(:div, class: 'span8') do %> |
|
21 |
+ <div class="videoWrapper"> |
|
22 |
+ <!-- Copy & Pasted from YouTube --> |
|
23 |
+ <iframe width="1280" height="720" src="https://www.youtube.com/embed/DvLYOcXUYgU?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe> |
|
24 |
+ </div> |
|
25 |
+ <% end %> |
|
26 |
+ <%= content_tag(:div, class: 'span4 mission-stats') do %> |
|
27 |
+ <%= content_tag(:span,'145', class: 'mission-timer timer-large') %> |
|
28 |
+ <%= content_tag(:br) %> |
|
29 |
+ <%= content_tag(:div, (t 'mission.days_left'), class: 'timer-legend') %> |
|
30 |
+ <div class="progress-bar progress-bar-mission-stats"> |
|
31 |
+ <div class="progress progress-striped"> |
|
32 |
+ <div class="bar bar-success" style="width: 30%;"></div> |
|
33 |
+ </div> |
|
34 |
+ <div class="percentage">30%</div> |
|
35 |
+ </div> |
|
36 |
+ <%= content_tag(:div, class: 'mission-completion-stats') do %> |
|
37 |
+ <%= mission_agent_counter(@mission, 'pull-left') %> |
|
38 |
+ <%= mission_steps_counter(@mission, 'pull-right') %> |
|
39 |
+ <% end %> |
|
40 |
+ <%= content_tag(:div, class: 'mission-director-stats') do %> |
|
41 |
+ <%= content_tag(:div, class: 'mission-director-avatar') do %> |
|
42 |
+ <% if @mission.owner.avatar.file != nil %> |
|
43 |
+ <%= image_tag @mission.owner.avatar.to_s, size: "64x64", :class => 'img-circle' %> |
|
44 |
+ <% else %> |
|
45 |
+ <%= image_tag "user.png", size: "64x64", :class => 'img-circle' %> |
|
46 |
+ <% end %> |
|
47 |
+ <% end %> |
|
48 |
+ <%= content_tag(:div, class: 'mission-director-text') do %> |
|
49 |
+ <%= content_tag(:span, (t 'mission.director')+':' , class: 'mission-director-legend') %><br> |
|
50 |
+ <%= content_tag(:span, @mission.owner.full_name , class: 'mission-director-name') %> |
|
51 |
+ <% end %> |
|
52 |
+ <% end %> |
|
53 |
+ <%= content_tag(:div, '', class: 'clearfix') %> |
|
54 |
+ <%= content_tag(:div, class: 'mission-call-to-action') do %> |
|
55 |
+ <%= link_to (t 'mission.join'), '#', class: 'btn btn-large' %> |
|
56 |
+ <% end %> |
|
57 |
+ |
|
58 |
+ <% end %> |
|
59 |
+ <% end %> |
|
6 | 60 |
<% end %> |
7 | 61 |
<% end %> |
8 | 62 |
|
9 | 63 |
|
10 |
-<p id="notice"><%= notice %></p> |
|
11 |
- |
|
12 |
-<p> |
|
13 |
- <strong>Mission agents:</strong> |
|
14 |
- <%= @mission.mission_agents %> |
|
15 |
-</p> |
|
16 |
- |
|
17 |
-<p> |
|
18 |
- <strong>Objective:</strong> |
|
19 |
- <%= @mission.objective %> |
|
20 |
-</p> |
|
21 |
- |
|
22 |
-<p> |
|
23 |
- <strong>Briefing:</strong> |
|
24 |
- <%= @mission.briefing %> |
|
25 |
-</p> |
|
26 |
- |
|
27 |
-<p> |
|
28 |
- <strong>Owner:</strong> |
|
29 |
- <%= @mission.owner %> |
|
30 |
-</p> |
|
31 | 64 |
|
32 |
-<p> |
|
33 |
- <strong>Status:</strong> |
|
34 |
- <%= @mission.status %> |
|
35 |
-</p> |
|
36 | 65 |
|
37 |
-<p> |
|
38 |
- <strong>Launched:</strong> |
|
39 |
- <%= @mission.launched %> |
|
40 |
-</p> |
|
66 |
+<%= content_tag(:div, class: 'container container-tabs') do %> |
|
67 |
+ <%= content_tag(:div, class: 'row') do %> |
|
68 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
69 |
+ <%= content_tag(:ul, class: 'nav nav-tabs') do %> |
|
70 |
+ <%= content_tag(:li, (link_to (t 'mission.briefing'), mission_path(@mission)), class: 'active') %> |
|
71 |
+ <%= content_tag(:li, (link_to (t 'mission.agents'), mission_agents_list_path(@mission))) %> |
|
72 |
+ <%= content_tag(:li, (link_to (t 'mission.chat'), '#'), class: 'disabled') %> |
|
73 |
+ <%= content_tag(:li, (link_to (t 'mission.log'), '#'), class: 'disabled') %> |
|
74 |
+ <% end %> |
|
75 |
+ <% end %> |
|
76 |
+ <% end %> |
|
77 |
+<% end %> |
|
41 | 78 |
|
42 |
-<p> |
|
43 |
- <strong>Language:</strong> |
|
44 |
- <%= @mission.language %> |
|
45 |
-</p> |
|
79 |
+<%= content_tag(:div, class: 'container container-last') do %> |
|
80 |
+ <%= content_tag(:div, class: 'row') do %> |
|
81 |
+ <%= content_tag(:div, class: 'span8 mission-briefing') do %> |
|
82 |
+ |
|
83 |
+ <%= content_tag(:h4, ((t 'mission.briefing') + ':') ) %> |
|
84 |
+ <%= @mission.briefing.html_safe %> |
|
85 |
+ |
|
86 |
+ |
|
87 |
+ <%= bootstrap_flash %> |
|
46 | 88 |
|
47 |
-<p> |
|
48 |
- <strong>Cover img:</strong> |
|
49 |
- <%= @mission.cover_img %> |
|
50 |
-</p> |
|
89 |
+ <% end %> |
|
90 |
+ <%= content_tag(:div, class: 'span4') do %> |
|
91 |
+ <%= content_tag(:h4, ((t 'mission.rewards') + ':') ) %> |
|
92 |
+ <%= content_tag(:ul, class: 'rewards') do %> |
|
93 |
+ <%= content_tag(:li) do %> |
|
94 |
+ <%= content_tag(:div, class: 'reward-badge ') do %> |
|
95 |
+ <%= image_tag "badges/beta_tester.png", size: "150x150" %><br> |
|
96 |
+ <%= content_tag(:p, content_tag(:small, 'Beta Tester Badge')) %> |
|
97 |
+ <% end %> |
|
98 |
+ <%= content_tag(:p, 'O badge de beta tester é entregue para todos que ajudam a testar os novos recursos do Avalanche Network.') %> |
|
99 |
+ <%= content_tag(:p) do %> |
|
100 |
+ <%= content_tag(:span, (t 'mission.agents')+': ', class: 'reward-agent-title') %> |
|
101 |
+ <% @mission.mission_agents.each do |agent| %> |
|
102 |
+ <%= content_tag(:span, (link_to agent.role.to_s, '#') , class: 'reward-agent-role') %>, |
|
103 |
+ <% end %> |
|
104 |
+ <% end %> |
|
105 |
+ <% end %> |
|
106 |
+ <% end %> |
|
107 |
+ <% end %> |
|
108 |
+ <% end %> |
|
109 |
+<% end %> |
|
51 | 110 |
|
52 |
-<%= link_to 'Edit', edit_mission_path(@mission) %> | |
|
53 |
-<%= link_to 'Back', missions_path %> |
@@ -0,0 +1,145 @@ |
||
1 |
+<%= content_tag(:div, class: 'container-bg container-pre-tabs') do %> |
|
2 |
+ <%= content_tag(:div, class: 'container top-container container-bg') do %> |
|
3 |
+ <%= content_tag(:div, class: 'row') do %> |
|
4 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
5 |
+ |
|
6 |
+ |
|
7 |
+ <% # Page Content %> |
|
8 |
+ |
|
9 |
+ |
|
10 |
+ <%= content_tag(:div, class: 'page-header page-header-type') do %> |
|
11 |
+ <%= content_tag(:small, (t 'mission.mission')+':') %> |
|
12 |
+ <%= content_tag(:h1) do %> |
|
13 |
+ <%= @mission.title %> |
|
14 |
+ <%= status(@mission.status) %> |
|
15 |
+ <% end %> |
|
16 |
+ <% end %> |
|
17 |
+ <% end %> |
|
18 |
+ <% end %> |
|
19 |
+ <%= content_tag(:div, class: 'row') do %> |
|
20 |
+ <%= content_tag(:div, class: 'span8') do %> |
|
21 |
+ <div class="videoWrapper"> |
|
22 |
+ <!-- Copy & Pasted from YouTube --> |
|
23 |
+ <iframe width="1280" height="720" src="https://www.youtube.com/embed/DvLYOcXUYgU?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe> |
|
24 |
+ </div> |
|
25 |
+ <% end %> |
|
26 |
+ <%= content_tag(:div, class: 'span4 mission-stats') do %> |
|
27 |
+ <%= content_tag(:span,'145', class: 'mission-timer timer-large') %> |
|
28 |
+ <%= content_tag(:br) %> |
|
29 |
+ <%= content_tag(:div, (t 'mission.days_left'), class: 'timer-legend') %> |
|
30 |
+ <div class="progress-bar progress-bar-mission-stats"> |
|
31 |
+ <div class="progress progress-striped"> |
|
32 |
+ <div class="bar bar-success" style="width: 30%;"></div> |
|
33 |
+ </div> |
|
34 |
+ <div class="percentage">30%</div> |
|
35 |
+ </div> |
|
36 |
+ <%= content_tag(:div, class: 'mission-completion-stats') do %> |
|
37 |
+ <%= mission_agent_counter(@mission, 'pull-left') %> |
|
38 |
+ <%= mission_steps_counter(@mission, 'pull-right') %> |
|
39 |
+ <% end %> |
|
40 |
+ <%= content_tag(:div, class: 'mission-director-stats') do %> |
|
41 |
+ <%= content_tag(:div, class: 'mission-director-avatar') do %> |
|
42 |
+ <% if @mission.owner.avatar.file != nil %> |
|
43 |
+ <%= image_tag @mission.owner.avatar.to_s, size: "64x64", :class => 'img-circle' %> |
|
44 |
+ <% else %> |
|
45 |
+ <%= image_tag "user.png", size: "64x64", :class => 'img-circle' %> |
|
46 |
+ <% end %> |
|
47 |
+ <% end %> |
|
48 |
+ <%= content_tag(:div, class: 'mission-director-text') do %> |
|
49 |
+ <%= content_tag(:span, (t 'mission.director')+':' , class: 'mission-director-legend') %><br> |
|
50 |
+ <%= content_tag(:span, @mission.owner.full_name , class: 'mission-director-name') %> |
|
51 |
+ <% end %> |
|
52 |
+ <% end %> |
|
53 |
+ <%= content_tag(:div, '', class: 'clearfix') %> |
|
54 |
+ <%= content_tag(:div, class: 'mission-call-to-action') do %> |
|
55 |
+ <%= link_to (t 'mission.join'), '#', class: 'btn btn-large' %> |
|
56 |
+ <% end %> |
|
57 |
+ |
|
58 |
+ <% end %> |
|
59 |
+ <% end %> |
|
60 |
+ <% end %> |
|
61 |
+<% end %> |
|
62 |
+ |
|
63 |
+ |
|
64 |
+<% # Tabs ---------- %> |
|
65 |
+ |
|
66 |
+<%= content_tag(:div, class: 'container container-tabs') do %> |
|
67 |
+ <%= content_tag(:div, class: 'row') do %> |
|
68 |
+ <%= content_tag(:div, class: 'span12') do %> |
|
69 |
+ <%= content_tag(:ul, class: 'nav nav-tabs') do %> |
|
70 |
+ <%= content_tag(:li, (link_to (t 'mission.briefing'), mission_path(@mission))) %> |
|
71 |
+ <%= content_tag(:li, (link_to (t 'mission.agents'), mission_agents_list_path(@mission)), class: 'active') %> |
|
72 |
+ <%= content_tag(:li, (link_to (t 'mission.chat'), '#'), class: 'disabled') %> |
|
73 |
+ <%= content_tag(:li, (link_to (t 'mission.log'), '#'), class: 'disabled') %> |
|
74 |
+ <% end %> |
|
75 |
+ <% end %> |
|
76 |
+ <% end %> |
|
77 |
+<% end %> |
|
78 |
+ |
|
79 |
+<% # Content -------- %> |
|
80 |
+ |
|
81 |
+<%= content_tag(:div, class: 'container container-last top-container') do %> |
|
82 |
+ <%= content_tag(:div, class: 'row') do %> |
|
83 |
+ <%= content_tag(:div, class: 'span12 mission-agents') do %> |
|
84 |
+ |
|
85 |
+ |
|
86 |
+ |
|
87 |
+ <%= bootstrap_flash %> |
|
88 |
+ |
|
89 |
+ <%= content_tag(:ul, class: 'thumbnails mission-list') do %> |
|
90 |
+ <% @mission.mission_agents.each do |agent| %> |
|
91 |
+ <%= content_tag(:li, class: 'span4') do %> |
|
92 |
+ <% content_tag(:div, class: 'thumbnail') do %> |
|
93 |
+ <%= content_tag(:div, class: 'thumbnail-content') do%> |
|
94 |
+ <%= content_tag(:h3, agent.role) %> |
|
95 |
+ <%= content_tag(:p, agent.objective, class: 'thumbnail-agent-description') %> |
|
96 |
+ <% end %> |
|
97 |
+ <% # Steps %> |
|
98 |
+ <% step_count = 0 %> |
|
99 |
+ <% has_shown_more_tasks = false %> |
|
100 |
+ <% agent.agent_steps.order('step ASC').each do |step| %> |
|
101 |
+ <% step_count = step_count + 1 %> |
|
102 |
+ <% if step_count <= 2 || agent.agent_steps.count <= 3 %> |
|
103 |
+ <%= content_tag(:div, class: 'thumbnail-task') do %> |
|
104 |
+ <%= content_tag(:p) do %> |
|
105 |
+ <%= content_tag(:span, step.step, class: 'task-number') %> |
|
106 |
+ <%= content_tag(:span, step.title, class: 'task-text') %> |
|
107 |
+ <%= content_tag(:span, '<i class="fa fa-picture-o"></i>'.html_safe, class: 'task-icon') %> |
|
108 |
+ <% end %> |
|
109 |
+ <% end %> |
|
110 |
+ <% else %> |
|
111 |
+ <% if has_shown_more_tasks == false %> |
|
112 |
+ <% has_shown_more_tasks = true %> |
|
113 |
+ <%= content_tag(:div, class: 'thumbnail-task') do %> |
|
114 |
+ <%= content_tag(:p, class: 'task-show-all') do %> |
|
115 |
+ <%= content_tag(:span, ('+ ' + (agent.agent_steps.count - step_count).to_s + ' ' + (t 'mission.steps')).html_safe) %> |
|
116 |
+ <% end %> |
|
117 |
+ <% end %> |
|
118 |
+ <% end %> |
|
119 |
+ <% end %> |
|
120 |
+ <% end %> |
|
121 |
+ <% # Rewards %> |
|
122 |
+ <%= content_tag(:div, class: 'thumbnail-content') do%> |
|
123 |
+ <%= content_tag(:h4, (t 'mission.rewards')) %> |
|
124 |
+ <%= content_tag(:div, class: 'reward-badge ') do %> |
|
125 |
+ <%= image_tag "badges/beta_tester.png", size: "150x150" %><br> |
|
126 |
+ <%= content_tag(:p, content_tag(:small, 'Beta Tester Badge')) %> |
|
127 |
+ <% end %> |
|
128 |
+ <% end %> |
|
129 |
+ <% # Selected Agent %> |
|
130 |
+ <%= content_tag(:div, class: 'thumbnail-content thumbnail-line-top') do%> |
|
131 |
+ <%= content_tag(:h4, (t 'mission.no_agent_selected')+'') %> |
|
132 |
+ <% end %> |
|
133 |
+ <%= content_tag(:div, class: 'thumbnail-open-agent-slot') do %> |
|
134 |
+ <%= link_to (t 'mission.apply_for_position'), '#', class: 'btn' %> |
|
135 |
+ <% end %> |
|
136 |
+ <% end %> |
|
137 |
+ <% end %> |
|
138 |
+ <% end %> |
|
139 |
+ <% end %> |
|
140 |
+ |
|
141 |
+ |
|
142 |
+ <% end %> |
|
143 |
+ <% end %> |
|
144 |
+<% end %> |
|
145 |
+ |
@@ -1,6 +1,7 @@ |
||
1 | 1 |
Avalanche2::Application.routes.draw do |
2 | 2 |
|
3 | 3 |
resources :missions |
4 |
+ get '/missions/:id/agents', to: 'missions#show_agents', as: :mission_agents_list |
|
4 | 5 |
|
5 | 6 |
root 'start#index' |
6 | 7 |
|