Skip to content
Permalink
Browse files

Add RepositoryView, corresponding template and RepositoryController

  • Loading branch information
pangratz committed Jul 23, 2012
1 parent d867397 commit b00322217940754e5103427856c9b7f68f98153f
@@ -2,6 +2,8 @@ require('dashboard/core');

Dashboard.ApplicationController = Ember.Controller.extend();

Dashboard.RepositoryController = Ember.ObjectController.extend();

Dashboard.RepositoriesController = Ember.ArrayController.extend({
sortProperties: 'full_name'.w(),
loadWatchedRepositories: function(username) {
@@ -4,6 +4,10 @@ Dashboard.ApplicationView = Ember.View.extend({
templateName: 'application'
});

Dashboard.RepositoryView = Ember.View.extend({
templateName: 'repository'
});

Dashboard.RepositoriesView = Ember.View.extend({
templateName: 'repositories'
});
@@ -1,11 +1,8 @@
<div class="row">Watched repositories:</div>
<div class="row" >
<ul>
{{#each repository in controller}}
<li>
<a {{bindAttr href="repository.html_url"}} >{{repository.full_name}}</a>
{{repository.description}}
</li>
<a {{action showUser context="repository.owner.login"}} >{{repository.owner.login}}</a> / <a {{action showRepository context="repository.full_name"}} >{{repository.name}}</a>
{{repository.description}}
<dl class="dl-horizontal">
{{/each}}
</ul>
</div>
@@ -0,0 +1,9 @@
<div class="well" >
<a {{action showUser }} >{{owner.login}}</a> / {{name}} – <a {{bindAttr href="html_url"}}>show@GitHub</a>
<dl class="dl-horizontal">
{{description}}
<dl class="dl-horizontal">
<span class="badge" title="watchers" ><i class="icon-eye-open" ></i> {{watchers}}</span>
<span class="badge" title="forks" ><i class="icon-heart" ></i> {{forks}}</span>
<span class="badge" ><i class="icon-tag" ></i> {{language}}</span>
</div>
@@ -6,6 +6,12 @@ test("it exists", function() {
ok(Dashboard.ApplicationView, "it exists");
});

module("Dashboard.RepositoryView");

test("it exists", function() {
ok(Dashboard.RepositoryView, "it exists");
});

module("Dashboard.RepositoriesView");

test("it exists", function() {

0 comments on commit b003222

Please sign in to comment.
You can’t perform that action at this time.