Permalink
Browse files

Format changes to preconditions and outcomes

Some HTML formatting. Also removed some no longer used stylesheets.
  • Loading branch information...
1 parent 1e10dfe commit 2203c80b2d5af99be54ad8ea137a327967ea2cda @sleepingstu sleepingstu committed Aug 11, 2011
Showing with 129 additions and 1,487 deletions.
  1. +13 −18 app/views/outcomes/_outcome.html.erb
  2. +9 −12 app/views/outcomes/_outcomes.html.erb
  3. +1 −1 app/views/outcomes/create.js.rjs
  4. +1 −1 app/views/outcomes/index.js.rjs
  5. +1 −1 app/views/outcomes/new.js.rjs
  6. +13 −18 app/views/preconditions/_precondition.html.erb
  7. +9 −13 app/views/preconditions/_preconditions.html.erb
  8. +1 −1 app/views/preconditions/create.js.rjs
  9. +1 −1 app/views/preconditions/index.js.rjs
  10. +1 −1 app/views/preconditions/new.js.rjs
  11. +30 −27 app/views/scenarios/_scenario.html.erb
  12. +17 −17 app/views/scenarios/_scenarios.html.erb
  13. +1 −1 app/views/scenarios/index.js.rjs
  14. +1 −1 app/views/scenarios/new.js.rjs
  15. +2 −2 app/views/stories/_form.html.erb
  16. +3 −7 app/views/stories/_story.html.erb
  17. +0 −31 app/views/stories/index.html.erb
  18. BIN public/images/agplv3.png
  19. +0 −79 public/stylesheets/application.css
  20. +0 −22 public/stylesheets/blueprint/ie.css
  21. +0 −29 public/stylesheets/blueprint/print.css
  22. +0 −226 public/stylesheets/blueprint/screen.css
  23. +25 −6 public/stylesheets/branston.css
  24. +0 −54 public/stylesheets/scaffold.css
  25. +0 −512 public/stylesheets/style.css
  26. BIN public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  27. BIN public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
  28. BIN public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
  29. BIN public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
  30. BIN public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
  31. BIN public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
  32. BIN public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
  33. BIN public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  34. BIN public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  35. BIN public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png
  36. BIN public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png
  37. BIN public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png
  38. BIN public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png
  39. BIN public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png
  40. +0 −406 public/stylesheets/ui-lightness/jquery-ui-1.7.2.custom.css
