Create a common repo-list-view control and use it everywhere

This allows users to choose grid view or table view in all repo lists

Fixes #732
This commit is contained in:
Joseph Schorr 2015-12-28 16:29:17 -05:00
parent 16f16e8a15
commit 3da8814787
13 changed files with 115 additions and 77 deletions

View file

@ -59,33 +59,9 @@
<div class="col-lg-9 col-lg-pull-3 col-md-9 col-md-pull-3 col-sm-12">
<div class="repo-list-panel co-main-content-panel">
<div class="repo-list-toggleb btn-group">
<i class="btn btn-default fa fa-th-large" ng-class="!showAsList ? 'active' : ''"
ng-click="setShowAsList(false)" title="Grid View" data-container="body" bs-tooltip></i>
<i class="btn btn-default fa fa-th-list" ng-class="showAsList ? 'active' : ''"
ng-click="setShowAsList(true)" title="List View" data-container="body" bs-tooltip></i>
</div>
<!-- Table View -->
<div ng-if="showAsList">
<div class="repo-list-table" repositories-resources="resources" namespaces="namespaces"></div>
</div>
<!-- Grid View -->
<div ng-if="!showAsList">
<!-- Starred Repository Listing -->
<div class="repo-list-grid" repositories-resource="starred_repositories"
starred="true"
star-toggled="starToggled(repository)">
</div>
<!-- User and Org Repository Listings -->
<div ng-repeat="namespace in namespaces">
<div class="repo-list-grid" repositories-resource="namespace.repositories"
starred="false" user="user" namespace="namespace"
star-toggled="starToggled(repository)">
</div>
</div>
<div class="repo-list-view" namespaces="namespaces"
star-toggled="starToggled(repository)"
starred-repositories="starred_repositories">
</div>
</div>
</div>