コード例 #1
0
ファイル: Cards.class.php プロジェクト: shawnlawyer/framework
 public static function details($_model = null)
 {
     $module = static::$module;
     $modeler = $module::model()->modeler;
     $_model == null ? forward_static_call_array(array($modeler, 'model'), array()) : forward_static_call_array(array($modeler, 'model'), array($_model));
     $_o = (object) null;
     $_o->size = 'large';
     $_o->icon_type = 'menu-icon';
     $_o->icon_background = 'user-icon-background';
     $_o->menu = (object) null;
     $_o->menu->items = self::modelOperationsMenuItems();
     $_o->head = 'User Detail';
     $_o->body = array('');
     $_o->body[] = CardKitHTML::sublineBlock('Name');
     $_o->body[] = DOMElementKitJS::loadComponentHere(DOMElementKitJS::xhrCallObject('forms/user/updateName', array($modeler::model()->id)), $modeler::model()->name, 'settings');
     $_o->body[] = CardKitHTML::sublineBlock('Password');
     $_o->body[] = DOMElementKitJS::loadComponentHere(DOMElementKitJS::xhrCallObject('forms/user/updatePassword', array($modeler::model()->id)), 'Set Password', 'settings');
     $_o->body[] = CardKitHTML::sublineBlock('Role');
     \Sequode\Application\Modules\Role\Modeler::exists($modeler::model()->role_id, 'id');
     $_o->body[] = DOMElementKitJS::loadComponentHere(DOMElementKitJS::xhrCallObject('forms/user/updateRole', array($modeler::model()->id)), \Sequode\Application\Modules\Role\Modeler::model()->name, 'settings');
     $_o->body[] = CardKitHTML::sublineBlock('Active Status');
     $_o->body[] = DOMElementKitJS::loadComponentHere(DOMElementKitJS::xhrCallObject('forms/user/updateActive', array($modeler::model()->id)), $modeler::model()->active == 1 ? 'Active' : 'Suspended', 'settings');
     $_o->body[] = CardKitHTML::sublineBlock('Sign Up Date');
     $_o->body[] = date('g:ia \\o\\n l jS F Y', $modeler::model()->sign_up_date);
     $_o->body[] = CardKitHTML::sublineBlock('Allowed Sequode Count');
     $_o->body[] = $modeler::model()->allowed_sequode_count;
     $_o->body[] = CardKitHTML::sublineBlock('Favorite Sequodes');
     $_o->body[] = $modeler::model()->sequode_favorites;
     $_o->body[] = CardKitHTML::sublineBlock('Email');
     $_o->body[] = $modeler::model()->email;
     $_o->body[] = CardKit::ownedItemsCollectionTile('Sequode', 'Sequodes Created : ', $modeler::model());
     $_o->body[] = CardKit::ownedItemsCollectionTile('Package', 'Packages Created : ', $modeler::model());
     $_o->body[] = CardKit::ownedItemsCollectionTile('Token', 'Tokens Created : ', $modeler::model());
     $_o->body[] = CardKit::nextInCollection((object) array('model_id' => $modeler::model()->id, 'details_route' => 'cards/user/details'));
     if (\Sequode\Application\Modules\Account\Authority::isSystemOwner()) {
         $_o->body[] = CardKitHTML::modelId($modeler::model());
     }
     return $_o;
 }
コード例 #2
0
ファイル: Cards.class.php プロジェクト: shawnlawyer/framework
 public static function my()
 {
     $_o = (object) null;
     $_o->size = 'fullscreen';
     $_o->head = 'My Packages';
     $_o->icon_type = 'menu-icon';
     $_o->icon_background = 'atom-icon-background';
     $_o->menu = (object) null;
     $_o->menu->items = array();
     $dom_id = FormInputComponent::uniqueHash('', '');
     $_o->menu->items[] = array('css_classes' => 'automagic-card-menu-item noSelect', 'id' => $dom_id, 'contents' => 'New Package', 'js_action' => DOMElementKitJS::onTapEventsXHRCall($dom_id, DOMElementKitJS::xhrCallObject('operations/package/newPackage')));
     $_o->body = array();
     $_o->body[] = CardKit::collectionCard((object) array('collection' => 'packages', 'icon' => 'atom', 'card_route' => 'cards/package/my', 'details_route' => 'cards/package/details'));
     return $_o;
 }
コード例 #3
0
ファイル: Cards.class.php プロジェクト: shawnlawyer/framework
 public static function favorites()
 {
     $_o = (object) null;
     $_o->size = 'fullscreen';
     $_o->icon_type = 'menu-icon';
     $_o->icon_background = 'sequode-icon-background';
     $_o->menu = (object) null;
     $_o->menu->items = array();
     $_o->head = 'Sequode Favorites';
     $dom_id = FormInputComponent::uniqueHash('', '');
     $_o->menu->items[] = array('css_classes' => 'automagic-card-menu-item noSelect', 'id' => $dom_id, 'contents' => 'Empty Favorites', 'js_action' => DOMElementKitJS::onTapEventsXHRCall($dom_id, DOMElementKitJS::xhrCallObject('operations/user/emptySequodeFavorites', [], 'function(){registry.fetch({collection:\'sequode_favorites\'});}')));
     $_o->body = array();
     $_o->body[] = CardKit::collectionCard((object) array('collection' => 'sequode_favorites', 'icon' => 'sequode', 'card_route' => 'cards/sequode/favorites', 'details_route' => 'cards/sequode/details'));
     return $_o;
 }
コード例 #4
0
 public static function onTapEventsXHRCallButton($contents, $route, $inputs = null, $callback = null)
 {
     $dom_id = FormInputComponent::uniqueHash('', '');
     $html = $js = array();
     $html[] = '<span class="btn" id="' . $dom_id . '">' . $contents . '</span>';
     $js[] = DOMElementKitJS::onTapEventsXHRCall($dom_id, DOMElementKitJS::xhrCallObject($route, $inputs, $callback));
     return (object) array('html' => implode('', $html), 'js' => implode('', $js));
 }