Panel CSS

jamesperet 10 anos atrás
pai
commit
e1ad0da6f0

+ 37 - 0
app/assets/stylesheets/avalanche_theme.css.less

@@ -297,6 +297,43 @@ h4 {
297 297
 	margin-right: auto;
298 298
 }
299 299
 
300
+// Panel
301
+
302
+.panel.panel-default { 
303
+	margin-top: 15px;
304
+	.box-theme; 
305
+}
306
+
307
+.panel {
308
+	.panel-heading {
309
+		background-color: @light-gray;
310
+		height: 42px;
311
+		.theme-box-padding;
312
+		
313
+	}
314
+	.panel-title {
315
+		margin-top: 0px;
316
+		margin-bottom: 0px;
317
+		.task-text {
318
+			font-size: 18px;
319
+			padding-top: 8px;
320
+		}
321
+		.caret {
322
+			float: left;
323
+			margin-top: 14px;
324
+			margin-right: 5px;
325
+			margin-left: 5px;
326
+		}
327
+	}
328
+	.panel-body {
329
+		.panel-content {
330
+			.theme-box-padding;
331
+		}
332
+	}
333
+	.panel-body.in { border-top: @theme-border; }
334
+	.panel-footer {}
335
+} 
336
+
300 337
 
301 338
 // Footer
302 339
 

+ 43 - 10
app/assets/stylesheets/colors.less

@@ -1,20 +1,53 @@
1 1
 // Color Swatch
2 2
 // -----------------------
3 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;
4
+// Swatch 1 (old)
5
+
6
+@s1_black: #202020;
7
+@s1_dark-gray: #1D1D26;
8
+@s1_medium-gray: #737389;
9
+@s1_light-gray: #D4D4DE;
10
+@s1_red: #F26C63;
11
+@s1_blue: #55B3DA;
12
+@s1_yellow: #F2CB63;
13
+@s1_green: #92BC64;
14
+@s1_white: white;
15
+
16
+// Swatch 2 (new)
17
+
18
+@s2_black: #202020;
19
+@s2_dark-gray: #3C3F47;
20
+@s2_medium-gray: #AFB4BF;
21
+@s2_light-gray: #F3F3F3;
22
+@s2_red: #ED5A51;
23
+@s2_blue: #55A2DA;
24
+@s2_yellow: #F2CB63;
25
+@s2_green: #92BC64;
26
+@s2_white: white;
27
+
28
+
29
+@black: @s2_black;
30
+@dark-gray: @s2_dark-gray;
31
+@medium-gray: @s2_medium-gray;
32
+@light-gray: @s2_light-gray;
33
+@red: @s2_red;
34
+@blue: @s2_blue;
35
+@yellow: @s2_yellow;
36
+@green: @s2_green;
37
+@white: @s2_white;
13 38
 
14 39
 @bg-ligh-gray: #F3F3F3;
40
+
15 41
 @hr-dark: @dark-gray;
16 42
 
17 43
 @border-dark: @dark-gray;
18 44
 @border-width: 2px;
19 45
 
20
-@theme-border: 2px solid @ligh-gray;
46
+@theme-border: 2px solid @medium-gray;
47
+
48
+.theme-box-padding { padding: 8px }
49
+
50
+.box-theme() {
51
+	border: @theme-border;
52
+	border-radius: 4px;
53
+}

+ 1 - 1
app/assets/stylesheets/missions.css.less

@@ -24,7 +24,7 @@
24 24
 }
25 25
 
26 26
 .status-planning {
27
-	background-color: @ligh-gray;
27
+	background-color: @light-gray;
28 28
 }
29 29
 
30 30
 .status-launched {

+ 1 - 0
app/models/agent_step.rb

@@ -1,3 +1,4 @@
1 1
 class AgentStep < ActiveRecord::Base
2 2
   belongs_to :mission_agent
3
+  has_many :step_validations
3 4
 end

+ 1 - 1
app/views/agents/dashboard.html.erb

@@ -88,7 +88,7 @@
88 88
 						<% content_tag(:div, class: 'thumbnail') do %>
89 89
 							<%= content_tag(:div, class: 'thumbnail-content') do%>
90 90
 								<%= content_tag(:h4, (t 'mission.mission')+':', class: 'dashboard-role') %>
91
-						          <%= content_tag(:h2, link_to(agent.mission.title, agent.mission)) %>
91
+						          <%= content_tag(:h2, link_to(agent.mission.title, mission_agent_details_path(agent.mission, agent))) %>
92 92
 								<%= content_tag(:h4, (t 'agent.role')+':', class: 'dashboard-role') %>
93 93
 						          <%= content_tag(:p, agent.role ) %>
94 94
 								<%= content_tag(:h4, (t 'agent.next_steps')+':', class: 'dashboard-role') %>

+ 23 - 0
app/views/missions/show_agent_details.html.erb

@@ -70,4 +70,27 @@
70 70
 			<% end %>
71 71
 		<% end %>
72 72
 	<% end %>
73
+	<%= content_tag(:div, class: 'row') do %>
74
+		<%= content_tag(:div, class: 'span12 accordion', id: 'colapse_steps') do %>
75
+			<%= content_tag(:h4, ((t 'agent.tasks') + ':') ) %>
76
+			<% # Steps %>
77
+			<% @agent.agent_steps.order('step ASC').each do |step| %>
78
+				<%= content_tag(:div, class: 'panel panel-default accordion-group') do %>
79
+					<%= content_tag(:div, class: 'panel-heading accordion-heading') do %>
80
+						<%= content_tag(:h3, class: 'panel-title') do %>
81
+							<%= content_tag(:span, step.step, class: 'task-number') %>
82
+							<a class="accordion-toggle" data-toggle="collapse" data-parent="#colapse_steps" href="#collapse_step_<%= step.step %>">
83
+								<span class="caret"></span>
84
+								<%= content_tag(:span, step.title, class: 'task-text') %>
85
+							</a>
86
+							
87
+						<% end %>
88
+					<% end %>
89
+					<%= content_tag(:div, class: 'panel-body accordion-body collapse', id: ('collapse_step_'+ step.step.to_s)) do %>
90
+						<div class="panel-content accordion-inner">dsfsdfsdfsdfsdf</div>
91
+					<% end %>
92
+				<% end %>
93
+			<% end %>
94
+		<% end %>
95
+	<% end %>
73 96
 <% end %>

+ 7 - 0
readme.md

@@ -43,3 +43,10 @@ Second prototype source code of the avalanche network web app.
43 43
 	MAILCHIMP_LIST_ID:
44 44
 	REDISTOGO_URL:
45 45
 ```
46
+
47
+## Notes
48
+
49
+agent_step
50
+   - step_validations
51
+   - step_submissions
52
+       - step_verification