-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added directive for heading bar Moved Site creation into modal Added table of sites Lots of CSS
- Loading branch information
Showing
5 changed files
with
231 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<loading-panel ng-if="loading"></loading-panel> | ||
<div ng-if="!loading"> | ||
[[site.id]] - [[site.name]] - [[site.description]] | ||
<heading-bar heading="Sites" subheading="[[site.name]]"> | ||
<button class="btn btn-info">Update Site</button> | ||
<button class="btn btn-danger">Delete Site</button> | ||
</heading-bar> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,95 @@ | ||
<loading-panel ng-if="loading"></loading-panel> | ||
<div ng-if="!loading"> | ||
<div ng-if="!sites.length" class="col-sm-6 col-sm-offset-3"> | ||
<panel class="notification-box"> | ||
<heading-bar heading="Sites"> | ||
<button | ||
class="btn btn-success" | ||
data-toggle="modal" | ||
data-target="#createSiteModal" | ||
>Create Site</button> | ||
</heading-bar> | ||
|
||
<div class="modal fade" id="createSiteModal" tabindex="-1" role="dialog"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close close-light" data-dismiss="modal"> | ||
<span class="fa fa-close"</span> | ||
</button> | ||
<h4 class="modal-title">Create Site</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<div ng-if="error" class="alert alert-danger"> | ||
[[error.code]] - [[error.message]] | ||
</div> | ||
<form novalidate class="nsot-form"> | ||
<div class="form-group"> | ||
<input type="text" | ||
class="form-control"i | ||
placeholder="Name" | ||
ng-model="site.name" | ||
required | ||
> | ||
</div> | ||
<div class="form-group"> | ||
<textarea style="resize: vertical;" | ||
class="form-control" | ||
rows="5" | ||
placeholder="Description" | ||
ng-model="site.description" | ||
> | ||
</textarea> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="modal-footer"> | ||
<button | ||
type="button" | ||
class="btn btn-default" | ||
data-dismiss="modal" | ||
>Close</button> | ||
<button type="submit" | ||
ng-click="createSite(site)" | ||
class="btn btn-primary" | ||
>Create</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div ng-if="!sites.length" class="row"><div class="col-sm-6 col-sm-offset-3"> | ||
<panel> | ||
<panel-heading>Welcome</panel-heading> | ||
<panel-body> | ||
Welcome to the Network Source of Truth. It looks like you're new | ||
here. Lets start by creating a <em>site</em> which will be a namespace | ||
for all of your data. | ||
<hr> | ||
<form novalidate class="nsot-form"> | ||
<div class="form-group"> | ||
<input type="text" | ||
class="form-control"i | ||
placeholder="Name" | ||
ng-model="site.name" | ||
required | ||
> | ||
</div> | ||
<div class="form-group"> | ||
<textarea style="resize: vertical;" | ||
class="form-control" | ||
rows="5" | ||
placeholder="Description" | ||
ng-model="site.description" | ||
> | ||
</textarea> | ||
</div> | ||
</form> | ||
here. Lets start by creating a <em>site</em> with the button above. | ||
This will be a namespace for all of your data. | ||
</panel-body> | ||
<panel-footer class="text-right"> | ||
<button type="submit" | ||
ng-click="createSite(site)" | ||
class="btn btn-primary" | ||
>Create</button> | ||
</panel-footer> | ||
</panel> | ||
</div> | ||
<div ng-if="sites.length" | ||
ng-repeat="site in sites" | ||
class="col-sm-6 col-sm-offset-3"> | ||
<a ng-href="/sites/[[site.id]]">[[site.name]]</a> | ||
</div> | ||
</div></div> | ||
<div class="row" ng-if="sites.length" class="row"><div class="col-sm-10 col-sm-offset-1"> | ||
<panel> | ||
<panel-heading>Sites</panel-heading> | ||
<panel-body> | ||
<table class="table table-hover"> | ||
<thead> | ||
<tr> | ||
<th>ID</th> | ||
<th>Name</th> | ||
<th>Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="site in sites" ng-href="/sites/[[site.id]]"> | ||
<td class="col-sm-1">[[site.id]]</td> | ||
<td class="col-sm-3"> | ||
<a ng-href="/sites/[[site.id]]">[[site.name]]</a> | ||
</td> | ||
<td class="col-sm-8">[[site.description]]</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</panel-body> | ||
</panel> | ||
|
||
</div></div> | ||
</div> |