@@ -1,19 +1,14 @@
-<!-- outcomes/_outcome.html.erb -->
- <li id="<%= element_id(@outcome) %>" class="outcome">
- <% if @outcome.created_at.nil? -%>
- <% remote_form_for @outcome do |f| -%>
- <%= hidden_field_tag 'scenario_id', @scenario.id %>
- <div>
- <%= f.label :description %>
- <%= f.text_area :description, :size => "50x2" %>
- <%= f.submit 'Create' %>
- </div>
- <% end -%>
- <% else -%>
- <p>
- <%= in_place_editor_field 'outcome', 'description' %>&nbsp;&bull;
- <%= link_to_remote "Delete", :url => @outcome, :confirm => 'Delete this expected result?', :method => :delete, :class => "delete" %>
- </p>
- <% end -%>
- </li>
+<p id="<%= element_id(@outcome) %>" class="outcome">
+<% if @outcome.created_at.nil? -%>
+ <% remote_form_for @outcome do |f| -%>
+ <%= hidden_field_tag 'scenario_id', @scenario.id %>
+ <%= f.label :description %>
+ <%= f.text_area :description %>
+ <%= f.submit 'Create' %>
+ <% end -%>
+<% else -%>
+ <%= in_place_editor_field 'outcome', 'description' %>&nbsp;&bull;
+ <%= link_to_remote "Delete", :url => @outcome, :confirm => 'Delete this expected result?', :method => :delete, :class => "delete" %>
+<% end -%>
+</p>
@@ -1,13 +1,10 @@
-<!-- outcomes/_outcomes.html.erb -->
- <div>
- <%= link_to_remote 'Add outcome', {:url => new_outcome_path(:scenario_id => @scenario.id), :method => 'GET'}, :class => "add-small" %>
- <% unless @outcomes.nil? or @outcomes.empty? -%>
- <ol>
- <% @outcomes.each do |outcome| -%>
- <% @outcome = outcome -%>
- <%= render :partial => "outcome" %>
- <% end -%>
- </ol>
- <% end -%>
- </div>
+<p>
+ <%= link_to_remote 'Add outcome', {:url => new_outcome_path(:scenario_id => @scenario.id), :method => 'GET'}, :class => "add-small" %>
+</p>
+<% unless @outcomes.nil? or @outcomes.empty? -%>
+ <% @outcomes.each do |outcome| -%>
+ <% @outcome = outcome -%>
+ <%= render :partial => "outcome" %>
+ <% end -%>
+<% end -%>
@@ -1,3 +1,3 @@
page.replace_html "#{element_id(@scenario,'outcomes')}", :partial => "outcomes"
-page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
+# page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
@@ -1,3 +1,3 @@
page.replace_html element_id(@scenario,'outcomes'), :partial => 'outcomes'
-page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
+# page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
@@ -1,3 +1,3 @@
page.replace_html element_id(@scenario,'outcomes'), :partial => "outcomes"
-page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
+# page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
@@ -1,19 +1,14 @@
-<!-- preconditions/_precondition.html.erb -->
- <li id="<%= element_id(@precondition) %>" class="precondition">
- <% if @precondition.created_at.nil? -%>
- <% remote_form_for @precondition do |f| -%>
- <%= hidden_field_tag 'scenario_id', @scenario.id %>
- <div>
- <%= f.label :description %>
- <%= f.text_area :description, :size => "50x2" %>
- <%= f.submit 'Create' %>
- </div>
- <% end -%>
- <% else -%>
- <div>
- <%= in_place_editor_field 'precondition', 'description' %>&nbsp;&bull;
- <%= link_to_remote "Delete", :url => @precondition, :confirm => 'Delete this condition?', :method => :delete, :class => "delete" %>
- </div>
- <% end -%>
- </li>
+<p id="<%= element_id(@precondition) %>" class="precondition">
+<% if @precondition.created_at.nil? -%>
+ <% remote_form_for @precondition do |f| -%>
+ <%= hidden_field_tag 'scenario_id', @scenario.id %>
+ <%= f.label :description %>
+ <%= f.text_area :description %>
+ <%= f.submit 'Create' %>
+ <% end -%>
+<% else -%>
+ <%= in_place_editor_field 'precondition', 'description' %>
+ <%= link_to_remote "Delete", :url => @precondition, :confirm => 'Delete this condition?', :method => :delete, :class => "delete" %>
+<% end -%>
+</p>
@@ -1,13 +1,9 @@
-<!-- preconditions/_preconditions.html.erb -->
- <div>
- <%= link_to_remote 'Add condition', {:url => new_precondition_path(:scenario_id => @scenario.id), :method => 'GET'}, :class => "add-small" %>
- <% unless @preconditions.nil? or @preconditions.empty? -%>
- <ol>
- <% @preconditions.each do |precondition| -%>
- <% @precondition = precondition -%>
- <%= render :partial => "precondition" %>
- <% end -%>
- </ol>
- <% end -%>
- </div>
-
+<p>
+ <%= link_to_remote 'Add precondition', {:url => new_precondition_path(:scenario_id => @scenario.id), :method => 'GET'}, :class => "add-small" %>
+</p>
+<% unless @preconditions.nil? or @preconditions.empty? -%>
+ <% @preconditions.each do |precondition| -%>
+ <% @precondition = precondition -%>
+ <%= render :partial => "precondition" %>
+ <% end -%>
+<% end -%>
@@ -1,3 +1,3 @@
page.replace_html "#{element_id(@scenario,'preconditions')}", :partial => "preconditions"
-page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
+# page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
@@ -1,3 +1,3 @@
page.replace_html element_id(@scenario,'preconditions'), :partial => 'preconditions'
-page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 101, {scaleY:true,scaleX:false,scaleMode:'contents'});!
+# page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 101, {scaleY:true,scaleX:false,scaleMode:'contents'});!
@@ -1,3 +1,3 @@
page.replace_html element_id(@scenario,'preconditions'), :partial => "preconditions"
-page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
+# page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
@@ -1,28 +1,31 @@
-<!-- scenarios/_scenario.html.erb -->
- <div id="<%= element_id(@scenario) %>" class="scenario">
- <% if @scenario.created_at.nil? -%>
- <% remote_form_for :scenario, @scenario, :url => iteration_story_scenarios_path(@iteration, @story) do |f| -%>
- <div class="scenario-form">
- <%= f.text_area :title, :value => "Add a scenario description here.",
- :size => '58x2' %>
- <%= f.submit 'Save' %>
- </div>
- <% end -%>
- <% else -%>
- <div class="scenario-title">
- <%= in_place_editor_field 'scenario', 'title' %>
- <%= link_to_remote image_tag("/images/icons/delete_icon_20x19.png", :alt => "Delete"),
- {:url => iteration_story_scenario_path(@iteration, @story,@scenario),
- :confirm => 'Delete this scenario?', :method => :delete}, :class => "delete-small" %>
- </div>
- <div id="<%= element_id(@scenario,'preconditions') %>" class="preconditions">
- <%= link_to_remote "Preconditions",
- :url => preconditions_path(:scenario_id => @scenario.id), :method => :get %>
- </div>
- <div id="<%= element_id(@scenario,'outcomes') %>" class="outcomes">
- <%= link_to_remote "Outcomes",
- :url => outcomes_path(:scenario_id => @scenario.id), :method => :get %>
- </div>
- <% end -%>
- </div>
+<div id="<%= element_id(@scenario) %>" class="scenario">
+ <% if @scenario.created_at.nil? -%>
+ <% remote_form_for :scenario, @scenario, :url => iteration_story_scenarios_path(@iteration, @story) do |f| -%>
+ <p>
+ <%= f.text_area :title, :value => "Add a scenario description here.", :rows => 5 %>
+ <%= f.submit 'Save' %>
+ </p>
+ <% end -%>
+ <% else -%>
+ <h4>
+ <%= in_place_editor_field 'scenario', 'title' %>
+ </h4>
+ <%= link_to_remote "Delete", {:url => iteration_story_scenario_path(@iteration, @story,@scenario),
+ :confirm => 'Delete this scenario?', :method => :delete}, :class => "delete" %>
+
+ <div id="<%= element_id(@scenario,'preconditions') %>" class="preconditions">
+ <p>
+ <%= link_to_remote "Preconditions",
+ :url => preconditions_path(:scenario_id => @scenario.id), :method => :get %>
+ </p>
+ </div>
+
+ <div id="<%= element_id(@scenario,'outcomes') %>" class="outcomes">
+ <p>
+ <%= link_to_remote "Outcomes",
+ :url => outcomes_path(:scenario_id => @scenario.id), :method => :get %>
+ </p>
+ </div>
+ <% end -%>
+</div>
@@ -1,18 +1,18 @@
-<!-- scenarios/_scenario.html.erb -->
- <div class="scenarios-head">
- <h4>Story scenarios</h4>
- <%= link_to_remote 'Add scenario', { :url => new_iteration_story_scenario_path(@iteration, @story),
- :method => 'GET'}, :class => 'add-small' %>
- </div>
- <div class="scenarios">
- <% @scenarios.each do |scenario| %>
- <% @scenario = scenario -%>
- <%= render :partial => "scenario" %>
- <% end %>
- </div>
- <div class="scenarios-foot">
- <%= link_to_remote '&laquo; Back to story overview', {
- :url => iteration_story_path(@iteration, @story), :method => 'GET'},
- :class => 'back-small' %>
- </div>
+<h4>Story scenarios</h4>
+
+<div class="scenarios">
+ <p>
+ <%= link_to_remote 'Add scenario', { :url => new_iteration_story_scenario_path(@iteration, @story), :method => 'GET'} %>
+ </p>
+
+ <% @scenarios.each do |scenario| %>
+ <% @scenario = scenario -%>
+ <%= render :partial => "scenario" %>
+ <% end %>
+</div>
+
+<p>
+ <%= link_to_remote '&laquo; Back to story overview', {
+ :url => iteration_story_path(@iteration, @story), :method => 'GET'} %>
+</p>
@@ -1,3 +1,3 @@
page.replace_html element_id(@story,'scenarios'), :partial => 'scenarios'
-page << %Q!new Effect.Scale("#{element_id(@story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
+# page << %Q!new Effect.Scale("#{element_id(@story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
@@ -1,3 +1,3 @@
page.replace_html element_id(@story,'scenarios'), :partial => "scenarios"
-page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
+# page << %Q!new Effect.Scale("#{element_id(@scenario.story,'scenarios')}", 100, {scaleY:true,scaleX:false,scaleMode:'contents'});!
@@ -7,11 +7,11 @@
-%>
<p class="form-fields">
<%= f.label :title %>
- <%= f.text_field :title, :size => 52 %>
+ <%= f.text_field :title, :size => 255 %>
</p>
<p class="form-fields">
<%= f.label :description %>
- <%= f.text_area :description, :size => "60x8" %>
+ <%= f.text_area :description %>
</p>
<% unless params[:action] = "new" %>
<p class="form-fields">
@@ -1,17 +1,14 @@
<% @story = story -%>
<div id="<%= element_id(story) %>" class="story">
- <div class="accordion-toggle<%= ' accordion-toggle-active' if @active %>">
<h3>
<%= in_place_editor_field :story, :title, {},
:url => { :controller => 'stories', :action => 'set_story_title', :id => story.id, :iteration_id => @iteration.id } %>
<%= clippy("branston -g -f #{@story.to_param} -b #{request.host} -p #{request.port} ", "#FFFF99") %>
</h3>
<%= link_to "Delete", iteration_story_path(@iteration, @story),
:confirm => 'Delete this story?', :method => :delete, :class => "delete" %>
- </div>
- <div id="<%= element_id(story,'scenarios') %>" class="accordion-content">
- <div class="story-props">
+ <div id="<%= element_id(story,'scenarios') %>">
<% remote_form_for :story, @story, :url => "#{iteration_story_path(@iteration, @story)}.js" do |f| -%>
<%= hidden_field_tag '_method', 'PUT' %>
<%= hidden_field_tag 'id', @story.id %>
@@ -33,7 +30,6 @@
</p>
<% end -%>
<% end -%>
- </div>
<p>
<%= in_place_editor_field :story, :description, {},
:url => { :controller => 'stories', :action => 'set_story_description', :id => story.id, :iteration_id => @iteration.id } %>
@@ -50,9 +46,9 @@
<script type="text/javascript">
document.observe("dom:loaded", function() {
$("<%= element_id(@story, 'points') %>").observe("change", Branston.Form.selectChange);
- <% unless @iterations.empty? %>
+ <% unless @iterations.empty? -%>
$("<%= element_id(@story, 'iterations') %>").observe("change", Branston.Form.selectChange);
- <% end %>
+ <% end -%>
$("<%= element_id(@story, 'status') %>").observe("change", Branston.Form.selectChange);
});
</script>
@@ -21,37 +21,6 @@
<p><%= link_to 'New story', new_iteration_story_path(@iteration), :class => "add" %></p>
-<% content_for :page_end do %>
-<script type="text/javascript">
-// document.observe("dom:loaded", function() {
-// // Extend Accordion class to force some dynamic DOM elements to appear.
-// Accordion.addMethods({
-// forceExpand : function() {
-// var scenarios = $('.scenarios');
-// if (scenarios && scenarios.length > 0)
-// new Effect.Scale(scenarios[0], 100, {scaleY:true,scaleX:false,scaleMode:'contents'});
-// }
-// });
-// <% unless @current_stories.nil? or @current_stories.empty? -%>
-// var currentStories = new Accordion("current_stories", 1);
-// //$('accordion-toggle').each(function(e) {e.observe('click', currentStories.forceExpand);});
-// <% end -%>
-// <% unless @backlog_stories.nil? or @backlog_stories.empty? -%>
-// var backlogStories = new Accordion("backlog_stories", 1);
-// //$('accordion-toggle').each(function(e) {e.observe('click', backlogStories.forceExpand);});
-// <% end -%>
-// <% unless @completed_stories.nil? or @completed_stories.empty? -%>
-// var completedStories = new Accordion("completed_stories", 1);
-// //$('accordion-toggle').each(function(e) {e.observe('click', completedStories.forceExpand);});
-// <% end -%>
-// <% unless @quality_assurance_stories.nil? or @quality_assurance_stories.empty? -%>
-// var qualityAssuranceStories = new Accordion("quality_assurance_stories", 1);
-// //$('accordion-toggle').each(function(e) {e.observe('click', qualityAssurance.forceExpand);});
-// <% end -%>
-// });
-</script>
-<% end %>
-
<div id="backlog-wrapper">
<h3>New stories <%=points_label(@backlog_stories)%></h3>
<div id="backlog_stories" class="story-holder">
View
Deleted file not rendered
Oops, something went wrong.

0 comments on commit 2203c80

Please sign in to comment.