changed mission editor page order (details -> agents -> rewards -> launch)

James Peret 10 anos atrás
pai
commit
8afaeb252f

+ 2 - 2
app/controllers/missions_controller.rb

@@ -51,7 +51,7 @@ class MissionsController < ApplicationController
51 51
     @analytics.track('Mission created')
52 52
     respond_to do |format|
53 53
       if @mission.save
54
-        format.html { redirect_to rewards_path(@mission), notice: 'Mission was successfully created.' }
54
+        format.html { redirect_to agents_path(@mission), notice: 'Mission was successfully created.' }
55 55
         format.json { render action: 'show', status: :created, location: @mission }
56 56
       else
57 57
         format.html { render action: 'new' }
@@ -66,7 +66,7 @@ class MissionsController < ApplicationController
66 66
     respond_to do |format|
67 67
       if @mission.update(mission_params)
68 68
         puts mission_params
69
-        format.html { redirect_to mission_control_path(@mission), notice: 'Mission was successfully updated.' }
69
+        format.html { redirect_to mission_editor_launch_path(@mission), notice: 'Mission was successfully updated.' }
70 70
         format.json { head :no_content }
71 71
       else
72 72
         format.html { render action: 'edit' }

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

@@ -42,8 +42,8 @@
42 42
 			<%= content_tag(:div, class: 'span12') do %>
43 43
 			     <%= content_tag(:div, class: "form-submit-center") do %>
44 44
 			     	<%= content_tag(:p) do %>
45
-						<%= link_to (t'nav.back'), rewards_path(@mission), class: 'btn spacer-right-small' %>
46
-						<%= link_to((t'nav.next'), mission_editor_launch_path(@mission), class: 'btn btn-success')%>
45
+						<%= link_to (t'nav.back'), edit_mission_path(@mission), class: 'btn spacer-right-small' %>
46
+						<%= link_to((t'nav.next'), rewards_path(@mission), class: 'btn btn-success')%>
47 47
 					<% end %>
48 48
 					<%= content_tag(:p) do %>
49 49
 						<%= link_to (t'mission_editor.continue_later'), missions_path, class: 'btn btn-link btn-danger' %>

+ 2 - 2
app/views/mission_editor/rewards/index.html.erb

@@ -45,8 +45,8 @@
45 45
 			<%= content_tag(:div, class: 'span12') do %>
46 46
 			     <%= content_tag(:div, class: "form-submit-center") do %>
47 47
 			     	<%= content_tag(:p) do %>
48
-						<%= link_to (t'nav.back'), edit_mission_path(@mission), class: 'btn spacer-right-small' %>
49
-						<%= link_to((t'nav.next'), mission_agents_path(@mission), class: 'btn btn-success')%>
48
+						<%= link_to (t'nav.back'), mission_agents_path(@mission), class: 'btn spacer-right-small' %>
49
+						<%= link_to((t'nav.next'), mission_editor_launch_path(@mission), class: 'btn btn-success')%>
50 50
 					<% end %>
51 51
 					<%= content_tag(:p) do %>
52 52
 						<%= link_to (t'mission_editor.continue_later'), missions_path, class: 'btn btn-link btn-danger' %>

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

@@ -24,7 +24,7 @@
24 24
   	<%= content_tag(:p) do %>
25 25
 		<% if params[:action] == 'edit' %>
26 26
 			<%= f.submit (t 'mission_editor.mission_details.save'), class: 'btn btn-large btn-success spacer-left-small' %>
27
-			<%= link_to((t'nav.next'), rewards_path(@mission), class: 'btn ')%>
27
+			<%= link_to((t'nav.next'), mission_agents_path(@mission), class: 'btn ')%>
28 28
 		<% else%>
29 29
   			<%= f.submit (t 'mission_editor.mission_details.save_and_continue'), class: 'btn btn-large btn-success all-caps' %>
30 30
 		<% end %>

+ 12 - 12
app/views/missions/_mission_editor_tabs.html.erb

@@ -19,31 +19,31 @@
19 19
 							<% end %>
20 20
 						<% end %>
21 21
 					<% end %>
22
-					<% # Rewards %>
22
+					<% # Agents %>
23 23
 					<% if params[:action] == 'new' %>
24 24
 						<%= content_tag(:li, class: 'step') do %>
25
-							<%= content_tag(:div, '2', class: "circle #{'current' if params[:controller] == 'mission_editor/rewards'}") %><br>
26
-							<%= content_tag(:div, (t 'mission_editor.mission_details.rewards'), class: 'description') %>
25
+							<%= content_tag(:div, '2', class: "circle #{'current' if params[:controller] == 'mission_editor/agents'}") %><br>
26
+							<%= content_tag(:div, (t 'mission_editor.mission_details.agents'), class: 'description') %>
27 27
 						<% end %>
28 28
 					<% else %>
29
-						<%= link_to(rewards_path(@mission)) do %>
29
+						<%= link_to(mission_agents_path(@mission)) do %>
30 30
 							<%= content_tag(:li, class: 'step') do %>
31
-								<%= content_tag(:div, '2', class: "circle #{'current' if params[:controller] == 'mission_editor/rewards'}") %><br>
32
-								<%= content_tag(:div, (t 'mission_editor.mission_details.rewards'), class: 'description') %>
31
+								<%= content_tag(:div, '2', class: "circle #{'current' if params[:controller] == 'mission_editor/agents'}") %><br>
32
+								<%= content_tag(:div, (t 'mission_editor.mission_details.agents'), class: 'description') %>
33 33
 							<% end %>
34 34
 						<% end %>
35 35
 					<% end %>
36
-					<% # Agents %>
36
+					<% # Rewards %>
37 37
 					<% if params[:action] == 'new' %>
38 38
 						<%= content_tag(:li, class: 'step') do %>
39
-							<%= content_tag(:div, '3', class: "circle #{'current' if params[:controller] == 'mission_editor/agents'}") %><br>
40
-							<%= content_tag(:div, (t 'mission_editor.mission_details.agents'), class: 'description') %>
39
+							<%= content_tag(:div, '3', class: "circle #{'current' if params[:controller] == 'mission_editor/rewards'}") %><br>
40
+							<%= content_tag(:div, (t 'mission_editor.mission_details.rewards'), class: 'description') %>
41 41
 						<% end %>
42 42
 					<% else %>
43
-						<%= link_to(mission_agents_path(@mission)) do %>
43
+						<%= link_to(rewards_path(@mission)) do %>
44 44
 							<%= content_tag(:li, class: 'step') do %>
45
-								<%= content_tag(:div, '3', class: "circle #{'current' if params[:controller] == 'mission_editor/agents'}") %><br>
46
-								<%= content_tag(:div, (t 'mission_editor.mission_details.agents'), class: 'description') %>
45
+								<%= content_tag(:div, '3', class: "circle #{'current' if params[:controller] == 'mission_editor/rewards'}") %><br>
46
+								<%= content_tag(:div, (t 'mission_editor.mission_details.rewards'), class: 'description') %>
47 47
 							<% end %>
48 48
 						<% end %>
49 49
 					<% end %>