Skip to content

Commit

Permalink
Rename the partials to clarify what they contain
Browse files Browse the repository at this point in the history
  • Loading branch information
daha committed Jul 12, 2012
1 parent 26be72e commit 3bf5ec5
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 65 deletions.
30 changes: 30 additions & 0 deletions app/partials/contributors-list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!--
Copyright (c) 2012, Yahoo! Inc.
Copyright (c) 2012, David Haglund
All rights reserved.
The code html structure has been copied from
http://yuilibrary.com/yui/docs/app/app-contributors.html,
licensed under the BSD License:
http://yuilibrary.com/license/
The code code has been adapted to angularJS from YUI3.
-->

<div ng-controller="ContribListCtrl">
<div>
<h2 class="no-toc">Project Contributors ({{contributors.data.length}})</h2>

<ul class="contributors">
<li class="contributor" ng-repeat="contributor in contributors.data">
<!-- TODO: Pluralization in the title of Contributor -->
<a class="avatar" ng-href="#/github/{{contributor.login}}/"
title="{{contributor.login}} has {{contributor.contributions}} Contributions">
<img alt="{{contributor.login}}'s avatar" ng-src="{{contributor.avatar_url}}" />
<span class="contributor-name">{{contributor.login}}</span>
<span class="contributor-contributions">{{contributor.contributions}}</span>
</a>
</li>
</ul>
</div>
</div>
49 changes: 33 additions & 16 deletions app/partials/repo-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,38 @@
The code code has been adapted to angularJS from YUI3.
-->
<div ng-controller="RepoListCtrl">
<h2 class="no-toc">Public Repositories</h2>

<div ng-controller="ContribListCtrl">
<div>
<h2 class="no-toc">Project Contributors ({{contributors.data.length}})</h2>

<ul class="contributors">
<li class="contributor" ng-repeat="contributor in contributors.data">
<!-- TODO: Pluralization in the title of Contributor -->
<a class="avatar" ng-href="#/github/{{contributor.login}}/"
title="{{contributor.login}} has {{contributor.contributions}} Contributions">
<img alt="{{contributor.login}}'s avatar" ng-src="{{contributor.avatar_url}}" />
<span class="contributor-name">{{contributor.login}}</span>
<span class="contributor-contributions">{{contributor.contributions}}</span>
</a>
</li>
</ul>
</div>
<ul class="repos">
<li ng-repeat="repo in repos.data | orderBy:'-watchers'" class="repo yui3-g">
<div class="repo-name yui3-u-2-3">
<h3 class="no-toc">
<a href="#/github/{{repo.full_name}}/">{{repo.name}}</a>
</h3>
<p class="repo-desc">{{repo.description}}</p>
</div>
<div class="repo-stats yui3-u-1-3">
<ul class="yui3-g">
<li class="repo-lang yui3-u-1-3">
<b>{{repo.language}}</b>
</li>
<li class="repo-watchers yui3-u-1-3">
<b>{{repo.watchers}}</b>
<span>
<ng-pluralize count="repo.watchers" when="watchForms">
</ng-pluralize>
</span>
</li>
<li class="repo-forks yui3-u-1-3">
<b>{{repo.forks}}</b>
<span>
<ng-pluralize count="repo.forks" when="forkForms">
</ng-pluralize>
</span>
</li>
</ul>
</div>
</li>
</ul>
</div>
2 changes: 1 addition & 1 deletion app/partials/repo-page.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="repo-page">
<div ng-include="'partials/repo.html'"></div>
<div ng-include="'partials/repo-list.html'"></div>
<div ng-include="'partials/contributors-list.html'"></div>
</div>
47 changes: 0 additions & 47 deletions app/partials/repolist.html

This file was deleted.

2 changes: 1 addition & 1 deletion app/partials/user-page.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="user-page">
<div ng-include="'partials/user.html'"></div>
<div ng-include="'partials/repolist.html'"></div>
<div ng-include="'partials/repo-list.html'"></div>
</div>

0 comments on commit 3bf5ec5

Please sign in to comment.