-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scaffolded out all article crud pages
- Loading branch information
Showing
12 changed files
with
208 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
|
||
<pre highlight="">{{ArticleController.article|json}}</pre> | ||
<md-tabs md-dynamic-height md-border-bottom> | ||
<md-tab label="Post"> | ||
<md-content class="md-padding" ui-view="post"></md-content> | ||
</md-tab> | ||
<md-tab label="Media"> | ||
<md-content class="md-padding" ui-view="media"></md-content> | ||
</md-tab> | ||
<md-tab label="Meta"> | ||
<md-content class="md-padding" ui-view="meta"></md-content> | ||
</md-tab> | ||
<md-tab label="Stats"> | ||
<md-content class="md-padding" ui-view="stats"></md-content> | ||
</md-tab> | ||
<md-tab label="History"> | ||
<md-content class="md-padding" ui-view="history"></md-content> | ||
</md-tab> | ||
</md-tabs> |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h2>History</h2> | ||
|
||
<h3>TODO</h3> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace app.admin.articles.article.history { | ||
|
||
export const namespace = 'app.admin.articles.article.history'; | ||
|
||
export class HistoryController { | ||
|
||
static $inject = ['article']; | ||
constructor(public article:common.models.Article) { | ||
|
||
} | ||
|
||
} | ||
|
||
angular.module(namespace, []) | ||
.controller(namespace+'.controller', HistoryController); | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h2>Media</h2> | ||
|
||
<h3>TODO</h3> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace app.admin.articles.article.media { | ||
|
||
export const namespace = 'app.admin.articles.article.media'; | ||
|
||
export class MediaController { | ||
|
||
static $inject = ['article']; | ||
constructor(public article:common.models.Article) { | ||
|
||
} | ||
|
||
} | ||
|
||
angular.module(namespace, []) | ||
.controller(namespace+'.controller', MediaController); | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h2>Meta</h2> | ||
|
||
<h3>TODO</h3> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace app.admin.articles.article.meta { | ||
|
||
export const namespace = 'app.admin.articles.article.meta'; | ||
|
||
export class MetaController { | ||
|
||
static $inject = ['article']; | ||
constructor(public article:common.models.Article) { | ||
|
||
} | ||
|
||
} | ||
|
||
angular.module(namespace, []) | ||
.controller(namespace+'.controller', MetaController); | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<h2 ng-if="ArticleController.$stateParams.newArticle">Create</h2> | ||
<h2 ng-if="!ArticleController.$stateParams.newArticle">Edit</h2> | ||
|
||
<form novalidate name="postForm"> | ||
|
||
<md-input-container> | ||
<label for="postFormTitle">Title</label> | ||
|
||
<input id="postFormTitle" ng-model="ArticleController.article.title" name="title" type="text" ng-required="true"> | ||
<ng-messages for="postFormTitle.title.$error"> | ||
<ng-message when="required">This is required.</ng-message> | ||
</ng-messages> | ||
</md-input-container> | ||
|
||
<md-input-container> | ||
<label for="postFormPermalink">Permalink</label> | ||
|
||
<input id="postFormPermalink" ng-model="ArticleController.article.permalink" name="permalink" type="text" ng-required="true" ng-change="ArticleController.updatePermalink()"> | ||
<ng-messages for="postFormTitle.permalink.$error"> | ||
<ng-message when="required">This is required.</ng-message> | ||
</ng-messages> | ||
</md-input-container> | ||
|
||
|
||
<md-input-container flex> | ||
<label for="postFormContent">Content</label> | ||
|
||
<textarea id="postFormContent" ng-model="ArticleController.article.content" columns="1"></textarea> | ||
<ng-messages for="postFormTitle.title.$error"> | ||
<ng-message when="required">This is required.</ng-message> | ||
</ng-messages> | ||
</md-input-container> | ||
|
||
<md-input-container flex> | ||
<label for="postFormExcerpt">Excerpt</label> | ||
|
||
<textarea id="postFormExcerpt" ng-model="ArticleController.article.excerpt" columns="1" md-maxlength="140"></textarea> | ||
<ng-messages for="postFormTitle.excerpt.$error"> | ||
<ng-message when="maxlength">Maximum length is 140 chars (Like a tweet!)</ng-message> | ||
</ng-messages> | ||
</md-input-container> | ||
|
||
<md-chips | ||
ng-init="ArticleController.article.tags = []" | ||
ng-model="ArticleController.article.tags" | ||
readonly="false" | ||
placeholder="Enter a tag" | ||
delete-button-label="Remove Tag" | ||
delete-hint="Press delete to remove tag" | ||
secondary-placeholder="+Tag"></md-chips> | ||
|
||
</form> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace app.admin.articles.article.post { | ||
|
||
export const namespace = 'app.admin.articles.article.post'; | ||
|
||
export class PostController { | ||
|
||
static $inject = ['article']; | ||
constructor(public article:common.models.Article) { | ||
|
||
} | ||
|
||
} | ||
|
||
angular.module(namespace, []) | ||
.controller(namespace+'.controller', PostController); | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h2>Stats</h2> | ||
|
||
<h3>TODO</h3> |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace app.admin.articles.article.stats { | ||
|
||
export const namespace = 'app.admin.articles.article.stats'; | ||
|
||
export class StatsController { | ||
|
||
static $inject = ['article']; | ||
constructor(public article:common.models.Article) { | ||
|
||
} | ||
|
||
} | ||
|
||
angular.module(namespace, []) | ||
.controller(namespace+'.controller', StatsController); | ||
|
||
} |