[25079] users/jberry/mpwa/app
source_changes at macosforge.org
source_changes at macosforge.org
Sun May 13 06:52:32 PDT 2007
Revision: 25079
http://trac.macosforge.org/projects/macports/changeset/25079
Author: jberry at macports.org
Date: 2007-05-13 06:52:32 -0700 (Sun, 13 May 2007)
Log Message:
-----------
mpwa: generate a better path for top level portpkg download
Modified Paths:
--------------
users/jberry/mpwa/app/controllers/port_pkg_controller.rb
users/jberry/mpwa/app/views/port/show.rhtml
users/jberry/mpwa/app/views/port_pkg/show.rhtml
Modified: users/jberry/mpwa/app/controllers/port_pkg_controller.rb
===================================================================
--- users/jberry/mpwa/app/controllers/port_pkg_controller.rb 2007-05-13 13:22:56 UTC (rev 25078)
+++ users/jberry/mpwa/app/controllers/port_pkg_controller.rb 2007-05-13 13:52:32 UTC (rev 25079)
@@ -75,17 +75,15 @@
def emit_portpkg
port_pkg = PortPkg.find(params[:id])
- send_file(port_pkg.portpkg_file())
+ redirect_to :controller => 'port_pkg_file', :action => 'emit',
+ :id => port_pkg.portpkg_file()
end
def emit_portpkg_path
port_pkg = PortPkg.find(params[:id])
- send_file(port_pkg.file_by_path(params[:path].join, '/'))
+ redirect_to :controller => 'port_pkg_file', :action => 'emit',
+ :id => port_pkg.file_by_path(params[:path].join, '/')
end
- def send_file(file)
- send_data file.file_blob.data, :filename => file.file_path, :type => file.mime_type, :disposition => 'inline'
- end
-
private :create, :edit, :update, :destroy
end
Modified: users/jberry/mpwa/app/views/port/show.rhtml
===================================================================
--- users/jberry/mpwa/app/views/port/show.rhtml 2007-05-13 13:22:56 UTC (rev 25078)
+++ users/jberry/mpwa/app/views/port/show.rhtml 2007-05-13 13:52:32 UTC (rev 25079)
@@ -36,7 +36,7 @@
<td><%= link_to pkg.submitter.user_name, :controller => 'person', :action => 'show',
:id => pkg.submitter %></td>
<td><%= link_to pkg.submitted_at.to_formatted_s(:long), :controller => 'port_pkg', :action => 'show', :id => pkg %></td>
- <td><%= link_to 'download', :controller => 'port_pkg_file', :action => 'emit', :id => pkg.portpkg_file %></td>
+ <td><%= link_to 'download', :controller => 'port_pkg', :action => 'emit_portpkg', :id => pkg %></td>
</tr>
<% end %>
</table>
Modified: users/jberry/mpwa/app/views/port_pkg/show.rhtml
===================================================================
--- users/jberry/mpwa/app/views/port_pkg/show.rhtml 2007-05-13 13:22:56 UTC (rev 25078)
+++ users/jberry/mpwa/app/views/port_pkg/show.rhtml 2007-05-13 13:52:32 UTC (rev 25079)
@@ -23,10 +23,12 @@
<strong>Submission Date:</strong> <%= @port_pkg.submitted_at %>
</p>
+<% if @port_pkg.submitter_notes %>
<p>
<strong>Submitter notes:</strong>
- <%= simple_format(word_wrap(@port_pkg.submitter_notes)) if @port_pkg.submitter_notes %>
+ <%= simple_format(word_wrap(@port_pkg.submitter_notes)) %>
</p>
+<% end %>
<p>
<strong>Variants:</strong>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070513/95320ad7/attachment.html
More information about the macports-changes
mailing list