From 6990469c672e389d1c976a82a9ee6507f669d106 Mon Sep 17 00:00:00 2001 From: Arno Kaimbacher Date: Mon, 10 Sep 2018 15:09:10 +0200 Subject: [PATCH] all models into model folder --- app/Book.php | 2 +- app/Collection.php | 14 ---- .../Controllers/Auth/RegisterController.php | 2 +- app/Http/Controllers/BookController.php | 2 +- app/Http/Controllers/BorrowController.php | 4 +- .../Controllers/Frontend/HomeController.php | 5 +- .../Controllers/Frontend/PagesController.php | 3 +- .../Controllers/Frontend/SearchController.php | 2 +- .../Frontend/SitelinkController.php | 6 +- .../Controllers/Oai/RequestController.php | 79 ++++++++++--------- .../Controllers/Publish/IndexController.php | 8 +- .../Settings/Access/UserController.php | 2 +- .../Settings/CategoryController.php | 2 +- .../Settings/CollectionController.php | 2 +- .../Settings/DatasetController.php | 9 +-- .../Settings/LicenseController.php | 4 +- .../Controllers/Settings/PersonController.php | 2 +- app/Http/Kernel.php | 1 + app/Library/Xml/Conf.php | 3 +- app/Library/Xml/DatasetExtension.php | 57 ++++++------- app/Library/Xml/Strategy.php | 2 +- app/Library/Xml/XmlModel.php | 48 +++++------ app/Models/Collection.php | 15 ++++ app/{ => Models}/Dataset.php | 33 ++++---- app/{ => Models}/DatasetFinder.php | 28 +++---- app/Models/File.php | 2 +- app/{ => Models}/Language.php | 2 +- app/{ => Models}/License.php | 7 +- app/Models/Page.php | 5 +- app/{ => Models}/Person.php | 18 +++-- app/{ => Models}/Project.php | 5 +- app/Models/Title.php | 3 +- app/{ => Models}/User.php | 2 +- app/{ => Models}/XmlCache.php | 5 +- app/Services/Registrar.php | 2 +- composer.json | 4 +- composer.lock | 14 ++-- config/auth.php | 2 +- config/entrust.php | 2 +- config/services.php | 2 +- public/js/app.js | 2 +- resources/assets/js/components/MyVuetable.vue | 62 ++++++++++++++- resources/lang/en/doctypes.php | 2 +- .../views/settings/person/edit.blade.php | 2 +- routes/api.php | 44 ++++++++++- routes/web.php | 6 +- 46 files changed, 325 insertions(+), 203 deletions(-) delete mode 100644 app/Collection.php create mode 100644 app/Models/Collection.php rename app/{ => Models}/Dataset.php (79%) rename app/{ => Models}/DatasetFinder.php (75%) rename app/{ => Models}/Language.php (89%) rename app/{ => Models}/License.php (71%) rename app/{ => Models}/Person.php (66%) rename app/{ => Models}/Project.php (83%) rename app/{ => Models}/User.php (99%) mode change 100755 => 100644 rename app/{ => Models}/XmlCache.php (93%) diff --git a/app/Book.php b/app/Book.php index d0faa19..0f3323d 100755 --- a/app/Book.php +++ b/app/Book.php @@ -17,7 +17,7 @@ class Book extends Model public function project() { - return $this->belongsTo('App\Project', 'project_id', 'id'); + return $this->belongsTo('App\Models\Project', 'project_id', 'id'); } // public function shelf() diff --git a/app/Collection.php b/app/Collection.php deleted file mode 100644 index f2c55f1..0000000 --- a/app/Collection.php +++ /dev/null @@ -1,14 +0,0 @@ -belongsToMany(\App\Dataset::class, 'link_documents_collections', 'collection_id', 'document_id'); - } -} diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 7a69be0..9360d3a 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers\Auth; -use App\User; +use App\Models\User; use App\Http\Controllers\Controller; use Illuminate\Support\Facades\Validator; use Illuminate\Foundation\Auth\RegistersUsers; diff --git a/app/Http/Controllers/BookController.php b/app/Http/Controllers/BookController.php index f6139a3..86c5c04 100755 --- a/app/Http/Controllers/BookController.php +++ b/app/Http/Controllers/BookController.php @@ -4,7 +4,7 @@ namespace App\Http\Controllers; use App\Http\Requests; use App\Http\Controllers\Controller; use App\Book; -use App\Project; +use App\Models\Project; use App\Shelf; use App\Http\Requests\BookRequest; use Illuminate\Http\Request; diff --git a/app/Http/Controllers/BorrowController.php b/app/Http/Controllers/BorrowController.php index e0d3ed7..3d126fe 100644 --- a/app/Http/Controllers/BorrowController.php +++ b/app/Http/Controllers/BorrowController.php @@ -5,14 +5,12 @@ use App\Http\Controllers\Controller; use App\Book; use App\Person; use App\Transaction; -use App\Project; +use App\Models\Project; use App\Http\Requests\PeminjamanRequest; use Illuminate\Http\Request; class BorrowController extends Controller { - - public function __construct() { $this->middleware('auth'); diff --git a/app/Http/Controllers/Frontend/HomeController.php b/app/Http/Controllers/Frontend/HomeController.php index f9f6132..43323c4 100644 --- a/app/Http/Controllers/Frontend/HomeController.php +++ b/app/Http/Controllers/Frontend/HomeController.php @@ -17,6 +17,10 @@ class HomeController extends Controller { //$this->middleware('auth'); } + public function test(): View + { + return view('welcome'); + } /** * Show the application dashboard. @@ -43,7 +47,6 @@ class HomeController extends Controller // } return view('frontend.home.index'); - // return view('welcome'); } /** diff --git a/app/Http/Controllers/Frontend/PagesController.php b/app/Http/Controllers/Frontend/PagesController.php index fe3375f..c7e2102 100644 --- a/app/Http/Controllers/Frontend/PagesController.php +++ b/app/Http/Controllers/Frontend/PagesController.php @@ -2,8 +2,7 @@ namespace App\Http\Controllers\Frontend; use App\Http\Controllers\Controller; -use App\Dataset; -use Illuminate\Http\Request; +use App\Models\Dataset; use Illuminate\View\View; class PagesController extends Controller diff --git a/app/Http/Controllers/Frontend/SearchController.php b/app/Http/Controllers/Frontend/SearchController.php index bad74a2..e6d5c0b 100644 --- a/app/Http/Controllers/Frontend/SearchController.php +++ b/app/Http/Controllers/Frontend/SearchController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers\Frontend; use App\Book; -use App\Dataset; +use App\Models\Dataset; use App\Http\Controllers\Controller; use App\Library\Search\Navigation; use App\Library\Util\SolrSearchSearcher; diff --git a/app/Http/Controllers/Frontend/SitelinkController.php b/app/Http/Controllers/Frontend/SitelinkController.php index f4251e9..cf504cf 100644 --- a/app/Http/Controllers/Frontend/SitelinkController.php +++ b/app/Http/Controllers/Frontend/SitelinkController.php @@ -1,8 +1,8 @@ with(['years' => $this->years, 'documents' => $this->ids]); } - public function list($year) + public function listDocs($year) { $this->index(); if (preg_match('/^\d{4}$/', $year) > 0) { @@ -34,7 +34,7 @@ class SitelinkController extends Controller $select = Dataset::with('titles', 'authors') ->where('server_state', 'LIKE', "%" . $serverState . "%"); - $from = (int)$year; + $from = (int) $year; $until = $year + 1; $select ->whereYear('server_date_published', '>=', $from) diff --git a/app/Http/Controllers/Oai/RequestController.php b/app/Http/Controllers/Oai/RequestController.php index b1deb3a..3a168d1 100644 --- a/app/Http/Controllers/Oai/RequestController.php +++ b/app/Http/Controllers/Oai/RequestController.php @@ -3,9 +3,8 @@ namespace App\Http\Controllers\Oai; use Illuminate\Http\Request; use App\Http\Controllers\Controller; -use App\Dataset; +use App\Models\Dataset; use Illuminate\Support\Facades\Log; -use App\Book; class RequestController extends Controller { @@ -15,7 +14,7 @@ class RequestController extends Controller * * @var array */ - private $_deliveringDocumentStates = array('published', 'deleted'); // maybe deleted documents too + private $deliveringDocumentStates = array('published', 'deleted'); // maybe deleted documents too const SET_SPEC_PATTERN = '[A-Za-z0-9\-_\.!~\*\'\(\)]+'; @@ -31,7 +30,7 @@ class RequestController extends Controller * * @var \DomDocument Defaults to null. */ - protected $_xslt = null; + protected $xslt = null; /** * Holds the xslt processor. @@ -47,9 +46,9 @@ class RequestController extends Controller */ private function loadStyleSheet($stylesheet) { - $this->_xslt = new \DomDocument; - $this->_xslt->load($stylesheet); - $this->_proc->importStyleSheet($this->_xslt); + $this->xslt = new \DomDocument; + $this->xslt->load($stylesheet); + $this->_proc->importStyleSheet($this->xslt); if (isset($_SERVER['HTTP_HOST'])) { $this->_proc->setParameter('', 'host', $_SERVER['HTTP_HOST']); } @@ -91,22 +90,22 @@ class RequestController extends Controller if (isset($oaiRequest['verb'])) { $this->_proc->setParameter('', 'oai_verb', $oaiRequest['verb']); if ($oaiRequest['verb'] == 'Identify') { - $this->_handleIdentify(); + $this->handleIdentify(); } elseif ($oaiRequest['verb'] == 'ListMetadataFormats') { - $this->_handleListMetadataFormats(); + $this->handleListMetadataFormats(); } elseif ($oaiRequest['verb'] == 'ListRecords') { - $this->_handleListRecords($oaiRequest); + $this->handleListRecords($oaiRequest); } elseif ($oaiRequest['verb'] == 'ListIdentifiers') { - $this->_handleListIdentifiers($oaiRequest); + $this->handleListIdentifiers($oaiRequest); } elseif ($oaiRequest['verb'] == 'ListSets') { - $this->_handleListSets($oaiRequest); + $this->handleListSets($oaiRequest); } else { - $this->_handleIllegalVerb(); + $this->handleIllegalVerb(); } } else { $oaiRequest['verb'] = 'Identify'; $this->_proc->setParameter('', 'oai_verb', $oaiRequest['verb']); - $this->doc = $this->_handleIdentify(); + $this->doc = $this->handleIdentify(); } //$xml = $this->_xml->saveXML(); @@ -123,7 +122,7 @@ class RequestController extends Controller * * @return void */ - private function _handleIdentify() + private function handleIdentify() { $email = "repository@geologie.ac.at"; $repositoryName = "Data Research Repository"; @@ -149,7 +148,7 @@ class RequestController extends Controller * @param array &$oaiRequest Contains full request information * @return void */ - private function _handleListMetadataFormats() + private function handleListMetadataFormats() { $this->_xml->appendChild($this->_xml->createElement('Documents')); } @@ -160,10 +159,10 @@ class RequestController extends Controller * @param array &$oaiRequest Contains full request information * @return void */ - private function _handleListRecords($oaiRequest) + private function handleListRecords($oaiRequest) { $maxRecords = 20;//$this->_configuration->getMaxListRecords(); - $this->_handlingOfLists($oaiRequest, $maxRecords); + $this->handlingOfLists($oaiRequest, $maxRecords); } /** @@ -172,10 +171,10 @@ class RequestController extends Controller * @param array &$oaiRequest Contains full request information * @return void */ - private function _handleListIdentifiers(array &$oaiRequest) + private function handleListIdentifiers(array &$oaiRequest) { $maxIdentifier = 20;//$this->_configuration->getMaxListIdentifiers(); - $this->_handlingOfLists($oaiRequest, $maxIdentifier); + $this->handlingOfLists($oaiRequest, $maxIdentifier); } /** @@ -184,7 +183,7 @@ class RequestController extends Controller * @param array &$oaiRequest Contains full request information * @return void */ - private function _handleListSets() + private function handleListSets() { $repIdentifier = "rdr.gba.ac.at"; $this->_proc->setParameter('', 'repIdentifier', $repIdentifier); @@ -216,7 +215,7 @@ class RequestController extends Controller } - private function _handleIllegalVerb() + private function handleIllegalVerb() { $this->_proc->setParameter('', 'oai_error_code', 'badVerb'); $this->_proc->setParameter('', 'oai_error_message', 'The verb provided in the request is illegal.'); @@ -231,7 +230,7 @@ class RequestController extends Controller * * @return void */ - private function _handlingOfLists(array &$oaiRequest, $maxRecords) + private function handlingOfLists(array &$oaiRequest, $maxRecords) { if (true === empty($maxRecords)) { $maxRecords = 100; @@ -255,7 +254,7 @@ class RequestController extends Controller // no resumptionToken is given $finder = Dataset::query(); // add server state restrictions - $finder->whereIn('server_state', $this->_deliveringDocumentStates); + $finder->whereIn('server_state', $this->deliveringDocumentStates); if (array_key_exists('set', $oaiRequest)) { $setarray = explode(':', $oaiRequest['set']); if ($setarray[0] == 'doc-type') { @@ -283,7 +282,7 @@ class RequestController extends Controller //$node = $this->_xml->createElement('Rdr_Dataset'); $domNode = $this->getDatasetXmlDomNode($dataset); // add frontdoor url - $this->_addLandingPageAttribute($domNode, $dataset->id); + $this->addLandingPageAttribute($domNode, $dataset->id); // add access rights to element //$this->_addAccessRights($domNode, $dataset); @@ -301,8 +300,8 @@ class RequestController extends Controller //$node->appendChild($child); //$type = $dataset->type; - $this->_addSpecInformation($node, 'doc-type:' . $dataset->type); - //$this->_addSpecInformation($node, 'bibliography:' . 'false'); + $this->addSpecInformation($node, 'doc-type:' . $dataset->type); + //$this->addSpecInformation($node, 'bibliography:' . 'false'); $this->_xml->documentElement->appendChild($node); } @@ -314,7 +313,7 @@ class RequestController extends Controller * @param string $docid Id of the dataset * @return void */ - private function _addLandingPageAttribute(\DOMNode $document, $dataid) + private function addLandingPageAttribute(\DOMNode $document, $dataid) { $url = route('frontend.dataset.show', $dataid); @@ -324,7 +323,7 @@ class RequestController extends Controller $document->appendChild($attr); } - private function _addSpecInformation(\DOMNode $document, $information) + private function addSpecInformation(\DOMNode $document, $information) { $setSpecAttribute = $this->_xml->createAttribute('Value'); $setSpecAttributeValue = $this->_xml->createTextNode($information); @@ -338,7 +337,7 @@ class RequestController extends Controller private function getDatasetXmlDomNode($dataset) { - if (!in_array($dataset->server_state, $this->_deliveringDocumentStates)) { + if (!in_array($dataset->server_state, $this->deliveringDocumentStates)) { $message = 'Trying to get a document in server state "' . $dataset->server_state . '"'; //Zend_Registry::get('Zend_Log')->err($message); Log::error("server state: $message"); @@ -349,7 +348,7 @@ class RequestController extends Controller $xmlModel = new \App\Library\Xml\XmlModel(); $xmlModel->setModel($dataset); $xmlModel->excludeEmptyFields(); - $xmlModel->setXmlCache(new \App\XmlCache()); + $xmlModel->setXmlCache(new \App\Models\XmlCache()); return $xmlModel->getDomDocument()->getElementsByTagName('Rdr_Dataset')->item(0); } @@ -362,7 +361,7 @@ class RequestController extends Controller $setSpecPattern = self::SET_SPEC_PATTERN; $sets = array(); - $finder = new \App\DatasetFinder(); + $finder = new \App\Models\DatasetFinder(); $finder->setServerState('published'); foreach ($finder->groupedTypesPlusCount() as $doctype => $row) { if (0 == preg_match("/^$setSpecPattern$/", $doctype)) { @@ -383,14 +382,22 @@ class RequestController extends Controller private function handleIdentifyOld() { //$earliestDateFromDb = Opus_Document::getEarliestPublicationDate(); - //$earliestDateFromDb = Dataset::select('server_date_created')->orderBy('server_date_created', 'desc')->first()->toDateTimeString(); + // $earliestDateFromDb = Dataset::select('server_date_created') + // ->orderBy('server_date_created', 'desc') + // ->first()->toDateTimeString(); $earliestDateFromDb = Dataset::earliestPublicationDate(); - $sxe = new \SimpleXMLElement(''); + $sxe = new \SimpleXMLElement( + '' + ); + $sxe->addAttribute('xmlns', 'http://www.openarchives.org/OAI/2.0/'); $sxe->addAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); $sxe->addAttribute('xmlns:mml', 'http://www.w3.org/1998/Math/MathML'); - $sxe->addAttribute('xsi:schemaLocation', 'http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd'); + $sxe->addAttribute( + 'xsi:schemaLocation', + 'http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd' + ); $sxe->addChild('responseDate', date("Y-m-d\TH:i:s\Z")); $uri = explode('?', $_SERVER['REQUEST_URI'], 2); @@ -411,7 +418,7 @@ class RequestController extends Controller //$oaiIdentifier->addAttribute('xmlns', 'http://www.openarchives.org/OAI/2.0/oai-identifier'); //$oaiIdentifier->addAttribute('xsi:schemaLocation', 'http://www.openarchives.org/OAI/2.0/oai-identifier'); //$oaiIdentifier->addChild('scheme', 'oai'); - + return $sxe; } } diff --git a/app/Http/Controllers/Publish/IndexController.php b/app/Http/Controllers/Publish/IndexController.php index 676f1da..3886f56 100644 --- a/app/Http/Controllers/Publish/IndexController.php +++ b/app/Http/Controllers/Publish/IndexController.php @@ -2,12 +2,12 @@ //https://www.5balloons.info/multi-page-step-form-in-laravel-with-validation/ namespace App\Http\Controllers\Publish; -use App\Dataset; +use App\Models\Dataset; use App\Http\Controllers\Controller; -use App\License; +use App\Models\License; use App\Models\File; -use App\Person; -use App\Project; +use App\Models\Person; +use App\Models\Project; use App\Models\Title; use App\Rules\RdrFiletypes; use App\Rules\RdrFilesize; diff --git a/app/Http/Controllers/Settings/Access/UserController.php b/app/Http/Controllers/Settings/Access/UserController.php index 5286599..3fb8e10 100644 --- a/app/Http/Controllers/Settings/Access/UserController.php +++ b/app/Http/Controllers/Settings/Access/UserController.php @@ -3,7 +3,7 @@ namespace App\Http\Controllers\Settings\Access; use App\Http\Controllers\Controller; use App\Models\Role; -use App\User; +use App\Models\User; use Illuminate\Http\Request; class UserController extends Controller diff --git a/app/Http/Controllers/Settings/CategoryController.php b/app/Http/Controllers/Settings/CategoryController.php index 72fd41b..84c20f0 100644 --- a/app/Http/Controllers/Settings/CategoryController.php +++ b/app/Http/Controllers/Settings/CategoryController.php @@ -3,7 +3,7 @@ namespace App\Http\Controllers\Settings; use App\Http\Controllers\Controller; use App\Http\Requests\ProjectRequest; -use App\Project; +use App\Models\Project; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\View\View; diff --git a/app/Http/Controllers/Settings/CollectionController.php b/app/Http/Controllers/Settings/CollectionController.php index 58ba4a8..f842fa0 100644 --- a/app/Http/Controllers/Settings/CollectionController.php +++ b/app/Http/Controllers/Settings/CollectionController.php @@ -4,7 +4,7 @@ namespace App\Http\Controllers\Settings; use Illuminate\Http\Request; use App\Http\Requests; use App\Http\Controllers\Controller; -use App\Collection; +use App\Models\Collection; class CollectionController extends Controller { diff --git a/app/Http/Controllers/Settings/DatasetController.php b/app/Http/Controllers/Settings/DatasetController.php index 48622ba..0361f25 100644 --- a/app/Http/Controllers/Settings/DatasetController.php +++ b/app/Http/Controllers/Settings/DatasetController.php @@ -2,9 +2,9 @@ namespace App\Http\Controllers\Settings; use App\Http\Controllers\Controller; -use App\Dataset; -use App\Project; -use App\License; +use App\Models\Dataset; +use App\Models\Project; +use App\Models\License; use App\Models\Title; use App\Http\Requests\DocumentRequest; use Illuminate\View\View; @@ -33,9 +33,6 @@ class DatasetController extends Controller } else { $state = "published"; } - - - $data = $request->all(); if ($searchType == "simple") { diff --git a/app/Http/Controllers/Settings/LicenseController.php b/app/Http/Controllers/Settings/LicenseController.php index d845081..501a81b 100644 --- a/app/Http/Controllers/Settings/LicenseController.php +++ b/app/Http/Controllers/Settings/LicenseController.php @@ -2,8 +2,8 @@ namespace App\Http\Controllers\Settings; use App\Http\Controllers\Controller; -use App\License; -use App\Language; +use App\Models\License; +use App\Models\Language; use App\Http\Requests\LicenseRequest; use Illuminate\Http\Request; use Illuminate\View\View; diff --git a/app/Http/Controllers/Settings/PersonController.php b/app/Http/Controllers/Settings/PersonController.php index 639e602..cda1dce 100644 --- a/app/Http/Controllers/Settings/PersonController.php +++ b/app/Http/Controllers/Settings/PersonController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers\Settings; use App\Http\Controllers\Controller; -use App\Person; +use App\Models\Person; use App\Http\Requests\PersonRequest; use Illuminate\Http\Request; use Illuminate\View\View; diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index e841445..8343d90 100755 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -56,6 +56,7 @@ class Kernel extends HttpKernel 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, + 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, // 'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class, // 'perm' => \App\Http\Middleware\PermissionMiddleware::class, diff --git a/app/Library/Xml/Conf.php b/app/Library/Xml/Conf.php index 3e873bb..af2241d 100644 --- a/app/Library/Xml/Conf.php +++ b/app/Library/Xml/Conf.php @@ -1,8 +1,7 @@ array( 'model' => Title::class, 'options' => array('type' => 'main'), @@ -25,13 +28,13 @@ trait DatasetExtension 'fetch' => 'eager' ), 'Licence' => array( - 'model' => 'App\License', + 'model' => License::class, 'through' => 'link_documents_licences', 'relation' => 'licenses', 'fetch' => 'eager' ), 'PersonAuthor' => array( - 'model' => 'App\Person', + 'model' => Person::class, 'through' => 'link_documents_persons', 'pivot' => array('role' => 'author'), //'sort_order' => array('sort_order' => 'ASC'), // <-- We need a sorted authors list. @@ -40,7 +43,7 @@ trait DatasetExtension 'fetch' => 'eager' ), 'PersonContributor' => array( - 'model' => 'App\Person', + 'model' => Person::class, 'through' => 'link_documents_persons', 'pivot' => array('role' => 'contributor'), // 'sort_order' => array('sort_order' => 'ASC'), // <-- We need a sorted authors list. @@ -49,15 +52,15 @@ trait DatasetExtension 'fetch' => 'eager' ), 'File' => array( - 'model' => 'App\Models\File', + 'model' => File::class, 'relation' => 'files', 'fetch' => 'eager' ), ); - protected $_internalFields = array(); + protected $internalFields = array(); - protected $_fields = array(); + protected $fields = array(); protected function _initFields() { @@ -90,7 +93,7 @@ trait DatasetExtension $this->addField($field); } - foreach (array_keys($this->_externalFields) as $fieldname) { + foreach (array_keys($this->externalFields) as $fieldname) { $field = new Field($fieldname); $field->setMultiplicity('*'); $this->addField($field); @@ -112,21 +115,21 @@ trait DatasetExtension /** * Get a list of all fields attached to the model. Filters all fieldnames - * that are defined to be inetrnal in $_internalFields. + * that are defined to be inetrnal in $internalFields. * - * @see Opus_Model_Abstract::_internalFields + * @see Opus_Model_Abstract::internalFields * @return array List of fields */ public function describe() { - return array_diff(array_keys($this->_fields), $this->_internalFields); + return array_diff(array_keys($this->fields), $this->internalFields); } public function addField(Field $field) { $fieldname = $field->getName(); - if (isset($fieldname, $this->_externalFields[$fieldname])) { - $options = $this->_externalFields[$fieldname]; + if (isset($fieldname, $this->externalFields[$fieldname])) { + $options = $this->externalFields[$fieldname]; // set ValueModelClass if a through option is given if (isset($options['model'])) { @@ -139,7 +142,7 @@ trait DatasetExtension //} } - $this->_fields[$field->getName()] = $field; + $this->fields[$field->getName()] = $field; $field->setOwningModelClass(get_class($this)); return $this; } @@ -157,8 +160,8 @@ trait DatasetExtension */ protected function _getField($name) { - if (isset($this->_fields[$name])) { - return $this->_fields[$name]; + if (isset($this->fields[$name])) { + return $this->fields[$name]; } else { return null; } @@ -167,11 +170,11 @@ trait DatasetExtension public function fetchValues() { $this->_initFields(); - foreach ($this->_fields as $fieldname => $field) { - if (isset($this->_externalFields[$fieldname]) === true) { + foreach ($this->fields as $fieldname => $field) { + if (isset($this->externalFields[$fieldname]) === true) { $fetchmode = 'lazy'; - if (isset($this->_externalFields[$fieldname]['fetch']) === true) { - $fetchmode = $this->_externalFields[$fieldname]['fetch']; + if (isset($this->externalFields[$fieldname]['fetch']) === true) { + $fetchmode = $this->externalFields[$fieldname]['fetch']; } if ($fetchmode === 'lazy') { @@ -210,7 +213,7 @@ trait DatasetExtension protected function _loadExternal($fieldname) { - $field = $this->_fields[$fieldname]; + $field = $this->fields[$fieldname]; $modelclass = $field->getLinkModelClass(); if (!isset($modelclass)) { @@ -223,8 +226,8 @@ trait DatasetExtension $select = $tableclass->query();//->where("document_id", $this->id);; // If any declared constraints, add them to query - if (isset($this->_externalFields[$fieldname]['options'])) { - $options = $this->_externalFields[$fieldname]['options']; + if (isset($this->externalFields[$fieldname]['options'])) { + $options = $this->externalFields[$fieldname]['options']; foreach ($options as $column => $value) { $select = $select->where($column, $value); } @@ -236,17 +239,17 @@ trait DatasetExtension $datasetId = $this->id; $rows = array(); - if (isset($this->_externalFields[$fieldname]['through'])) { - $relation = $this->_externalFields[$fieldname]['relation']; + if (isset($this->externalFields[$fieldname]['through'])) { + $relation = $this->externalFields[$fieldname]['relation']; //$rows = $select->datasets ////->orderBy('name') //->get(); //$licenses = $select->with('datasets')->get(); //$rows = $supplier->datasets; $rows = $this->{$relation}; - //if (isset($this->_externalFields[$fieldname]['pivot'])) + //if (isset($this->externalFields[$fieldname]['pivot'])) //{ - // $pivArray = $this->_externalFields[$fieldname]['pivot']; + // $pivArray = $this->externalFields[$fieldname]['pivot']; // $rows = $rows->wherePivot('role', $pivArray['role']); //} } else { diff --git a/app/Library/Xml/Strategy.php b/app/Library/Xml/Strategy.php index 5d1078e..e244afd 100644 --- a/app/Library/Xml/Strategy.php +++ b/app/Library/Xml/Strategy.php @@ -1,7 +1,7 @@ _strategy = new Strategy();// Opus_Model_Xml_Version1; - $this->_config = new Conf(); - $this->_strategy->setup($this->_config); + $this->strategy = new Strategy();// Opus_Model_Xml_Version1; + $this->config = new Conf(); + $this->strategy->setup($this->config); } /** @@ -59,8 +59,8 @@ class XmlModel */ public function setStrategy(Strategy $strategy) { - $this->_strategy = $strategy; - $this->_strategy->setup($this->_config); + $this->strategy = $strategy; + $this->strategy->setup($this->config); return $this; } @@ -73,7 +73,7 @@ class XmlModel */ public function setXmlCache(XmlCache $cache) { - $this->_cache = $cache; + $this->cache = $cache; return $this; } @@ -84,19 +84,19 @@ class XmlModel */ public function getXmlCache() { - return $this->_cache; + return $this->cache; } /** * Set the Model for XML generation. * - * @param \App\Dataset $model Model to serialize. + * @param \App\Models\Dataset $model Model to serialize. * * @return XmlModel Fluent interface. */ public function setModel($model) { - $this->_config->model = $model; + $this->config->model = $model; return $this; } @@ -107,7 +107,7 @@ class XmlModel */ public function excludeEmptyFields() { - $this->_config->excludeEmpty = true; + $this->config->excludeEmpty = true; return $this; } @@ -119,7 +119,7 @@ class XmlModel */ public function getDomDocument() { - $dataset = $this->_config->model; + $dataset = $this->config->model; $domDocument = $this->getDomDocumentFromXmlCache(); if (!is_null($domDocument)) { @@ -127,19 +127,19 @@ class XmlModel } //create xml: - $domDocument = $this->_strategy->getDomDocument(); + $domDocument = $this->strategy->getDomDocument(); //if caching is not desired, return domDocument - if (is_null($this->_cache)) { + if (is_null($this->cache)) { return $domDocument; } else { //create cache relation - $this->_cache->fill(array( + $this->cache->fill(array( 'document_id' => $dataset->id, - 'xml_version' => (int)$this->_strategy->getVersion(), + 'xml_version' => (int)$this->strategy->getVersion(), 'server_date_modified' => $dataset->server_date_modified, 'xml_data' => $domDocument->saveXML() )); - $this->_cache->save(); + $this->cache->save(); Log::debug(__METHOD__ . ' cache refreshed for ' . get_class($dataset) . '#' . $dataset->id); return $domDocument; @@ -155,15 +155,15 @@ class XmlModel */ private function getDomDocumentFromXmlCache() { - $dataset = $this->_config->model; - if (null === $this->_cache) { + $dataset = $this->config->model; + if (null === $this->cache) { //$logger->debug(__METHOD__ . ' skipping cache for ' . get_class($model)); Log::debug(__METHOD__ . ' skipping cache for ' . get_class($dataset)); return null; } - //$cached = $this->_cache->hasValidEntry( + //$cached = $this->cache->hasValidEntry( // $dataset->id, - // (int) $this->_strategy->getVersion(), + // (int) $this->strategy->getVersion(), // $dataset->server_date_modified //); diff --git a/app/Models/Collection.php b/app/Models/Collection.php new file mode 100644 index 0000000..60edaec --- /dev/null +++ b/app/Models/Collection.php @@ -0,0 +1,15 @@ +belongsToMany(Dataset::class, 'link_documents_collections', 'collection_id', 'document_id'); + } +} diff --git a/app/Dataset.php b/app/Models/Dataset.php similarity index 79% rename from app/Dataset.php rename to app/Models/Dataset.php index da58f34..42dbb47 100644 --- a/app/Dataset.php +++ b/app/Models/Dataset.php @@ -1,10 +1,15 @@ belongsTo(\App\Project::class, 'project_id', 'id'); + return $this->belongsTo(Project::class, 'project_id', 'id'); } public function collections() { return $this - ->belongsToMany(\App\Collection::class, 'link_documents_collections', 'document_id', 'collection_id'); + ->belongsToMany(Collection::class, 'link_documents_collections', 'document_id', 'collection_id'); } #region [person table] @@ -62,7 +67,7 @@ class Dataset extends Model //return all persons attached to this film public function persons() { - return $this->belongsToMany(\App\Person::class, 'link_documents_persons', 'document_id', 'person_id') + return $this->belongsToMany(Person::class, 'link_documents_persons', 'document_id', 'person_id') ->withPivot('role'); } @@ -74,18 +79,18 @@ class Dataset extends Model public function authors() { return $this - ->belongsToMany(\App\Person::class, 'link_documents_persons', 'document_id', 'person_id') + ->belongsToMany(Person::class, 'link_documents_persons', 'document_id', 'person_id') ->wherePivot('role', 'author'); } /** * Add author to dataset * - * @param \App\User $user user to add + * @param Person $user user to add * * @return void */ - public function addAuthor(\App\User $user): void + public function addAuthor(Person $user): void { $this->persons()->save($user, ['role' => 'author']); } @@ -98,7 +103,7 @@ class Dataset extends Model public function contributors() { return $this - ->belongsToMany(\App\Person::class, 'link_documents_persons', 'document_id', 'person_id') + ->belongsToMany(Person::class, 'link_documents_persons', 'document_id', 'person_id') ->wherePivot('role', 'contributor'); } @@ -143,7 +148,7 @@ class Dataset extends Model public function licenses() { - return $this->belongsToMany(\App\License::class, 'link_documents_licences', 'document_id', 'licence_id'); + return $this->belongsToMany(License::class, 'link_documents_licences', 'document_id', 'licence_id'); } public function files() @@ -154,11 +159,11 @@ class Dataset extends Model /** * Get the xml-cache record associated with the dataset. * - * @return \App\XmlCache + * @return \App\Models\XmlCache */ public function xmlCache() { - return $this->hasOne(\App\XmlCache::class, 'document_id', 'id'); + return $this->hasOne(XmlCache::class, 'document_id', 'id'); } public function scopeOrderByType($query) diff --git a/app/DatasetFinder.php b/app/Models/DatasetFinder.php similarity index 75% rename from app/DatasetFinder.php rename to app/Models/DatasetFinder.php index 9d67c57..ebc24fc 100644 --- a/app/DatasetFinder.php +++ b/app/Models/DatasetFinder.php @@ -1,7 +1,7 @@ _db = $table->getAdapter(); - // $this->_select = $this->_db->select()->from(array('d' => 'documents')); + // $this->select = $this->_db->select()->from(array('d' => 'documents')); - $this->_select = Dataset::query(); //>select('name', 'email as user_email') + $this->select = Dataset::query(); //>select('name', 'email as user_email') } /** @@ -39,8 +39,8 @@ class DatasetFinder */ public function setServerStateInList($serverStateArray) { - $this->_select->whereIn('server_state', $serverStateArray); - //$this->_select->where('server_state IN (?)', $serverStateArray); + $this->select->whereIn('server_state', $serverStateArray); + //$this->select->where('server_state IN (?)', $serverStateArray); return $this; } @@ -52,7 +52,7 @@ class DatasetFinder */ public function setType($type) { - $this->_select->where('type', $type); + $this->select->where('type', $type); return $this; } @@ -64,8 +64,8 @@ class DatasetFinder */ public function setServerState($serverState) { - //$this->_select->where('server_state', '=', $serverState); - $this->_select->where('server_state', 'LIKE', "%".$serverState."%"); + //$this->select->where('server_state', '=', $serverState); + $this->select->where('server_state', 'LIKE', "%".$serverState."%"); return $this; } @@ -76,8 +76,8 @@ class DatasetFinder */ public function groupedTypesPlusCount() { - //$this->_select->reset('columns'); - $test = $this->_select + //$this->select->reset('columns'); + $test = $this->select //->select("type") // "count(DISTINCT id)"); ->selectRaw('type, count(DISTINCT id) as count') ->groupBy('type') @@ -93,7 +93,7 @@ class DatasetFinder */ public function count() { - $this->_select->count(); + $this->select->count(); } /** @@ -107,6 +107,6 @@ class DatasetFinder public function ids() { //return array_unique($this->_db->fetchCol($this->getSelectIds())); - return $this->_select->pluck('id')->toArray(); + return $this->select->pluck('id')->toArray(); } } diff --git a/app/Models/File.php b/app/Models/File.php index 08e4f97..50f6f4b 100644 --- a/app/Models/File.php +++ b/app/Models/File.php @@ -2,7 +2,7 @@ namespace App\Models; -use App\Dataset; +use App\Models\Dataset; use App\Models\HashValue; use Illuminate\Database\Eloquent\Model; diff --git a/app/Language.php b/app/Models/Language.php similarity index 89% rename from app/Language.php rename to app/Models/Language.php index f514fc4..59eebff 100644 --- a/app/Language.php +++ b/app/Models/Language.php @@ -1,5 +1,5 @@ belongsToMany(\App\Dataset::class, 'link_documents_licences', 'licence_id', 'document_id'); + return $this->belongsToMany(Dataset::class, 'link_documents_licences', 'licence_id', 'document_id'); } } diff --git a/app/Models/Page.php b/app/Models/Page.php index 1530581..6869eab 100644 --- a/app/Models/Page.php +++ b/app/Models/Page.php @@ -3,7 +3,7 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; -use App\User; +use App\Models\User; use App\Models\ModelTrait; class Page extends Model @@ -62,7 +62,8 @@ class Page extends Model */ public function getViewButtonAttribute() { - return ' + return ' '; } diff --git a/app/Person.php b/app/Models/Person.php similarity index 66% rename from app/Person.php rename to app/Models/Person.php index 6d318fc..2334805 100644 --- a/app/Person.php +++ b/app/Models/Person.php @@ -1,6 +1,7 @@ belongsToMany(\App\Dataset::class, 'link_documents_persons', 'person_id', 'document_id') - ->withPivot('role'); + return $this->belongsToMany(Dataset::class, 'link_documents_persons', 'person_id', 'document_id') + ->withPivot('role'); } - // public function scopeNotLimit($query) // { // return $query->where('borrow', '<', 3); // } + /** * Get the user's full name. - * + * see https://laravel.com/docs/5.6/eloquent-serialization * @return string */ - public function getFullName() + public function getFullNameAttribute() { return $this->first_name . " " . $this->last_name; } diff --git a/app/Project.php b/app/Models/Project.php similarity index 83% rename from app/Project.php rename to app/Models/Project.php index 13870f6..bfaefa6 100644 --- a/app/Project.php +++ b/app/Models/Project.php @@ -1,7 +1,8 @@ hasMany(\App\Dataset::class, 'project_id', 'id'); + return $this->hasMany(Dataset::class, 'project_id', 'id'); } // public function books() diff --git a/app/Models/Title.php b/app/Models/Title.php index 8c44271..f031637 100644 --- a/app/Models/Title.php +++ b/app/Models/Title.php @@ -4,6 +4,7 @@ namespace App\Models; //use App\Library\Xml\DatasetExtension; use Illuminate\Database\Eloquent\Model; +use App\Models\Dataset; class Title extends Model { @@ -16,6 +17,6 @@ class Title extends Model public function dataset() { - return $this->belongsTo(\App\Dataset::class, 'document_id', 'id'); + return $this->belongsTo(Dataset::class, 'document_id', 'id'); } } diff --git a/app/User.php b/app/Models/User.php old mode 100755 new mode 100644 similarity index 99% rename from app/User.php rename to app/Models/User.php index 59193a7..64a2aef --- a/app/User.php +++ b/app/Models/User.php @@ -1,5 +1,5 @@ belongsTo(\App\Dataset::class, 'document_id', 'id'); + return $this->belongsTo(Dataset::class, 'document_id', 'id'); } /** diff --git a/app/Services/Registrar.php b/app/Services/Registrar.php index df4ac72..42bf1ce 100755 --- a/app/Services/Registrar.php +++ b/app/Services/Registrar.php @@ -1,7 +1,7 @@ [ 'users' => [ 'driver' => 'eloquent', - 'model' => App\User::class, + 'model' => App\Models\User::class, ], // 'users' => [ diff --git a/config/entrust.php b/config/entrust.php index b3f44d7..98b4e15 100644 --- a/config/entrust.php +++ b/config/entrust.php @@ -51,7 +51,7 @@ return [ | Update the User if it is in a different namespace. | */ - 'user' => 'App\User', + 'user' => 'App\Models\User', /* |-------------------------------------------------------------------------- diff --git a/config/services.php b/config/services.php index 40c1507..62ac69e 100755 --- a/config/services.php +++ b/config/services.php @@ -30,7 +30,7 @@ return [ ], 'stripe' => [ - 'model' => 'App\User', + 'model' => 'App\Models\User', 'secret' => '', ], diff --git a/public/js/app.js b/public/js/app.js index c6460ed..6e89ee3 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=55)}([function(e,t,n){"use strict";var r=n(32),i=n(61),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function s(e){return null!==e&&"object"==typeof e}function u(e){return"[object Function]"===o.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){u.headers[e]={}}),r.forEach(["post","put","patch"],function(e){u.headers[e]=r.merge(o)}),e.exports=u}).call(t,n(17))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f1)for(var n=1;n0?r:n)(e)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(9);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports={}},function(e,t,n){var r=n(44),i=n(26);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(25)("keys"),i=n(15);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(11),i=n(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(10)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(5).f,i=n(3),o=n(8)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){t.f=n(8)},function(e,t,n){var r=n(2),i=n(11),o=n(10),a=n(28),s=n(5).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";(function(t){var r=n(1),i=n(124),o=/^\)\]\}',?\n/,a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={adapter:("undefined"!=typeof XMLHttpRequest?u=n(49):void 0!==t&&(u=n(49)),u),transformRequest:[function(e,t){return i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e){e=e.replace(o,"");try{e=JSON.parse(e)}catch(e){}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(e){c.headers[e]={}}),r.forEach(["post","put","patch"],function(e){c.headers[e]=r.merge(a)}),e.exports=c}).call(t,n(17))},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;rdocument.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(3),i=n(7),o=n(100)(!1),a=n(24)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(44),i=n(26).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r0&&t-1 in e)}C.fn=C.prototype={jquery:"3.3.1",constructor:C,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=C.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return C.each(this,e)},map:function(e){return this.pushStack(C.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+R+")"+R+"*"),V=new RegExp("="+R+"*([^\\]'\"]*?)"+R+"*\\]","g"),W=new RegExp(M),z=new RegExp("^"+I+"$"),X={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},J=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+R+"?|("+R+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){d()},ie=ye(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{D.apply(E=N.call(w.childNodes),w.childNodes),E[w.childNodes.length].nodeType}catch(e){D={apply:E.length?function(e,t){j.apply(e,N.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function oe(e,t,r,i){var o,s,c,l,f,h,g,y=t&&t.ownerDocument,_=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==_&&9!==_&&11!==_)return r;if(!i&&((t?t.ownerDocument||t:w)!==p&&d(t),t=t||p,v)){if(11!==_&&(f=Y.exec(e)))if(o=f[1]){if(9===_){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(y&&(c=y.getElementById(o))&&b(t,c)&&c.id===o)return r.push(c),r}else{if(f[2])return D.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return D.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!m||!m.test(e))){if(1!==_)y=t,g=e;else if("object"!==t.nodeName.toLowerCase()){for((l=t.getAttribute("id"))?l=l.replace(te,ne):t.setAttribute("id",l=x),s=(h=a(e)).length;s--;)h[s]="#"+l+" "+ge(h[s]);g=h.join(","),y=Q.test(e)&&ve(t.parentNode)||t}if(g)try{return D.apply(r,y.querySelectorAll(g)),r}catch(e){}finally{l===x&&t.removeAttribute("id")}}}return u(e.replace(H,"$1"),t,r,i)}function ae(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function se(e){return e[x]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ce(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function le(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function de(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,v=!o(p),w!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(p.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},g=[],m=[],(n.qsa=G.test(p.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+R+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+x+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||m.push(".#.+[+~]")}),ue(function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+R+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=G.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",M)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=G.test(h.compareDocumentPosition),b=t||G.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===w&&b(w,e)?-1:t===p||t.ownerDocument===w&&b(w,t)?1:l?P(l,e)-P(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===p?-1:t===p?1:i?-1:o?1:l?P(l,e)-P(l,t):0;if(i===o)return le(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?le(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},p):p},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&d(e),t=t.replace(V,"='$1']"),n.matchesSelector&&v&&!S[t+" "]&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,p,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==p&&d(e),b(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==p&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&O.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):void 0;return void 0!==o?o:n.attributes||!v?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(A),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return l=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=k[e+" "];return t||(t=new RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&k(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(q," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,d,p,h,v=o!==a?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),y=!u&&!s,b=!1;if(m){if(o){for(;v;){for(d=t;d=d[v];)if(s?d.nodeName.toLowerCase()===g:1===d.nodeType)return!1;h=v="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(b=(p=(c=(l=(f=(d=m)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===_&&c[1])&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[v]||(b=p=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){l[e]=[_,p,b];break}}else if(y&&(b=p=(c=(l=(f=(d=t)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===_&&c[1]),!1===b)for(;(d=++p&&d&&d[v]||(b=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==g:1!==d.nodeType)||!++b||(y&&((l=(f=d[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[_,b]),d!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[x]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=P(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(H,"$1"));return r[x]?se(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return z.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xe(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,c=null!=t;s-1&&(o[c]=!(a[c]=f))}}else g=xe(g===a?g.splice(h,g.length):g),i?i(null,a,g,u):D.apply(a,g)})}function _e(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,l=ye(function(e){return e===t},s,!0),f=ye(function(e){return P(t,e)>-1},s,!0),d=[function(e,n,r){var i=!a&&(r||n!==c)||((t=n).nodeType?l(e,n,r):f(e,n,r));return t=null,i}];u1&&be(d),u>1&&ge(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(H,"$1"),n,u0,i=e.length>0,o=function(o,a,s,u,l){var f,h,m,g=0,y="0",b=o&&[],x=[],w=c,C=o||i&&r.find.TAG("*",l),k=_+=null==w?1:Math.random()||.1,T=C.length;for(l&&(c=a===p||a||l);y!==T&&null!=(f=C[y]);y++){if(i&&f){for(h=0,a||f.ownerDocument===p||(d(f),s=!v);m=e[h++];)if(m(f,a||p,s)){u.push(f);break}l&&(_=k)}n&&((f=!m&&f)&&g--,o&&b.push(f))}if(g+=y,n&&y!==g){for(h=0;m=t[h++];)m(b,x,a,s);if(o){if(g>0)for(;y--;)b[y]||x[y]||(x[y]=$.call(u));x=xe(x)}D.apply(u,x),l&&!o&&x.length>0&&g+t.length>1&&oe.uniqueSort(u)}return l&&(_=k,c=w),b};return n?se(o):o}(o,i))).selector=e}return s},u=oe.select=function(e,t,n,i){var o,u,c,l,f,d="function"==typeof e&&e,p=!i&&a(e=d.selector||e);if(n=n||[],1===p.length){if((u=p[0]=p[0].slice(0)).length>2&&"ID"===(c=u[0]).type&&9===t.nodeType&&v&&r.relative[u[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(Z,ee),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(u.shift().value.length)}for(o=X.needsContext.test(e)?0:u.length;o--&&(c=u[o],!r.relative[l=c.type]);)if((f=r.find[l])&&(i=f(c.matches[0].replace(Z,ee),Q.test(u[0].type)&&ve(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ge(u)))return D.apply(n,i),n;break}}return(d||s(e,p))(i,t,!v,n,!t||Q.test(e)&&ve(t.parentNode)||t),n},n.sortStable=x.split("").sort(A).join("")===x,n.detectDuplicates=!!f,d(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),ue(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ce("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ce("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||ce(L,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(n);C.find=S,C.expr=S.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=S.uniqueSort,C.text=S.getText,C.isXMLDoc=S.isXML,C.contains=S.contains,C.escapeSelector=S.escape;var A=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&C(e).is(n))break;r.push(e)}return r},O=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},E=C.expr.match.needsContext;function $(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var j=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,t,n){return y(t)?C.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?C.grep(e,function(e){return e===t!==n}):"string"!=typeof t?C.grep(e,function(e){return f.call(t,e)>-1!==n}):C.filter(t,e,n)}C.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?C.find.matchesSelector(r,e)?[r]:[]:C.find.matches(e,C.grep(t,function(e){return 1===e.nodeType}))},C.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(C(e).filter(function(){for(t=0;t1?C.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&E.test(e)?C(e):e||[],!1).length}});var N,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||N,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:P.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof C?t[0]:t,C.merge(this,C.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:a,!0)),j.test(r[1])&&C.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(C):C.makeArray(e,this)}).prototype=C.fn,N=C(a);var L=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}C.fn.extend({has:function(e){var t=C(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&C.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?C.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?f.call(C(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),C.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return A(e,"parentNode")},parentsUntil:function(e,t,n){return A(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return A(e,"nextSibling")},prevAll:function(e){return A(e,"previousSibling")},nextUntil:function(e,t,n){return A(e,"nextSibling",n)},prevUntil:function(e,t,n){return A(e,"previousSibling",n)},siblings:function(e){return O((e.parentNode||{}).firstChild,e)},children:function(e){return O(e.firstChild)},contents:function(e){return $(e,"iframe")?e.contentDocument:($(e,"template")&&(e=e.content||e),C.merge([],e.childNodes))}},function(e,t){C.fn[e]=function(n,r){var i=C.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=C.filter(r,i)),this.length>1&&(R[e]||C.uniqueSort(i),L.test(e)&&i.reverse()),this.pushStack(i)}});var F=/[^\x20\t\r\n\f]+/g;function M(e){return e}function q(e){throw e}function H(e,t,n,r){var i;try{e&&y(i=e.promise)?i.call(e).done(t).fail(n):e&&y(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}C.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return C.each(e.match(F)||[],function(e,n){t[n]=!0}),t}(e):C.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1)for(n=a.shift();++s-1;)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?C.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},C.extend({Deferred:function(e){var t=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return C.Deferred(function(n){C.each(t,function(t,r){var i=y(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var s=this,u=arguments,c=function(){var n,c;if(!(e=o&&(r!==q&&(s=void 0,u=[n]),t.rejectWith(s,u))}};e?l():(C.Deferred.getStackHook&&(l.stackTrace=C.Deferred.getStackHook()),n.setTimeout(l))}}return C.Deferred(function(n){t[0][3].add(a(0,n,y(i)?i:M,n.notifyWith)),t[1][3].add(a(0,n,y(e)?e:M)),t[2][3].add(a(0,n,y(r)?r:q))}).promise()},promise:function(e){return null!=e?C.extend(e,i):i}},o={};return C.each(t,function(e,n){var a=n[2],s=n[5];i[n[1]]=a.add,s&&a.add(function(){r=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=u.call(arguments),o=C.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?u.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(H(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],a(n),o.reject);return o.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&B.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},C.readyException=function(e){n.setTimeout(function(){throw e})};var U=C.Deferred();function V(){a.removeEventListener("DOMContentLoaded",V),n.removeEventListener("load",V),C.ready()}C.fn.ready=function(e){return U.then(e).catch(function(e){C.readyException(e)}),this},C.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==e&&--C.readyWait>0||U.resolveWith(a,[C]))}}),C.ready.then=U.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(C.ready):(a.addEventListener("DOMContentLoaded",V),n.addEventListener("load",V));var W=function(e,t,n,r,i,o,a){var s=0,u=e.length,c=null==n;if("object"===_(n))for(s in i=!0,n)W(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(C(e),n)})),t))for(;s1,null,!0)},removeData:function(e){return this.each(function(){Z.remove(this,e)})}}),C.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,C.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=C.queue(e,t),r=n.length,i=n.shift(),o=C._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){C.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:C.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),C.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ve={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&$(e,t)?C.merge([e],n):n}function ge(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(c=C.contains(o.ownerDocument,o),a=me(f.appendChild(o),"script"),c&&ge(a),n)for(l=0;o=a[l++];)he.test(o.type||"")&&n.push(o);return f}ye=a.createDocumentFragment().appendChild(a.createElement("div")),(be=a.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),ye.appendChild(be),g.checkClone=ye.cloneNode(!0).cloneNode(!0).lastChild.checked,ye.innerHTML="",g.noCloneChecked=!!ye.cloneNode(!0).lastChild.defaultValue;var _e=a.documentElement,Ce=/^key/,ke=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function Ae(){return!1}function Oe(){try{return a.activeElement}catch(e){}}function Ee(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ae;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return C().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=C.guid++)),e.each(function(){C.event.add(this,t,i,r,n)})}C.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,c,l,f,d,p,h,v,m=Q.get(e);if(m)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&C.find.matchesSelector(_e,i),n.guid||(n.guid=C.guid++),(u=m.events)||(u=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==C&&C.event.triggered!==t.type?C.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(F)||[""]).length;c--;)p=v=(s=Te.exec(t[c])||[])[1],h=(s[2]||"").split(".").sort(),p&&(f=C.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=C.event.special[p]||{},l=C.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&C.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||((d=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),C.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,c,l,f,d,p,h,v,m=Q.hasData(e)&&Q.get(e);if(m&&(u=m.events)){for(c=(t=(t||"").match(F)||[""]).length;c--;)if(p=v=(s=Te.exec(t[c])||[])[1],h=(s[2]||"").split(".").sort(),p){for(f=C.event.special[p]||{},d=u[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)l=d[o],!i&&v!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,m.handle)||C.removeEvent(e,p,m.handle),delete u[p])}else for(p in u)C.event.remove(e,p+t[c],n,r,!0);C.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=C.event.fix(e),u=new Array(arguments.length),c=(Q.get(this,"events")||{})[s.type]||[],l=C.event.special[s.type]||{};for(u[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},n=0;n-1:C.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u\x20\t\r\n\f]*)[^>]*)\/>/gi,je=/\s*$/g;function Pe(e,t){return $(e,"table")&&$(11!==t.nodeType?t:t.firstChild,"tr")&&C(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ie(e,t){var n,r,i,o,a,s,u,c;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),c=o.events))for(i in delete a.handle,a.events={},c)for(n=0,r=c[i].length;n1&&"string"==typeof h&&!g.checkClone&&De.test(h))return e.each(function(i){var o=e.eq(i);v&&(t[0]=h.call(this,i,o.html())),Fe(o,t,n,r)});if(d&&(o=(i=we(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(a=C.map(me(i,"script"),Le)).length;f")},clone:function(e,t,n){var r,i,o,a,s,u,c,l=e.cloneNode(!0),f=C.contains(e.ownerDocument,e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||C.isXMLDoc(e)))for(a=me(l),r=0,i=(o=me(e)).length;r0&&ge(a,!f&&me(e,"script")),l},cleanData:function(e){for(var t,n,r,i=C.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?C.event.remove(n,r):C.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),C.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return W(this,function(e){return void 0===e?C.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Fe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pe(this,e).appendChild(e)})},prepend:function(){return Fe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Pe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Fe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(C.cleanData(me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return C.clone(this,e,t)})},html:function(e){return W(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!je.test(e)&&!ve[(pe.exec(e)||["",""])[1].toLowerCase()]){e=C.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=He(e),i=Ue(e,t,r),o="border-box"===C.css(e,"boxSizing",!1,r),a=o;if(qe.test(i)){if(!n)return i;i="auto"}return a=a&&(g.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===C.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}C.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ue(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=K(t),u=ze.test(t),c=e.style;if(u||(t=Ye(s)),a=C.cssHooks[t]||C.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:c[t];"string"===(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(C.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,s=K(t);return ze.test(t)||(t=Ye(s)),(a=C.cssHooks[t]||C.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ue(e,t,r)),"normal"===i&&t in Je&&(i=Je[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),C.each(["height","width"],function(e,t){C.cssHooks[t]={get:function(e,n,r){if(n)return!We.test(C.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Xe,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=He(e),a="border-box"===C.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&g.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=C.css(e,t)),Qe(0,n,s)}}}),C.cssHooks.marginLeft=Ve(g.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ue(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),C.each({margin:"",padding:"",border:"Width"},function(e,t){C.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(C.cssHooks[e+t].set=Qe)}),C.fn.extend({css:function(e,t){return W(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=He(e),i=t.length;a1)}}),C.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||C.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(C.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=C.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=C.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){C.fx.step[e.prop]?C.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[C.cssProps[e.prop]]&&!C.cssHooks[e.prop]?e.elem[e.prop]=e.now:C.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},C.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},C.fx=tt.prototype.init,C.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(at):n.setTimeout(at,C.fx.interval),C.fx.tick())}function st(){return n.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(lt.tweeners[t]||[]).concat(lt.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){C.removeAttr(this,e)})}}),C.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?C.prop(e,t,n):(1===o&&C.isXMLDoc(e)||(i=C.attrHooks[t.toLowerCase()]||(C.expr.match.bool.test(t)?ft:void 0)),void 0!==n?null===n?void C.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=C.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&$(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(F);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),ft={set:function(e,t,n){return!1===t?C.removeAttr(e,n):e.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),function(e,t){var n=dt[t]||C.find.attr;dt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=dt[a],dt[a]=i,i=null!=n(e,t,r)?a:null,dt[a]=o),i}});var pt=/^(?:input|select|textarea|button)$/i,ht=/^(?:a|area)$/i;function vt(e){return(e.match(F)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function gt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(F)||[]}C.fn.extend({prop:function(e,t){return W(this,C.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[C.propFix[e]||e]})}}),C.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(e)||(t=C.propFix[t]||t,i=C.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=C.find.attr(e,"tabindex");return t?parseInt(t,10):pt.test(e.nodeName)||ht.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(C.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){C.propFix[this.toLowerCase()]=this}),C.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(y(e))return this.each(function(t){C(this).addClass(e.call(this,t,mt(this)))});if((t=gt(e)).length)for(;n=this[u++];)if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(y(e))return this.each(function(t){C(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=gt(e)).length)for(;n=this[u++];)if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):y(e)?this.each(function(n){C(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r)for(i=0,o=C(this),a=gt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=mt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var yt=/\r/g;C.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=y(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,C(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=C.map(i,function(e){return null==e?"":e+""})),(t=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=C.valHooks[i.type]||C.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(yt,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(e){var t=C.find.attr(e,"value");return null!=t?t:vt(C.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),C.each(["radio","checkbox"],function(){C.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=C.inArray(C(e).val(),t)>-1}},g.checkOn||(C.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),g.focusin="onfocusin"in n;var bt=/^(?:focusinfocus|focusoutblur)$/,xt=function(e){e.stopPropagation()};C.extend(C.event,{trigger:function(e,t,r,i){var o,s,u,c,l,f,d,p,v=[r||a],m=h.call(e,"type")?e.type:e,g=h.call(e,"namespace")?e.namespace.split("."):[];if(s=p=u=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!bt.test(m+C.event.triggered)&&(m.indexOf(".")>-1&&(m=(g=m.split(".")).shift(),g.sort()),l=m.indexOf(":")<0&&"on"+m,(e=e[C.expando]?e:new C.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:C.makeArray(t,[e]),d=C.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(r,t))){if(!i&&!d.noBubble&&!b(r)){for(c=d.delegateType||m,bt.test(c+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(r.ownerDocument||a)&&v.push(u.defaultView||u.parentWindow||n)}for(o=0;(s=v[o++])&&!e.isPropagationStopped();)p=s,e.type=o>1?c:d.bindType||m,(f=(Q.get(s,"events")||{})[e.type]&&Q.get(s,"handle"))&&f.apply(s,t),(f=l&&s[l])&&f.apply&&G(s)&&(e.result=f.apply(s,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),t)||!G(r)||l&&y(r[m])&&!b(r)&&((u=r[l])&&(r[l]=null),C.event.triggered=m,e.isPropagationStopped()&&p.addEventListener(m,xt),r[m](),e.isPropagationStopped()&&p.removeEventListener(m,xt),C.event.triggered=void 0,u&&(r[l]=u)),e.result}},simulate:function(e,t,n){var r=C.extend(new C.Event,n,{type:e,isSimulated:!0});C.event.trigger(r,null,t)}}),C.fn.extend({trigger:function(e,t){return this.each(function(){C.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return C.event.trigger(e,t,n,!0)}}),g.focusin||C.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){C.event.simulate(t,e.target,C.event.fix(e))};C.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=Q.access(r,t);i||r.addEventListener(e,n,!0),Q.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Q.access(r,t)-1;i?Q.access(r,t,i):(r.removeEventListener(e,n,!0),Q.remove(r,t))}}});var wt=n.location,_t=Date.now(),Ct=/\?/;C.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||C.error("Invalid XML: "+e),t};var kt=/\[\]$/,Tt=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function Ot(e,t,n,r){var i;if(Array.isArray(t))C.each(t,function(t,i){n||kt.test(e)?r(e,i):Ot(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==_(t))r(e,t);else for(i in t)Ot(e+"["+i+"]",t[i],n,r)}C.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!C.isPlainObject(e))C.each(e,function(){i(this.name,this.value)});else for(n in e)Ot(n,e[n],t,i);return r.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=C.prop(this,"elements");return e?C.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!C(this).is(":disabled")&&At.test(this.nodeName)&&!St.test(e)&&(this.checked||!de.test(e))}).map(function(e,t){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}}):{name:t.name,value:n.replace(Tt,"\r\n")}}).get()}});var Et=/%20/g,$t=/#.*$/,jt=/([?&])_=[^&]*/,Dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Nt=/^(?:GET|HEAD)$/,Pt=/^\/\//,Lt={},Rt={},It="*/".concat("*"),Ft=a.createElement("a");function Mt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(F)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qt(e,t,n,r){var i={},o=e===Rt;function a(s){var u;return i[s]=!0,C.each(e[s]||[],function(e,s){var c=s(t,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(t.dataTypes.unshift(c),a(c),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Ht(e,t){var n,r,i=C.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&C.extend(!0,e,r),e}Ft.href=wt.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ht(Ht(e,C.ajaxSettings),t):Ht(C.ajaxSettings,e)},ajaxPrefilter:Mt(Lt),ajaxTransport:Mt(Rt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,u,c,l,f,d,p,h=C.ajaxSetup({},t),v=h.context||h,m=h.context&&(v.nodeType||v.jquery)?C(v):C.event,g=C.Deferred(),y=C.Callbacks("once memory"),b=h.statusCode||{},x={},w={},_="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(l){if(!s)for(s={};t=Dt.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==l&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)k.always(e[k.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||_;return r&&r.abort(t),T(0,t),this}};if(g.promise(k),h.url=((e||h.url||wt.href)+"").replace(Pt,wt.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(F)||[""],null==h.crossDomain){c=a.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=Ft.protocol+"//"+Ft.host!=c.protocol+"//"+c.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=C.param(h.data,h.traditional)),qt(Lt,h,t,k),l)return k;for(d in(f=C.event&&h.global)&&0==C.active++&&C.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Nt.test(h.type),i=h.url.replace($t,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Et,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(Ct.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(jt,"$1"),p=(Ct.test(i)?"&":"?")+"_="+_t+++p),h.url=i+p),h.ifModified&&(C.lastModified[i]&&k.setRequestHeader("If-Modified-Since",C.lastModified[i]),C.etag[i]&&k.setRequestHeader("If-None-Match",C.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&k.setRequestHeader("Content-Type",h.contentType),k.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+It+"; q=0.01":""):h.accepts["*"]),h.headers)k.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(v,k,h)||l))return k.abort();if(_="abort",y.add(h.complete),k.done(h.success),k.fail(h.error),r=qt(Rt,h,t,k)){if(k.readyState=1,f&&m.trigger("ajaxSend",[k,h]),l)return k;h.async&&h.timeout>0&&(u=n.setTimeout(function(){k.abort("timeout")},h.timeout));try{l=!1,r.send(x,T)}catch(e){if(l)throw e;T(-1,e)}}else T(-1,"No Transport");function T(e,t,a,s){var c,d,p,x,w,_=t;l||(l=!0,u&&n.clearTimeout(u),r=void 0,o=s||"",k.readyState=e>0?4:0,c=e>=200&&e<300||304===e,a&&(x=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,k,a)),x=function(e,t,n,r){var i,o,a,s,u,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(h,x,k,c),c?(h.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(C.lastModified[i]=w),(w=k.getResponseHeader("etag"))&&(C.etag[i]=w)),204===e||"HEAD"===h.type?_="nocontent":304===e?_="notmodified":(_=x.state,d=x.data,c=!(p=x.error))):(p=_,!e&&_||(_="error",e<0&&(e=0))),k.status=e,k.statusText=(t||_)+"",c?g.resolveWith(v,[d,_,k]):g.rejectWith(v,[k,_,p]),k.statusCode(b),b=void 0,f&&m.trigger(c?"ajaxSuccess":"ajaxError",[k,h,c?d:p]),y.fireWith(v,[k,_]),f&&(m.trigger("ajaxComplete",[k,h]),--C.active||C.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return C.get(e,t,n,"json")},getScript:function(e,t){return C.get(e,void 0,t,"script")}}),C.each(["get","post"],function(e,t){C[t]=function(e,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),C.ajax(C.extend({url:e,type:t,dataType:i,data:n,success:r},C.isPlainObject(e)&&e))}}),C._evalUrl=function(e){return C.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},C.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=C(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return y(e)?this.each(function(t){C(this).wrapInner(e.call(this,t))}):this.each(function(){var t=C(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=y(e);return this.each(function(n){C(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){C(this).replaceWith(this.childNodes)}),this}}),C.expr.pseudos.hidden=function(e){return!C.expr.pseudos.visible(e)},C.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Bt={0:200,1223:204},Ut=C.ajaxSettings.xhr();g.cors=!!Ut&&"withCredentials"in Ut,g.ajax=Ut=!!Ut,C.ajaxTransport(function(e){var t,r;if(g.cors||Ut&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Bt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),C.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return C.globalEval(e),e}}}),C.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),C.ajaxTransport("script",function(e){var t,n;if(e.crossDomain)return{send:function(r,i){t=C(" \ No newline at end of file diff --git a/resources/lang/en/doctypes.php b/resources/lang/en/doctypes.php index 2dde9d4..ab472db 100644 --- a/resources/lang/en/doctypes.php +++ b/resources/lang/en/doctypes.php @@ -4,7 +4,7 @@ return [ /* |-------------------------------------------------------------------------- - | Pagination Language Lines + | Doctypes Language Lines |-------------------------------------------------------------------------- | | The following language lines are used by the paginator library to build diff --git a/resources/views/settings/person/edit.blade.php b/resources/views/settings/person/edit.blade.php index e9dd652..885b807 100644 --- a/resources/views/settings/person/edit.blade.php +++ b/resources/views/settings/person/edit.blade.php @@ -3,7 +3,7 @@ @section('content')

