Commit c7d69d31f97de3386a1aab4c87f4b82d3527ce8b

- Clean up commit formatting a wee bit
- use Gitto in (Comments|Repositories)Controller as well

Commit diff

app/controllers/comments_controller.rb

 
1313 end
1414
1515 def commit
16 @git = Git.bare(@repository.full_repository_path)
17 @commit = @git.gcommit(params[:sha])
16 @git = Gitorious::Gitto.new(@repository.full_repository_path)
17 @commit = @git.commit(params[:sha])
1818 @comments = @repository.comments.find_all_by_sha1(params[:sha], :include => :user)
1919 end
2020
toggle raw diff

app/controllers/repositories_controller.rb

 
1313 @repository = @project.repositories.find_by_name!(params[:id])
1414 @comment_count = @repository.comments.count
1515 if @repository.has_commits?
16 @commits = Git.bare(@repository.full_repository_path).log(10)
16 @commits = Gitorious::Gitto.new(@repository.full_repository_path).log(10)
1717 else
1818 @commits = []
1919 end
toggle raw diff

app/views/browse/commit.html.erb

 
22
33<h1>Commit <%=h @commit.sha -%></h1>
44
5<p><pre><%=h @commit.message -%></pre></p>
6
5<div class="commit_message"><%= simple_format(h(@commit.message)) -%></div>
76<%= render :partial => "commit_infobox" -%>
87
98<ul class="tab_menu">
toggle raw diff

app/views/repositories/show.html.erb

 
2828 <li class="commit_item">
2929 <a href=""><%= link_to truncate(h(commit.sha), 16),
3030 project_repository_commit_path(@project, @repository, commit.sha) -%></a>
31 by <strong><%=h commit.author.name -%></strong> <%=h time_ago_in_words(commit.author.date) -%> ago<br />
32 <pre class="commit_message"><%= word_wrap(h(commit.message)) -%></pre>
31 by <strong><%=h commit.author.name -%></strong> <%=h time_ago_in_words(commit.author.date) -%> ago
32 <div class="commit_message"><%= simple_format(h(commit.message)) -%></div>
3333 </li>
3434 <% end -%>
3535 </ul>
toggle raw diff

public/stylesheets/base.css

 
403403 margin-bottom: 0.2em;
404404}
405405
406pre.commit_message {
406.commit_message, .commit_message p {
407407 margin-top: 10px;
408408 margin-left: 10px;
409 font: 95%/105% "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
409410}
410411
411412ul.project_list li {
toggle raw diff