Created
August 6, 2018 13:39
-
-
Save pnmcosta/bde08b2a9c905001c41c721db2a33424 to your computer and use it in GitHub Desktop.
Total.js CMS admin component
This file contains hidden or 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
// Add this file to /components/ directory | |
<script total> | |
// groups this component with admin | |
exports.group = 'admin'; | |
exports.install = function() { | |
// include custom routes here | |
}; | |
</script> | |
<div data-bind="common.page__show:value == 'work'" class="hidden"> | |
work list is here! | |
</div> | |
<div data-jc="form__common.form__icon:briefcase;if:work-form;title:@(Edit);width:1500;autofocus:true" class="hidden"> | |
work form is here! | |
</div> | |
<script> | |
var navItem = { role: 'Work', title: 'Work', url: '/admin/work/', value: 'work', icon: 'briefcase' }; | |
ROUTE(navItem.url, function() { | |
EMIT('page', navItem); | |
SET('common.page', navItem.value); | |
}); | |
ON('ready', function() { | |
common.nav.push(navItem); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment