Bug fixing 1

James Peret 10 anos atrás
pai
commit
670e2a0ade

+ 7 - 3
app/assets/stylesheets/missions.css.less

@@ -96,21 +96,25 @@
96 96
 }
97 97
 
98 98
 .mission-director-stats {
99
-	width: 50%;
99
+	display: flex;
100
+	flex-direction: row;
101
+	flex-wrap: nowrap;
102
+	justify-content: center; 
103
+	text-align: left;
100 104
 	margin-top: 100px;
101 105
 	margin-left: auto;
102 106
 	margin-right: auto;
103 107
 }
104 108
 
105 109
 .mission-director-text {
110
+	order: 2;
106 111
 	float: left;
107
-	text-align: left;
108 112
 	margin-top: 10px;
109 113
 	margin-left: 15px;
110 114
 }
111 115
 
112 116
 .mission-director-avatar {
113
-	float: left;
117
+	order: 1;
114 118
 }
115 119
 
116 120
 .mission-director-legend {

+ 1 - 1
app/views/mission_editor/agents/_form.html.erb

@@ -11,7 +11,7 @@
11 11
 						<%= content_tag(:div, class: "panel-text") do %>
12 12
 							<%= content_tag(:div, class: "form-inputs") do %>
13 13
 							    <%= f.text_field :role, label: (t 'mission_editor.agents.role'), class: 'input-block-level' %>
14
-							    <%= f.text_area :objective, label: (t 'mission_editor.agents.objective'), class: 'input-block-level', rows: 5 %>
14
+							    <% f.text_area :objective, label: (t 'mission_editor.agents.objective'), class: 'input-block-level', rows: 5 %>
15 15
 							    <%= f.text_area :briefing, label: (t 'mission_editor.mission_details.briefing'), class: 'input-block-level', rows: 10 %>
16 16
 							<% end %>
17 17
 						<% end %>

+ 2 - 0
app/views/mission_editor/agents/index.html.erb

@@ -1,3 +1,5 @@
1
+<% title "#{t 'mission_editor.agents.edit_agents'} - #{@config.website_name}" %>
2
+
1 3
 <%= render :partial => 'missions/mission_editor_tabs' %>
2 4
 
3 5
 <%= render :partial => 'layouts/flash' %>

+ 1 - 1
app/views/mission_editor/details/launch.html.erb

@@ -21,7 +21,7 @@
21 21
 			     	<%= content_tag(:p) do %>
22 22
 						<%= link_to (t'nav.back'), mission_agents_path(@mission), class: 'btn spacer-right-small' %>
23 23
 						<%= link_to((t'mission_editor.review_mission'), mission_path(@mission), class: 'btn')%>
24
-						<%= link_to((t'mission_editor.launch_mission'), launch_mission_path(@mission), class: 'btn btn-success btn-huge')%>
24
+						<%= link_to((t'mission_editor.launch_mission'), launch_mission_path(@mission), class: 'btn btn-success btn-huge') if @mission.launched == false %>
25 25
 						<%= link_to (t'mission_editor.continue_later'), missions_path, class: 'btn btn-link btn-danger' %>
26 26
 					<% end %>
27 27
 					

+ 1 - 1
app/views/missions/_mission_details.html.erb

@@ -18,7 +18,7 @@
18 18
 		<% end %>
19 19
 		<%= content_tag(:div, class: 'row') do %>
20 20
 			<%= content_tag(:div, class: 'span8') do %>
21
-				<% if @mission.video != nil %>
21
+				<% if !@mission.video.empty? %>
22 22
 					<%= content_tag(:div, class: "videoWrapper") do %>          
23 23
 					    <iframe width="1280" height="720" src="https://www.youtube.com/embed/<%= @mission.video[/(?<=[?&]v=)[^&$]+/] %>?showinfo=0" frameborder="0" allowfullscreen></iframe>
24 24
 					<% end %>

+ 4 - 2
app/views/missions/show.html.erb

@@ -6,8 +6,10 @@
6 6
 	<%= content_tag(:div, class: 'row') do %>
7 7
 		<%= content_tag(:div, class: 'span8 mission-briefing') do %>
8 8
 			
9
-			<%= content_tag(:h4, ((t 'mission.objective') + ':') ) %>
10
-			<%= @mission.objective.html_safe %>
9
+			<% if @mission.objective != nil %>
10
+				<%= content_tag(:h4, ((t 'mission.objective') + ':') ) %>
11
+				<%= @mission.objective.html_safe %>
12
+			<% end %>
11 13
 			
12 14
 			<%= content_tag(:h4, ((t 'mission.briefing') + ':') ) %>
13 15
 			<%= @mission.briefing.html_safe %>

+ 2 - 0
config/locales/mission.en.yml

@@ -53,6 +53,8 @@ en:
53 53
       page_title: 'Agents'
54 54
       add_agent: 'Add Agent'
55 55
       no_agents: 'No agents'
56
+      edit_agent: 'Edit agent'
57
+      edit_agents: 'Agents'
56 58
       add: 'Add Agent Role'
57 59
       role: 'Agent Role'
58 60
       objective: 'Objective'

+ 2 - 0
config/locales/mission.pt-BR.yml

@@ -51,6 +51,8 @@ pt-BR:
51 51
       page_title: 'Agentes'
52 52
       add_agent: 'Criar agente'
53 53
       no_agents: 'Nenhum agente'
54
+      edit_agent: 'Editar agente'
55
+      edit_agents: 'Agentes'
54 56
       add: 'Adicionar agente'
55 57
       role: 'Papel do agente'
56 58
       objective: 'Objetivo'