Skip to content

Commit

Permalink
added authors to the about page
Browse files Browse the repository at this point in the history
  • Loading branch information
schacon committed Jul 24, 2008
1 parent 4b4b09d commit 65de48e
Show file tree
Hide file tree
Showing 6 changed files with 1,253 additions and 15 deletions.
16 changes: 16 additions & 0 deletions app/controllers/page_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ class PageController < ApplicationController
def index
end

def about
authors = File.join(RAILS_ROOT, 'config/authors.txt')
if File.exists?(authors)
authors = File.readlines(authors)
@authors = {:main => [], :contrib => []}
authors.each do |author|
number, *name = author.split(' ')
if(number.to_i > 50)
@authors[:main] << [name.join(' '), number.to_i]
else
@authors[:contrib] << [name.join(' '), number.to_i]
end
end
end
end

def get_version
version_file = File.expand_path(File.dirname(__FILE__) + "/../../config/app_config.yml")
config = YAML.load(File.read(version_file))
Expand Down
43 changes: 28 additions & 15 deletions app/views/page/about.html.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@

<h2 id="about">About Git</h2>

<div style="float: right">
<table class="releases">
<tr><th><a href="course/index.html">Git Crash Courses</a></th></tr>
<tr><td align="center">
<a href="http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html">Git for everyone</a>
<!--
<br /><a href="course/new.html">New to revision control?</a>
-->
<br /><a href="course/stgit.html">Maintaining external patches</a>
<br /><a href="course/svn.html">Git for SVN users</a>
<!-- <br /><em>More to come soon...</em> -->
</td></tr>
</table>
</div>

<p>Git is distributed version control system focused on
speed, effectivity and real-world usability on large projects.
Its highlights include:</p>
Expand Down Expand Up @@ -86,4 +71,32 @@ offer compatible version control interfaces - see the
<a href="#tools">related tools</a> list.</p>


<h2 class="section-start">The Authors of Git</h2>

<p>These are the heroes that have made Git what it is <em>(grouped by commits)</em>:</p>

<h3 class="title">Primary Authors</h3>
<table id="authors">
<% @authors[:main].in_groups_of(4).each do |group| %>
<tr>
<% group.each do |author, number| %>
<% next if !author%>
<td><%= author %> <small>(<%= number %>)</small></td>
<% end %>
</tr>
<% end %>
</table>

<h3 class="title">Contributors</h3>
<table>
<% @authors[:contrib].in_groups_of(5).each do |group| %>
<tr>
<% group.each do |author, number| %>
<% next if !author%>
<td><%= author %> <small>(<%= number %>)</small></td>
<% end %>
</tr>
<% end %>
</table>

<hr />
Loading

0 comments on commit 65de48e

Please sign in to comment.