- Edit {{ $person->getFullName() }} + Edit {{ $person->full_name }}

diff --git a/routes/api.php b/routes/api.php index 55f7341..b478d7b 100644 --- a/routes/api.php +++ b/routes/api.php @@ -2,6 +2,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; +use App\Models\Person; /* |-------------------------------------------------------------------------- @@ -18,4 +19,45 @@ Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); }); -Route::get('/oai', 'Oai\RequestController@identify'); \ No newline at end of file +Route::get('/oai', 'Oai\RequestController@identify'); + +Route::get('/api/persons', function () { + $request = request(); + $query = Person::query();//->with('group'); + // handle sort option + //if (request()->has('sort')) { + if (null !== ($request->input('sort'))) { + // handle multisort + $sorts = explode(',', request()->sort); + foreach ($sorts as $sort) { + list($sortCol, $sortDir) = explode('|', $sort); + $query = $query->orderBy($sortCol, $sortDir); + } + } else { + $query = $query->orderBy('id', 'asc'); + } + if ($request->exists('filter')) { + $query->where(function ($q) use ($request) { + $value = "%{$request->filter}%"; + $q->where('name', 'like', $value) + // ->orWhere('nickname', 'like', $value) + ->orWhere('email', 'like', $value); + }); + } + $perPage = request()->has('per_page') ? (int) request()->per_page : null; + // $pagination = $query->with('address')->paginate($perPage); + $pagination = $query->paginate($perPage); + $pagination->appends([ + 'sort' => request()->sort, + 'filter' => request()->filter, + 'per_page' => request()->per_page + ]); + // The headers 'Access-Control-Allow-Origin' and 'Access-Control-Allow-Methods' + // are to allow you to call this from any domain (see CORS for more info). + // This is for local testing only. You should not do this in production server, + // unless you know what it means. + return response() + ->json($pagination) + ->header('Access-Control-Allow-Origin', '*') + ->header('Access-Control-Allow-Methods', 'GET'); +}); diff --git a/routes/web.php b/routes/web.php index ca7ffb5..543ecc0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,6 +16,7 @@ use Illuminate\Support\Facades\Route; Route::get('/oai', ['as' => 'oai', 'uses' => 'Oai\RequestController@index']); +//=================================================publish dataasets================================================ Route::group( [ 'namespace' => 'Publish', @@ -197,6 +198,9 @@ Route::group(['middleware' => ['permission:settings']], function () { */ Route::group(['namespace' => 'Frontend', 'as' => 'frontend.'], function () { // includeRouteFiles(__DIR__.'/Frontend/'); + Route::get('/test', [ + 'as' => 'home.index', 'uses' => 'HomeController@test', + ]); Route::get('/', [ 'as' => 'home.index', 'uses' => 'HomeController@index', ]); @@ -217,7 +221,7 @@ Route::group(['namespace' => 'Frontend', 'as' => 'frontend.'], function () { Route::get('sitelinks', [ 'as' => 'sitelinks.index', 'uses' => 'SitelinkController@index', ]); - Route::get('sitelinks/list/{year}', 'SitelinkController@list')->name('sitelinks.list'); + Route::get('sitelinks/list/{year}', 'SitelinkController@listDocs')->name('sitelinks.list'); Route::get('/dataset', [ 'as' => 'datasets', 'uses' => 'PagesController@datasets',