Skip to content

Commit

Permalink
Added the license to the /dist/ page.
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomif committed Jun 23, 2009
1 parent 65c99e6 commit e57fefa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/CPANHQ/Controller/Distribution.pm
Expand Up @@ -47,6 +47,7 @@ sub show :Chained(instance) :PathPart('') :Args(0) {
my( $self, $c ) = @_;
my $dist = $c->stash->{ dist };
my $latest = $dist->latest_release;
$latest->_process_meta_yml();
$c->stash( release => $latest, title => $latest->name );
}

Expand All @@ -67,6 +68,8 @@ sub version :Chained(instance) :PathPart('') :Args(1) {
$c->detach;
}

$release->_process_meta_yml();

$c->stash( release => $release, title => $release->name );
}

Expand Down
8 changes: 8 additions & 0 deletions root/dist/show.tt
@@ -1,3 +1,11 @@
[%- USE HTML -%]
<h2>[% release.name %]</h2>
[% license = release.license %]
<ul>
<li>
<b>License:</b>
<a href="[% HTML.escape(license.url) %]">[% HTML.escape(license.name) %]</a>
</li>
</ul>
[% author = release.author %]
<p>By <a href="[% c.uri_for( '/author', author.cpanid ) %]">[% author.name %]</a>, released on [% release.release_date.ymd %]</p>

0 comments on commit e57fefa

Please sign in to comment.