Skip to content

Commit

Permalink
move the rating count info inline, remove start and remove from searc…
Browse files Browse the repository at this point in the history
…h list
  • Loading branch information
ranguard committed Apr 21, 2016
1 parent 803ad30 commit e38699c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 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
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 e38699c

Please sign in to comment.