-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 0145041
Showing
11 changed files
with
195 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/app/bundle/* | ||
/node_modules | ||
*.zip |
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,6 @@ | ||
# Changelog | ||
|
||
## 1.0.0 (October 1st, 2017) | ||
|
||
### Added | ||
- Dashboard widget for notes. |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 Tobbe | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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 @@ | ||
# Pagekit Dashboard Widgets | ||
|
||
This extension provides additional widgets for the admin dashboard. You can find it in the [pagekit marketplace](https://pagekit.com/marketplace/package/tobbe/dashboard-widgets). | ||
|
||
## Features | ||
|
||
- Note widget for the dashboard. | ||
|
||
## How to work with the extension | ||
|
||
1. Install this extension in your environment using the built in marketplace. The extension and all its dependancies will be installed automatically. | ||
2. Ensure that the required users/roles have the necessary rights to use the extension. | ||
3. Create the widgets in your dashboard. | ||
|
||
## Issues and feature requests | ||
|
||
Please use the [issues section](https://github.com/tobbexiv/pagekit-dashboard-widgets/issues) to file any bugs or feature requests. |
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,53 @@ | ||
<template> | ||
|
||
<form class="pk-panel-teaser uk-form uk-form-stacked" v-if="editing"> | ||
|
||
<div class="uk-form-row"> | ||
<label class="uk-form-label">{{ 'Title' | trans }}</label> | ||
<div class="uk-form-controls"> | ||
<input class="uk-width-1-1" type="text" v-model="widget.title"> | ||
</div> | ||
</div> | ||
|
||
<div class="uk-form-row"> | ||
<label class="uk-form-label">{{ 'Notes' | trans }}</label> | ||
<div class="uk-form-controls"> | ||
<textarea class="uk-width-1-1" rows="6" v-model="widget.note"></textarea> | ||
</div> | ||
</div> | ||
|
||
</form> | ||
|
||
<div v-else> | ||
|
||
<h3>{{ widget.title }}</h3> | ||
<p>{{ widget.note }}</p> | ||
|
||
</div> | ||
|
||
</template> | ||
|
||
<script> | ||
module.exports = { | ||
type: { | ||
id: 'notes', | ||
label: 'Notes', | ||
defaults: { | ||
title: '', | ||
notes: '' | ||
} | ||
}, | ||
replace: false, | ||
props: ['widget', 'editing'] | ||
} | ||
window.Dashboard.components['hello'] = module.exports; | ||
</script> |
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,5 @@ | ||
/** | ||
* Collection of all dashboard widgets. | ||
*/ | ||
|
||
window.Dashboard.components['tobbe-dasboard-notes'] = Vue.expand(require('./dashboard-notes.vue')); |
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,24 @@ | ||
{ | ||
"name": "tobbe/dashboard-widgets", | ||
"module": "tobbe/dashboard-widgets", | ||
"version": "1.0.0", | ||
"type": "pagekit-extension", | ||
"title": "Dashboard widgets", | ||
"description": "Provide additional widgets for the dashboard.", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Tobbe", | ||
"email": "[email protected]", | ||
"homepage": "https://github.com/tobbexiv/pagekit-dashboard-widgets" | ||
} | ||
], | ||
"extra": { | ||
"icon": "icon.png" | ||
}, | ||
"archive": { | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
'name' => 'tobbe/dashboard-widgets', | ||
|
||
'type' => 'extension', | ||
|
||
'main' => function ($app) {}, | ||
|
||
'resources' => [ | ||
'tobbe/dasboard-widgets:' => '' | ||
], | ||
|
||
'events' => [ | ||
'view.scripts' => function ($event, $scripts) use ($app) { | ||
|
||
$packageVersion = $app->config('system')->get('packages.tobbe/dashboard-widgets'); | ||
$packageVersionHash = substr(sha1($app->system()->config('secret') . $packageVersion), 0, 4); | ||
|
||
$scripts->register('tobbe-dashboard-widgets', 'tobbe/dashboard-widgets:app/bundle/dashboard-widgets.js', ['~dashboard'], ['version' => $packageVersionHash]); | ||
|
||
} | ||
] | ||
|
||
]; | ||
|
||
?> |
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,21 @@ | ||
{ | ||
"name": "dashboard-widgets", | ||
"devDependencies": { | ||
"babel-core": "^6.9.1", | ||
"babel-loader": "^6.2.4", | ||
"babel-plugin-transform-runtime": "^6.9.0", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-runtime": "^6.9.2", | ||
"bower": "*", | ||
"css-loader": "^0.23.1", | ||
"gulp": "*", | ||
"gulp-less": "*", | ||
"gulp-rename": "*", | ||
"gulp-header": "*", | ||
"vue-hot-reload-api": "^1.3.2", | ||
"vue-html-loader": "^1.2.2", | ||
"vue-loader": "^8.5.2", | ||
"vue-style-loader": "^1.0.0", | ||
"webpack": "^1.13.1" | ||
} | ||
} |
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 @@ | ||
module.exports = [ | ||
|
||
{ | ||
entry: { | ||
"dashboard-widgets": "./app/components/dashboard-widgets.js" | ||
}, | ||
output: { | ||
filename: "./app/bundle/[name].js", | ||
}, | ||
module: { | ||
loaders: [ | ||
{ test: /\.vue$/, loader: "vue" } | ||
] | ||
} | ||
} | ||
|
||
]; |