eXPlainPMT on directories other than root context

2 views
Skip to first unread message

Mauro Botelho

unread,
Jan 9, 2008, 9:25:34 PM1/9/08
to eXPlainPMT Dev
Here's a patch that would allow eXPlainPMT to live outside of the root
context. This would allow it to run on the following URL for example
http://demo.example.com/explainpmt.

Mauro

Index: C:/projects/explainpmt-read-only/app/controllers/
stats_controller.rb
===================================================================
--- C:/projects/explainpmt-read-only/app/controllers/
stats_controller.rb (revision 510)
+++ C:/projects/explainpmt-read-only/app/controllers/
stats_controller.rb (working copy)
@@ -83,7 +83,7 @@
graph.point_markers = generate_point_markers(num_points,
[plannedCompletedPerIteration.size,
pointsNotCompletedPerIteration.size,
pointsCompletedPerIteration.size])
end
- graph.render(:width => 600, :min_value => 0, :to => "public/
images/#{@project.name}burndown.svg")
+ graph.render(:width => 600, :min_value => 0, :to =>
"#{RAILS_ROOT}/public/images/#{@project.name}burndown.svg")
end

def create_line(graph, title, points, numPoints)
Index: C:/projects/explainpmt-read-only/app/views/layouts/main.rhtml
===================================================================
--- C:/projects/explainpmt-read-only/app/views/layouts/main.rhtml
(revision 510)
+++ C:/projects/explainpmt-read-only/app/views/layouts/main.rhtml
(working copy)
@@ -6,9 +6,9 @@
<title>eXPlainPMT &raquo; <%= page_title %></title>
<%= stylesheet_link_tag 'main' %>
<%= javascript_include_tag :defaults %>
- <script src="/javascripts/sortabletable.js"></script>
- <script src="/javascripts/scidtype.js"></script>
- <script src="/javascripts/application.js"></script>
+ <%= javascript_include_tag "sortabletable" %>
+ <%= javascript_include_tag "scidtype" %>
+ <%= javascript_include_tag "application" %>
</head>
<body>
<div id="Header">
Index: C:/projects/explainpmt-read-only/app/views/stats/index.rhtml
===================================================================
--- C:/projects/explainpmt-read-only/app/views/stats/index.rhtml
(revision 510)
+++ C:/projects/explainpmt-read-only/app/views/stats/index.rhtml
(working copy)
@@ -62,7 +62,7 @@
</table>
</td>
<td>
- <embed type="image/svg+xml" src="/images/<%= @project.name +
'burndown.svg'%>"
+ <embed type="image/svg+xml" src="<%= image_path(@project.name
+ 'burndown.svg') %>"
width="600" height="375">
</embed>
</td>
Reply all
Reply to author
Forward
0 new messages