Skip to content

Commit

Permalink
Merge pull request #1677 from CPAN-API/leo/review_links
Browse files Browse the repository at this point in the history
Leo/review links
  • Loading branch information
oalders committed Apr 21, 2016
2 parents 803ad30 + 7dfb912 commit 37af9a9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
8 changes: 4 additions & 4 deletions root/about/faq.html
Expand Up @@ -16,7 +16,7 @@
* [CPANTS](http://cpants.cpanauthors.org/) provide Kwalitee metrics for CPAN modules.
MetaCPAN links to the respective pages on the CPANTS site.
* [CPAN Ratings](http://cpanratings.perl.org/) allows users to give stars and review CPAN distributions.
MetaCPAN show the average rating using stars and links to the reviews.
MetaCPAN show links to the reviews.
* [search.cpan.org](http://search.cpan.org/) is another search engine for the same data.
It is older, but the source code has not been published.
MetaCPAN links to the respective page of each module/distribution.
Expand Down Expand Up @@ -94,8 +94,8 @@

### Trying to connect PAUSE just gives you JSON and doesn't work?

It is possible to get your account into an inconsistent state where it won't
connect to PAUSE - particularly if you've connected via multiple identities,
It is possible to get your account into an inconsistent state where it won't
connect to PAUSE - particularly if you've connected via multiple identities,
and/or using multiple browsers.

To fix this:
Expand All @@ -105,7 +105,7 @@
3. Reconnect via one identity
4. Connect to PAUSE

Make sure that you use the same browser for all of the steps - including
Make sure that you use the same browser for all of the steps - including
opening the link in the email from MetaCPAN.

### Favorites not displaying on author page?
Expand Down
7 changes: 2 additions & 5 deletions root/home.html
Expand Up @@ -25,10 +25,7 @@
<%- hints = ['Press shift and enter if you are feeling lucky'] %>
Hint: <% hints.pick %>
</div>
<div class="alert alert-info text-left">
<p><strong>The QA Hackathon <a href="http://blogs.perl.org/users/neilb/2016/02/announcing-the-perl-qa-hackathon-2016.html">needs your support</a></strong>. Much MetaCPAN development takes place at the QA Hackathon. Please speak to your employer about <a href="http://act.qa-hackathon.org/qa2016/sponsors.html">becoming a sponsor</a>. <a href="https://members.enlightenedperl.org/drupal/donate-perlqa?id=6">Individual contributions</a> are also welcome.</p>
<p>
Contact <a href="mailto:neilb@cpan.org">NEILB</a> for more information and a copy of the sponsorship prospectus.
</p>
<div class="alert alert-info">
<strong>New to CPAN?</strong> Maybe take a look at <a href="/pod/Task::Kensho">Task::Kensho!</a>
</div>
</div>
5 changes: 1 addition & 4 deletions root/inc/rating.html
@@ -1,4 +1 @@
<% stars = (rating.avg * 2).fmt('%.0f') / 2 %>
<span <% IF schema_org %>itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"<% END %> >
<a href="http://cpanratings.perl.org/rate/?distribution=<% distribution %>"><% prefix | none %><span class="rating-<% stars * 10 %>"></span></a><span class="hidden" <% IF schema_org %>itemprop="ratingValue"<% END %> ><% stars %></span> (<a href="http://cpanratings.perl.org/dist/<% distribution %>"><span <% IF schema_org %>itemprop="reviewCount"<% END %> ><% rating.count %></span> review<% IF rating.count > 1; 's'; END %></a>)
</span>
Moved into release-info.html
12 changes: 11 additions & 1 deletion root/inc/release-info.html
Expand Up @@ -22,11 +22,21 @@
<a data-keyboard-shortcut="g i" href="<% issues.url %>"><i class="fa fa-fw fa-info-circle black"></i>Issues</a>
<% IF issues.defined("active") %>(<% issues.active %>)<% END %>
</li>

<% IF rating.count > 0 %>
<li>
<% INCLUDE inc/rating.html prefix = '<i class="fa fa-fw fa-smile-o black"></i>', rating = rating, distribution = release.distribution %>
<% stars = (rating.avg * 2).fmt('%.0f') / 2 %>
<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<span class="hidden" itemprop="ratingValue"><% stars %></span>
<a href="http://cpanratings.perl.org/rate/?distribution=<% release.distribution %>">
<i class="fa fa-fw fa-smile-o black"></i>
</a>
<a href="http://cpanratings.perl.org/dist/<% release.distribution %>"><span itemprop="reviewCount"><% rating.count %></span> review<% IF rating.count > 1; 's'; END %></a>
</span>
</li>
<% END %>


<li>
<%
testers_version = release.name.remove('^' _ release.distribution.quotemeta _ '-?');
Expand Down
4 changes: 1 addition & 3 deletions root/search.html
Expand Up @@ -29,9 +29,7 @@
<% IF item.description %><p class="description"><% item.description.chunk(250).0 _ '...' %></p>
<% END %>
<a class="author" href="/author/<% item.author %>"><% item.author %></a><a href="/release/<% IF item.status == 'latest'; item.distribution; ELSE; item.author; '/'; item.release; END %>">/<% item.release %></a>
<%- IF item.rating.count > 0 %>
&nbsp;<% INCLUDE inc/rating.html rating = item.rating, distribution = item.distribution %>
<%- END %> -
-
<span class="relatize"><% item.date.dt_http %></span>
<%- IF !single_dist %>
-
Expand Down

0 comments on commit 37af9a9

Please sign in to comment.