Skip to content

Commit

Permalink
Refactored to call form based scripts only when viewing forms
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Jul 5, 2010
1 parent 194470d commit 59ddeb7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions app/views/common/forms/_feature_import.html.erb
Expand Up @@ -2,6 +2,8 @@
<%= javascript_include_tag "form" %>
<%= javascript_include_tag "jquery.hover.dialog" %>
<%= javascript_include_tag "item_hover" %>
<%= javascript_include_tag "jquery.tipsy" %>
<%= javascript_include_tag "tooltips" %>
<% end %>

<h3>Feature: <%=h file[:file].sub(/\.feature/,"").gsub(/_/,' ') %></h3>
Expand Down
12 changes: 6 additions & 6 deletions app/views/common/panels/_feature.html.erb
Expand Up @@ -2,25 +2,25 @@
<ul class="icons">
<% if not feature.stories.blank? %>
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon-document' />", export_feature_path(feature), {:title => 'Export a feature', :id => 'export-feature'} %>
<%= link_to "Export", export_feature_path(feature), {:title => 'Export a feature', :id => 'export-feature'} %>
</li>
<% end %>
<% if feature.is_diff? %>
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon-transferthick-e-w ui-icon' />", changes_feature_path(feature), {:title => 'Check the difference between the systems & your applications features', :id => 'view-changes'} %>
<%= link_to "Changes", changes_feature_path(feature), {:title => 'Check the difference between the systems & your applications features', :id => 'view-changes'} %>
</li>
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon-arrowthickstop-1-n'/>", merge_feature_path(feature), {:title => 'Merge a systems changes with the feature', :id => 'merge-changes'} %>
<%= link_to "Merge", merge_feature_path(feature), {:title => 'Merge a systems changes with the feature', :id => 'merge-changes'} %>
</li>
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon-arrowthickstop-1-s'/>", system_merge_feature_path(feature), {:title => 'Merge a features changes with the system', :id => 'merge-system'} %>
<%= link_to "System Merge", system_merge_feature_path(feature), {:title => 'Merge a features changes with the system', :id => 'merge-system'} %>
</li>
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon-shuffle'/>", feature_path(feature, :format => :patch), {:title => 'Patch a feature with the systems changes', :id => 'patch-changes'} %>
<%= link_to "Get Patch", feature_path(feature, :format => :patch), {:title => 'Patch a feature with the systems changes', :id => 'patch-changes'} %>
</li>
<% end %>
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon-pencil'/>", edit_feature_path(feature), {:title => 'Edit the feature and it\'s stories', :id => 'edit'} %>
<%= link_to "Edit", edit_feature_path(feature), {:title => 'Edit the feature and it\'s stories', :id => 'edit'} %>
</li>
</ul>
</span>
Expand Down
6 changes: 3 additions & 3 deletions app/views/common/panels/_project.html.erb
Expand Up @@ -2,15 +2,15 @@
<ul class="icons">
<% if project.location.blank? == false and project.features_to_import? %>
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon ui-icon-plus'/>", import_project_path(project), {:title => 'Allows you to import features singularly', :id => 'import'} %>
<%= link_to "Import a feature", import_project_path(project), {:title => 'Allows you to import features singularly', :id => 'import'} %>
</li>
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon-circle-plus'/>", import_all_project_path(project), {:title => 'Allows you to import all project features in one easy step', :id => 'import-all'} %>
<%= link_to "Import all", import_all_project_path(project), {:title => 'Allows you to import all project features in one easy step', :id => 'import-all'} %>
</li>
<% end %>

<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon-pencil'/>", edit_project_path(project), {:title => 'Allows you to edit a projects information', :id => 'edit'} %>
<%= link_to "Edit", edit_project_path(project), {:title => 'Allows you to edit a projects information', :id => 'edit'} %>
</li>
</ul>
</span>
Expand Down
2 changes: 1 addition & 1 deletion app/views/common/panels/_step.html.erb
@@ -1,7 +1,7 @@
<span id="panel" class="icons ui-widget ui-widget-content ui-corner-all">
<ul class="icons">
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon-pencil'/>", edit_step_path(@step), {:title => 'Edit the step', :id => 'edit'} %>
<%= link_to "Edit", edit_step_path(@step), {:title => 'Edit the step', :id => 'edit'} %>
</li>
</ul>
</span>
Expand Down
2 changes: 1 addition & 1 deletion app/views/common/panels/_story.html.erb
@@ -1,7 +1,7 @@
<span id="panel" class="icons ui-widget ui-widget-content ui-corner-all">
<ul class="icons">
<li class="ui-state-default ui-corner-all">
<%= link_to "<span class='ui-icon ui-icon-pencil'/>", edit_story_path(story), {:title => 'Edit the story', :id => 'edit'} %>
<%= link_to "Edit", edit_story_path(story), {:title => 'Edit the story', :id => 'edit'} %>
</li>
</ul>
</span>
Expand Down

0 comments on commit 59ddeb7

Please sign in to comment.