Layout fixes

James Peret 10 年之前
父節點
當前提交
5160b1ac35

+ 7 - 1
app/assets/stylesheets/agents.css.less

@@ -4,4 +4,10 @@
4 4
 
5 5
 .thumbnails.mission-list {
6 6
 	margin-top: 20px;
7
-}
7
+}
8
+
9
+.agent-box-header { height: 120px; }
10
+
11
+.thumbnails > li.mission-agent-thumb { margin-bottom: 45px;}
12
+
13
+.mission-agent-thumb .task-icon i { margin-left: 5px;}

+ 1 - 1
app/assets/stylesheets/avl2_theme/panel.less

@@ -63,7 +63,7 @@
63 63
 		}
64 64
 		.task-number { line-height: 36px;}
65 65
 		.task-icon { padding-top: 7px }
66
-		.task-icon i { color: @black }
66
+		.task-icon i { color: @black; }
67 67
 		.task-icon.mission-control { float: left; 
68 68
 			padding-top: 0px;
69 69
 			margin-top: -3px;

+ 2 - 0
app/assets/stylesheets/missions.css.less

@@ -235,6 +235,8 @@
235 235
 	margin-bottom: -2px;
236 236
 }
237 237
 
238
+.thumbnail-task-empty { height: 48px; }
239
+
238 240
 .thumbnail-task p { 
239 241
 	height: 44px;
240 242
 	margin-bottom: 4px;

+ 0 - 8
app/views/missions/_mission_details.html.erb

@@ -11,14 +11,6 @@
11 11
 					<%= content_tag(:small, (t 'mission.mission')+':') %>
12 12
 					<%= content_tag(:h1) do %>
13 13
 						<%=  mission.title %>
14
-						<% if user_signed_in? %>
15
-							<% if current_user == mission.owner %>
16
-								<%= link_to (t 'nav.edit'), edit_mission_path(mission), class: 'btn btn-mini' %>
17
-							<% end %>
18
-							<% if mission.mission_agents.find_by_user_id(current_user.id) != nil || current_user == mission.owner %>
19
-								<%= link_to (t 'nav.back'), dashboard_path, class: 'btn btn-mini' %>
20
-							<% end %>
21
-						<% end %>
22 14
 						<%= status(mission.status) %>
23 15
 					<% end %>
24 16
 				<% end %>

+ 5 - 0
app/views/missions/_step_quick_list.html.erb

@@ -1,6 +1,7 @@
1 1
 <% step_count = 0 %>
2 2
 <% has_shown_more_tasks = false %>
3 3
 
4
+
4 5
 <% agent.agent_steps.order('step ASC').each do |step| %>
5 6
 	<% if agent.agent_steps.count > 1 %>
6 7
 		<% step_count = step_count + 1 %>
@@ -12,6 +13,10 @@
12 13
 					<%= content_tag(:span, step.icons.html_safe, class: 'task-icon pull-right') %>
13 14
 				<% end %>
14 15
 			<% end %>
16
+			<% if step_count == 2 && agent.agent_steps.count == 2 %>
17
+				<%= content_tag(:div, '', class: 'thumbnail-task thumbnail-task-empty') %>
18
+			<% end %>
19
+		
15 20
 		<% else %>
16 21
 			<% if has_shown_more_tasks == false %>
17 22
 				<% has_shown_more_tasks = true %>

+ 2 - 2
app/views/missions/show_agents.html.erb

@@ -15,9 +15,9 @@
15 15
 			<%= content_tag(:ul, class: 'thumbnails mission-list') do %>
16 16
 				<%  @mission.mission_agents.each do |agent| %>
17 17
 					<% role = agent.role.to_s %>
18
-					<%= content_tag(:li, class: 'span4', id: "agent-#{role.tr(' ', '-').tr('.', '')}".downcase) do %>
18
+					<%= content_tag(:li, class: 'span4 mission-agent-thumb', id: "agent-#{role.tr(' ', '-').tr('.', '')}".downcase) do %>
19 19
 						<% content_tag(:div, class: 'thumbnail') do %>
20
-							<%= content_tag(:div, class: 'thumbnail-content') do%>
20
+							<%= content_tag(:div, class: 'thumbnail-content agent-box-header') do%>
21 21
 						          <%= content_tag(:h3, (link_to agent.role, mission_agent_details_path(@mission, agent))) %>
22 22
 						          <%= content_tag(:p, agent.objective, class: 'thumbnail-agent-description') %>
23 23
 							<% end %>