Skip to content

Commit

Permalink
tweak author listings
Browse files Browse the repository at this point in the history
  • Loading branch information
jlong committed Jan 6, 2010
1 parent 14b61b1 commit 769a910
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.rdoc
Expand Up @@ -4,8 +4,8 @@ This is the source code of the Radiant Extension Registry. The registry is
used by Radiant to power the `script/extension install` command.

Extension authors can upload information about their extensions and then use
`script/extension install` to install the the extension in a fresh Radiant
project.
the `script/extension install` command to install the the extension in a
fresh Radiant project.

The extension registry is located here:

Expand Down
12 changes: 7 additions & 5 deletions app/views/authors/_author.html.haml
@@ -1,14 +1,16 @@
%tr[author]
- unless defined? hide_avatar && hide_avatar
%td.avatar
= image_tag gravatar_url(author.email), :width=>80, :height=>80, :alt=>""
%td.avatar
= image_tag gravatar_url(author.email), :width=>80, :height=>80, :alt=>""
%td.info
.name
= link_to h(author.name), author
- unless defined? hide_edit && hide_edit
= link_to "Edit", edit_author_path(author), :class=>"action" if can_edit?(author)
.extensions_count
= "#{author.extensions_count} extensions"
.location
= h(author.location)
- unless defined? hide_extension_count && hide_extension_count
%td.extensions_count
= pluralize(author.extensions_count, "extension")
- unless defined? hide_available_for_hire && hide_available_for_hire
%td.available_for_hire
- if author.available_for_hire?
Expand Down
2 changes: 1 addition & 1 deletion app/views/authors/show.html.haml
Expand Up @@ -42,4 +42,4 @@
%h3= "Extensions <small>(#{ @author.extensions_count })</small>"
%table.index#extensions{:style=>"width: 75%"}
%tbody
= render :partial => "extensions/extension", :collection => @author.extensions, :locals => {:hide_author => true, :hide_edit => true}
= render :partial => "extensions/extension", :collection => @author.extensions, :locals => {:hide_author => true}
12 changes: 11 additions & 1 deletion app/views/home/index.html.haml
Expand Up @@ -26,7 +26,17 @@

%table.index#authors.mini{:border=>0, :cellpadding=>0, :cellspacing=>0}
%tbody
= render :partial => 'authors/author', :collection => @authors, :locals => { :hide_available_for_hire => true }
- for author in @authors
%tr[author]
%td.avatar
= image_tag gravatar_url(author.email), :width=>64, :height=>64, :alt=>""
%td.info
.name
= link_to h(author.name), author
- unless defined? hide_edit && hide_edit
= link_to "Edit", edit_author_path(author), :class=>"action" if can_edit?(author)
.extensions_count
= pluralize(author.extensions_count, "extension")

%p.more
%span= link_to "More Authors", authors_path
9 changes: 8 additions & 1 deletion public/stylesheets/sass/partials/_authors.sass
Expand Up @@ -17,9 +17,13 @@
padding-left: 5px
.name
font-size: 130%
.extensions_count
.location
font-size: 110%
color: #999
&.extensions_count
font-size: 110%
color: #999
width: 30%
&.available_for_hire
width: 15em
.badge
Expand All @@ -31,11 +35,14 @@
border: none
padding-top: 8px
padding-bottom: 8px
&.avatar
width: 72px
&.info
.name
font-size: 120%
.extensions_count
font-size: 105%
color: #999

.full_size_avatar
float: right
Expand Down
11 changes: 9 additions & 2 deletions public/stylesheets/screen.css
Expand Up @@ -573,9 +573,13 @@ body {
padding-left: 5px; }
#main table.index#authors td.info .name {
font-size: 130%; }
#main table.index#authors td.info .extensions_count {
#main table.index#authors td.info .location {
font-size: 110%;
color: #999; }
#main table.index#authors td.extensions_count {
font-size: 110%;
color: #999;
width: 30%; }
#main table.index#authors td.available_for_hire {
width: 15em; }
#main table.index#authors td.available_for_hire .badge {
Expand All @@ -592,10 +596,13 @@ body {
border: none;
padding-top: 8px;
padding-bottom: 8px; }
#main table.index#authors.mini td.avatar {
width: 72px; }
#main table.index#authors.mini td.info .name {
font-size: 120%; }
#main table.index#authors.mini td.info .extensions_count {
font-size: 105%; }
font-size: 105%;
color: #999; }
#main .full_size_avatar {
float: right; }
#main .full_size_avatar img {
Expand Down
1 change: 1 addition & 0 deletions spec/datasets/authors_dataset.rb
Expand Up @@ -20,6 +20,7 @@ def author_params(first_name, attributes = {})
{
:first_name => first_name,
:login => login,
:location => ["Chapel Hill, NC", "Cary, NC", "Apex, NC", "Raliegh, NC", "Atlanta, GA", "New York, NY", "San Francisco, CA", "Dallas, TX", "Richmond, VA", "Cleveland, OH", "Chicago, IL", "Naperville, IL", "Auburn, AL", "Franktown, VA", "Moscow, Russia", "Sidney, Australia", "Tokyo, Japan"].rand,
:email => "#{login}@example.com",
:password => "test",
:password_confirmation => "test",
Expand Down

0 comments on commit 769a910

Please sign in to comment.