This repository has been archived by the owner on Aug 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from SlateFoundation/develop
Release: slate-admin v2.4.0
- Loading branch information
Showing
15 changed files
with
159 additions
and
60 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
7 changes: 4 additions & 3 deletions
7
html-templates/app/SlateAdmin/ext.tpl → html-templates/webapps/SlateAdmin/sencha.tpl
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 was deleted.
Oops, something went wrong.
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,13 @@ | ||
<?php | ||
|
||
namespace SlateAdmin; | ||
|
||
|
||
class RequestHandler extends \Emergence\Site\RequestHandler | ||
{ | ||
public static function handleRequest() | ||
{ | ||
$GLOBALS['Session']->requireAccountLevel('Staff'); | ||
return static::sendResponse(WebApp::load()->render(), 'webapps/SlateAdmin'); | ||
} | ||
} |
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,29 @@ | ||
<?php | ||
|
||
namespace SlateAdmin; | ||
|
||
|
||
class WebApp extends \Emergence\WebApps\SenchaApp | ||
{ | ||
public static $plugins = []; | ||
|
||
|
||
public static function getPlugins() | ||
{ | ||
return static::$plugins; | ||
} | ||
|
||
public static function load($name = 'SlateAdmin') | ||
{ | ||
return parent::load($name); | ||
} | ||
|
||
public function render() | ||
{ | ||
$response = parent::render(); | ||
|
||
$response->setPayloadKey('plugins', static::getPlugins()); | ||
|
||
return $response; | ||
} | ||
} |
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 +1,2 @@ | ||
build/ | ||
sencha-error-*.log |
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,12 +1,9 @@ | ||
/*jslint browser: true, undef: true *//*global Ext*/ | ||
Ext.define('SlateAdmin.store.Locations', { | ||
extend: 'Ext.data.Store', | ||
|
||
|
||
model: 'SlateAdmin.model.Location', | ||
proxy: { | ||
type: 'slaterecords', | ||
url: '/locations', | ||
startParam: false, | ||
limitParam: false | ||
config: { | ||
pageSize: 0 | ||
} | ||
}); |
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,12 +1,9 @@ | ||
/*jslint browser: true, undef: true *//*global Ext*/ | ||
Ext.define('SlateAdmin.store.courses.Schedules', { | ||
extend: 'Ext.data.Store', | ||
|
||
|
||
model: 'SlateAdmin.model.course.Schedule', | ||
proxy: { | ||
type: 'slaterecords', | ||
url: '/schedules', | ||
startParam: false, | ||
limitParam: false | ||
config: { | ||
pageSize: 0 | ||
} | ||
}); |
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,6 +1,9 @@ | ||
/*jslint browser: true, undef: true *//*global Ext*/ | ||
Ext.define('SlateAdmin.store.people.People', { | ||
extend: 'Ext.data.Store', | ||
|
||
model: 'Slate.model.person.Person' | ||
|
||
model: 'Slate.model.person.Person', | ||
config: { | ||
pageSize: 0 | ||
} | ||
}); |
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 @@ | ||
source ../plan.abstract.sh | ||
|
||
pkg_name=slate-admin |
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,64 @@ | ||
pkg_origin=slate | ||
pkg_maintainer="Chris Alfano <[email protected]>" | ||
pkg_license=("MIT") | ||
pkg_build_deps=( | ||
core/git | ||
jarvus/sencha-cmd/6.5.2.15 | ||
) | ||
|
||
|
||
# implement git-based dynamic version strings | ||
pkg_version() { | ||
if [ -n "${pkg_last_tag}" ]; then | ||
echo "${pkg_last_version}-git+${pkg_last_tag_distance}.${pkg_commit}" | ||
else | ||
echo "${pkg_last_version}-git+${pkg_commit}" | ||
fi | ||
} | ||
|
||
do_before() { | ||
do_default_before | ||
|
||
# configure git repository | ||
export GIT_DIR="/src/.git" | ||
|
||
# load version information from git | ||
pkg_commit="$(git rev-parse --short HEAD)" | ||
pkg_last_tag="$(git describe --tags --abbrev=0 ${pkg_commit} || true 2>/dev/null)" | ||
|
||
if [ -n "${pkg_last_tag}" ]; then | ||
pkg_last_version=${pkg_last_tag#v} | ||
pkg_last_tag_distance="$(git rev-list ${pkg_last_tag}..${pkg_commit} --count)" | ||
else | ||
pkg_last_version="0.0.0" | ||
fi | ||
|
||
# initialize pkg_version | ||
update_pkg_version | ||
} | ||
|
||
|
||
# implement build workflow | ||
do_build() { | ||
pushd "${PLAN_CONTEXT}" > /dev/null | ||
|
||
sencha ant \ | ||
-Dapp.output.base="${CACHE_PATH}" \ | ||
-Dbuild.temp.dir="/tmp" \ | ||
-Dapp.cache.deltas=false \ | ||
-Dapp.output.microloader.enable=false \ | ||
-Dbuild.enable.appmanifest=false \ | ||
-Denable.standalone.manifest=true \ | ||
production \ | ||
build | ||
|
||
popd > /dev/null | ||
} | ||
|
||
do_install() { | ||
cp -r "${CACHE_PATH}" "${pkg_prefix}/app" | ||
} | ||
|
||
do_strip() { | ||
return 0 | ||
} |
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,8 +1,3 @@ | ||
<?php | ||
|
||
$GLOBALS['Session']->requireAccountLevel('Staff'); | ||
|
||
Sencha_RequestHandler::respond('app/SlateAdmin/ext', array( | ||
'App' => Sencha_App::getByName('SlateAdmin') | ||
,'mode' => 'production' | ||
)); | ||
SlateAdmin\RequestHandler::handleRequest(); |