-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f8cd965
commit 0b06037
Showing
11 changed files
with
329 additions
and
272 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
'use strict' | ||
|
||
angular.module('angularCmsApp') | ||
.controller 'PagesCtrl', ($scope) -> | ||
.controller 'PagesCtrl', ($scope, DataService) -> | ||
$scope.awesomeThings = [ | ||
'HTML5 Boilerplate' | ||
'AngularJS' | ||
'Karma' | ||
] | ||
$scope.page = {} | ||
#Select user | ||
$scope.selectPage = (p) -> | ||
$scope.page = p | ||
|
||
#Get users | ||
$scope.getPages = () -> | ||
DataService.fetch('pages').then((res) -> | ||
$scope.pages = res.data | ||
) | ||
|
||
#Add user to database | ||
$scope.save = (p) -> | ||
DataService.save('pages', p).then((data) -> | ||
$scope.getPages() | ||
$scope.page = {} | ||
console.log(data) | ||
) |
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 |
---|---|---|
|
@@ -163,7 +163,7 @@ html { | |
} | ||
|
||
.cms-sidebar.closed .well { | ||
width: 45px; | ||
width: 62px; | ||
|
||
} | ||
|
||
|
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 |
---|---|---|
|
@@ -8,4 +8,9 @@ | |
Version {{App.version}} | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<hr/> | ||
|
||
<pre>{{App.config}}</pre> | ||
<pre>{{App.session}}</pre> |
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,47 +1,59 @@ | ||
|
||
<div class="page-container"> | ||
<div class="row"> | ||
<ol class="breadcrumb"> | ||
<li> | ||
<a href="#">Home</a> | ||
</li> | ||
<li class="active">Add Page</li> | ||
</ol> | ||
<!-- Nav tabs --><br></div> | ||
<div class="row"> | ||
<div class="col-sm-8"> | ||
<input type="text" class="form-control" placeholder="Enter title here"> | ||
<div class=""> | ||
<cms-header title="Pages" icon="folder-open"></cms-header> | ||
<button class="btn" ng-click="getPages()">Refresh</button> | ||
<section> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<ol class="breadcrumb"> | ||
<li> | ||
<a href="#">Home</a> | ||
</li> | ||
<li class="active">Add Page</li> | ||
</ol> | ||
<table class="table table-condensed table-hover table-striped clearfix"> | ||
<thead> | ||
<tr> | ||
<th>#</th> | ||
<th>Page</th> | ||
<th>Body</th> | ||
<th>Status</th> | ||
|
||
<span class="help-block"> | ||
<strong>Permlink:</strong> http://jonniespratley.me/?page_id=83 | ||
</span> | ||
|
||
<div class="btn-group"> | ||
<a class="btn btn-default btn-xs" href="#">h1</a> | ||
<a class="btn btn-default btn-xs" href="#">h2</a> | ||
<a class="btn btn-default btn-xs" href="#">h3</a> | ||
</div> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
||
<textarea class="form-control" rows="3"></textarea> | ||
</div> | ||
<div class="col-sm-4"> | ||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<strong>Publish</strong> | ||
</div> | ||
<div class="panel-body"> | ||
<ul> | ||
<tr ng-repeat="page in pages" ng-click="selectPage(page)"> | ||
<td>{{page._id}}</td> | ||
<td>{{page.title}}</td> | ||
<td>{{page.body}}</td> | ||
<td><span class="label label-default">{{page.publish}}</span></td> | ||
<td>{{page.visibility}}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</section> | ||
<div class="row"> | ||
<div class="col-sm-8"> | ||
<input type="text" class="form-control" placeholder="Enter title here" ng-model="page.title"> | ||
<span class="help-block"> | ||
<strong>Permlink:</strong> http://{{App.baseurl}}/?page_id={{page.slug}} | ||
</span> | ||
<div class="btn-group"></div> | ||
<textarea class="form-control" rows="5" ng-model="page.body"></textarea> | ||
</div> | ||
<div class="col-sm-4"> | ||
<ul> | ||
<li>Status: Published</li> | ||
<li>Visibility: Public</li> | ||
</ul> | ||
</div> | ||
<div class="panel-footer clearfix"> | ||
<a href="#">Move to trash</a> | ||
<button class="btn btn-primary pull-right">Publish</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<!--/span--> | ||
<!--/row--> | ||
<button href="#" class="btn btn-danger btn-block btn-xs" ng-click="remove(post)">Move to trash</button> | ||
<button class="btn pull-right btn-primary btn-block" ng-click="save(page)">Save</button> | ||
</div> | ||
</div> | ||
</div> | ||
<!--/span--> | ||
<!--/row--> |
Oops, something went wrong.