static function getObjectStructure()
 {
     global $user;
     //Load Libraries for lookup values
     $location = new Location();
     $location->orderBy('displayName');
     if ($user->hasRole('libraryAdmin')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $location->libraryId = $homeLibrary->libraryId;
     }
     $location->find();
     $locationList = array();
     while ($location->fetch()) {
         $locationList[$location->locationId] = $location->displayName;
     }
     require_once ROOT_DIR . '/sys/Browse/BrowseCategory.php';
     $browseCategories = new BrowseCategory();
     $browseCategories->orderBy('label');
     $browseCategories->find();
     $browseCategoryList = array();
     while ($browseCategories->fetch()) {
         $browseCategoryList[$browseCategories->textId] = $browseCategories->label . " ({$browseCategories->textId})";
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'label', 'label' => 'Id', 'description' => 'The unique id of the hours within the database'), 'locationId' => array('property' => 'locationId', 'type' => 'enum', 'values' => $locationList, 'label' => 'Location', 'description' => 'A link to the location which the browse category belongs to'), 'browseCategoryTextId' => array('property' => 'browseCategoryTextId', 'type' => 'enum', 'values' => $browseCategoryList, 'label' => 'Browse Category', 'description' => 'The browse category to display '), 'weight' => array('property' => 'weight', 'type' => 'numeric', 'label' => 'Weight', 'weight' => 'Defines how lists are sorted within the widget.  Lower weights are displayed to the left of the screen.', 'required' => true));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
 public function __construct(Reservation $reservation)
 {
     $this->reservation = $reservation;
     View::share('locations', Location::orderBy('name', 'asc')->get());
     View::share('types', Type::orderBy('name', 'asc')->get());
     View::share('news', Post::where('post_type', 'news')->orderBy('created_at', 'desc')->limit(4)->get());
 }
 public function __construct()
 {
     View::share('page_title', 'Client');
     View::share('locations', Location::orderBy('name', 'asc')->get());
     View::share('types', Type::orderBy('name', 'asc')->get());
     View::share('news', Post::where('post_type', 'news')->orderBy('created_at', 'desc')->limit(4)->get());
     if (Sentry::check()) {
         View::share('user', Sentry::getUser());
         $this->user = Sentry::getUser();
     }
 }
 /**
  * Store a newly created resource in storage.
  * POST /location
  *
  * @return Response
  */
 public function store()
 {
     $location = new Location();
     $location->address = Input::get('address');
     $location->city = Input::get('city');
     $location->state = Input::get('state');
     $location->zip = Input::get('zip');
     $location->save();
     $locations = Location::orderBy('created_at', 'desc')->paginate(6);
     return Redirect::action('LocationController@index');
 }
 public static function dropdown($novalue = null)
 {
     $locations = Location::orderBy('name')->get();
     $array = array();
     if ($novalue) {
         $array = array('' => 'Any');
     }
     foreach ($locations as $l) {
         $key = $l->id;
         $array[$key] = ucwords($l->name);
     }
     return $array;
 }
 public function run()
 {
     // Uncomment the below to wipe the table clean before populating
     DB::table('events')->truncate();
     $faker = Faker\Factory::create();
     $dt = Carbon::now();
     $dateNow = $dt->toDateTimeString();
     for ($i = 0; $i < 1; $i++) {
         $startDate = $dt->addYear(2)->toDateTimeString();
         $endDate = $dt->addYear(3)->toDateTimeString();
         $category = App::make('\\Acme\\Category\\CategoryRepository')->getEventCategories()->orderBY(DB::raw('RAND()'))->first()->id;
         $user = User::orderBy(DB::raw('RAND()'))->first()->id;
         $location = Location::orderBy(DB::raw('RAND()'))->first()->id;
         $events = array(['category_id' => $category, 'user_id' => $user, 'location_id' => $location, 'title_en' => 'Kaizen Events', 'title_ar' => 'كايزن ', 'description_en' => $faker->sentence(20), 'description_ar' => $faker->sentence(20), 'slug' => $faker->sentence(10), 'date_start' => $startDate, 'date_end' => $endDate, 'phone' => '0096597978805', 'email' => $faker->email, 'address_en' => $faker->address, 'address_ar' => $faker->address, 'street_en' => $faker->streetAddress, 'street_ar' => $faker->streetAddress, 'latitude' => $faker->latitude, 'longitude' => $faker->longitude, 'featured' => (bool) rand(0, 1), 'free' => '0', 'created_at' => $dateNow, 'updated_at' => $dateNow, 'button_en' => 'Subscribe', 'button_ar' => 'سجل']);
         DB::table('events')->insert($events);
     }
     //		 Uncomment the below to run the seeder
 }
Beispiel #7
0
 function getAllObjects()
 {
     //Look lookup information for display in the user interface
     global $user;
     $location = new Location();
     $location->orderBy('displayName');
     if (!$user->hasRole('opacAdmin')) {
         //Scope to just locations for the user based on home library
         $patronLibrary = Library::getLibraryForLocation($user->homeLocationId);
         $location->libraryId = $patronLibrary->libraryId;
     }
     $location->find();
     $locationList = array();
     while ($location->fetch()) {
         $locationList[$location->locationId] = clone $location;
     }
     return $locationList;
 }
Beispiel #8
0
 function getObjectStructure()
 {
     global $user;
     //Load Libraries for lookup values
     $library = new Library();
     $library->orderBy('displayName');
     if ($user->hasRole('libraryAdmin')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $library->libraryId = $homeLibrary->libraryId;
     }
     $library->find();
     $libraryList = array();
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     //Look lookup information for display in the user interface
     $location = new Location();
     $location->orderBy('displayName');
     $location->find();
     $locationList = array();
     $locationLookupList = array();
     $locationLookupList[-1] = '<No Nearby Location>';
     while ($location->fetch()) {
         $locationLookupList[$location->locationId] = $location->displayName;
         $locationList[$location->locationId] = clone $location;
     }
     // get the structure for the location's hours
     $hoursStructure = LocationHours::getObjectStructure();
     // we don't want to make the locationId property editable
     // because it is associated with this location only
     unset($hoursStructure['locationId']);
     $facetSettingStructure = LocationFacetSetting::getObjectStructure();
     unset($facetSettingStructure['weight']);
     unset($facetSettingStructure['locationId']);
     unset($facetSettingStructure['numEntriesToShowByDefault']);
     unset($facetSettingStructure['showAsDropDown']);
     //unset($facetSettingStructure['sortMode']);
     $structure = array(array('property' => 'code', 'type' => 'text', 'label' => 'Code', 'description' => 'The code for use when communicating with Millennium'), array('property' => 'displayName', 'type' => 'text', 'label' => 'Display Name', 'description' => 'The full name of the location for display to the user', 'size' => '40'), array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'A link to the library which the location belongs to'), array('property' => 'extraLocationCodesToInclude', 'type' => 'text', 'label' => 'Extra Locations To Include', 'description' => 'A list of other location codes to include in this location for indexing special collections, juvenile collections, etc.', 'size' => '40', 'hideInLists' => true), array('property' => 'nearbyLocation1', 'type' => 'enum', 'values' => $locationLookupList, 'label' => 'Nearby Location 1', 'description' => 'A secondary location which is nearby and could be used for pickup of materials.', 'hideInLists' => true), array('property' => 'nearbyLocation2', 'type' => 'enum', 'values' => $locationLookupList, 'label' => 'Nearby Location 2', 'description' => 'A tertiary location which is nearby and could be used for pickup of materials.', 'hideInLists' => true), array('property' => 'automaticTimeoutLength', 'type' => 'integer', 'label' => 'Automatic Timeout Length (logged in)', 'description' => 'The length of time before the user is automatically logged out in seconds.', 'size' => '8', 'hideInLists' => true), array('property' => 'automaticTimeoutLengthLoggedOut', 'type' => 'integer', 'label' => 'Automatic Timeout Length (logged out)', 'description' => 'The length of time before the catalog resets to the home page set to 0 to disable.', 'size' => '8', 'hideInLists' => true), array('property' => 'displaySection', 'type' => 'section', 'label' => 'Basic Display', 'hideInLists' => true, 'properties' => array(array('property' => 'homeLink', 'type' => 'text', 'label' => 'Home Link', 'description' => 'The location to send the user when they click on the home button or logo.  Use default or blank to go back to the vufind home location.', 'hideInLists' => true, 'size' => '40'), array('property' => 'homePageWidgetId', 'type' => 'integer', 'label' => 'Home Page Widget Id', 'description' => 'An id for the list widget to display on the home page', 'hideInLists' => true), array('property' => 'footerTemplate', 'type' => 'text', 'label' => 'Footer Template', 'description' => 'The name of the footer file to display in the regular interface when scoped to a single school.  Use default to display the default footer', 'hideInLists' => true, 'default' => 'default'))), array('property' => 'ilsSection', 'type' => 'section', 'label' => 'ILS/Account Integration', 'hideInLists' => true, 'properties' => array(array('property' => 'holdingBranchLabel', 'type' => 'text', 'label' => 'Holding Branch Label', 'description' => 'The label used within the holdings table in Millennium'), array('property' => 'scope', 'type' => 'text', 'label' => 'Scope', 'description' => 'The scope for the system in Millennium to refine holdings to the branch.  If there is no scope defined for the branch, this can be set to 0.'), array('property' => 'useScope', 'type' => 'checkbox', 'label' => 'Use Scope?', 'description' => 'Whether or not the scope should be used when displaying holdings.', 'hideInLists' => true), array('property' => 'defaultPType', 'type' => 'text', 'label' => 'Default P-Type', 'description' => 'The P-Type to use when accessing a subdomain if the patron is not logged in.  Use -1 to use the library default PType.'), array('property' => 'validHoldPickupBranch', 'type' => 'checkbox', 'label' => 'Valid Hold Pickup Branch?', 'description' => 'Determines if the location can be used as a pickup location if it is not the patrons home location or the location they are in.', 'hideInLists' => true), array('property' => 'showHoldButton', 'type' => 'checkbox', 'label' => 'Show Hold Button', 'description' => 'Whether or not the hold button is displayed so patrons can place holds on items', 'hideInLists' => true), array('property' => 'ptypesToAllowRenewals', 'type' => 'text', 'label' => 'PTypes that can renew', 'description' => 'A list of P-Types that can renew items or * to allow all P-Types to renew items.', 'hideInLists' => true), array('property' => 'suppressHoldings', 'type' => 'checkbox', 'label' => 'Suppress Holdings', 'description' => 'Whether or not all items for the title should be suppressed', 'hideInLists' => true))), array('property' => 'searchingSection', 'type' => 'section', 'label' => 'Searching', 'hideInLists' => true, 'properties' => array(array('property' => 'facetLabel', 'type' => 'text', 'label' => 'Facet Label', 'description' => 'The label of the facet that identifies this location.', 'hideInLists' => true, 'size' => '40'), array('property' => 'restrictSearchByLocation', 'type' => 'checkbox', 'label' => 'Restrict Search By Location', 'description' => 'Whether or not search results should only include titles from this location', 'hideInLists' => true), array('property' => 'includeDigitalCollection', 'type' => 'checkbox', 'label' => 'Include Digital Collection', 'description' => 'Whether or not titles from the digital collection should be included in searches', 'hideInLists' => true), array('property' => 'boostByLocation', 'type' => 'checkbox', 'label' => 'Boost By Location', 'description' => 'Whether or not boosting of titles owned by this location should be applied', 'hideInLists' => true), array('property' => 'recordsToBlackList', 'type' => 'textarea', 'label' => 'Records to deaccession', 'description' => 'A list of records to deaccession (hide) in search results.  Enter one record per line.', 'hideInLists' => true), array('property' => 'repeatSearchOption', 'type' => 'enum', 'values' => array('none' => 'None', 'librarySystem' => 'Library System', 'marmot' => 'Marmot'), 'label' => 'Repeat Search Options', 'description' => 'Where to allow repeating search. Valid options are: none, librarySystem, marmot, all'), array('property' => 'repeatInProspector', 'type' => 'checkbox', 'label' => 'Repeat In Prospector', 'description' => 'Turn on to allow repeat search in Prospector functionality.', 'hideInLists' => true), array('property' => 'repeatInWorldCat', 'type' => 'checkbox', 'label' => 'Repeat In WorldCat', 'description' => 'Turn on to allow repeat search in WorldCat functionality.', 'hideInLists' => true), array('property' => 'repeatInOverdrive', 'type' => 'checkbox', 'label' => 'Repeat In Overdrive', 'description' => 'Turn on to allow repeat search in Overdrive functionality.', 'hideInLists' => true), array('property' => 'systemsToRepeatIn', 'type' => 'text', 'label' => 'Systems To Repeat In', 'description' => 'A list of library codes that you would like to repeat search in separated by pipes |.', 'hideInLists' => true))), array('property' => 'enrichmentSection', 'type' => 'section', 'label' => 'Catalog Enrichment', 'hideInLists' => true, 'properties' => array(array('property' => 'showAmazonReviews', 'type' => 'checkbox', 'label' => 'Show Amazon Reviews', 'description' => 'Whether or not reviews from Amazon are displayed on the full record page.', 'hideInLists' => true), array('property' => 'showStandardReviews', 'type' => 'checkbox', 'label' => 'Show Standard Reviews', 'description' => 'Whether or not reviews from Content Cafe/Syndetics are displayed on the full record page.', 'hideInLists' => true))), array('property' => 'hours', 'type' => 'oneToMany', 'keyThis' => 'locationId', 'keyOther' => 'locationId', 'subObjectType' => 'LocationHours', 'structure' => $hoursStructure, 'label' => 'Hours', 'description' => 'Library Hours', 'sortable' => false, 'storeDb' => true), 'facets' => array('property' => 'facets', 'type' => 'oneToMany', 'label' => 'Facets', 'description' => 'A list of facets to display in search results', 'keyThis' => 'locationId', 'keyOther' => 'locationId', 'subObjectType' => 'LocationFacetSetting', 'structure' => $facetSettingStructure, 'sortable' => true, 'storeDb' => true, 'allowEdit' => true, 'canEdit' => true));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
 /**
  * Store a newly created resource in storage.
  * POST /location
  *
  * @return Response
  */
 public function store()
 {
     $event = new CalendarEvent();
     $event->start = Input::get('start');
     $event->end = Input::get('end');
     $event->title = Input::get('title');
     $event->description = Input::get('description');
     if (Input::hasFile('img')) {
         $event->img = Input::file('img')->move("images/uploaded/");
     }
     if (Input::has('price')) {
         $event->price = Input::get('price');
     }
     $event->user_id = Auth::id();
     $event->location_id = Input::get('locationID');
     $event->save();
     Log::info('Log Message', Input::all());
     $locations = Location::orderBy('created_at', 'desc')->paginate(6);
     return Redirect::action('LocationController@index');
 }
Beispiel #10
0
 function getObjectStructure()
 {
     //Look lookup information for display in the user interface
     $location = new Location();
     $location->orderBy('displayName');
     $location->find();
     $locationList = array();
     $locationLookupList = array();
     $locationLookupList[-1] = '<No Nearby Location>';
     while ($location->fetch()) {
         $locationLookupList[$location->locationId] = $location->displayName;
         $locationList[$location->locationId] = clone $location;
     }
     $structure = array('ip' => array('property' => 'ip', 'type' => 'text', 'label' => 'IP Address', 'description' => 'The IP Address to map to a location formatted as xxx.xxx.xxx.xxx/mask'), 'location' => array('property' => 'location', 'type' => 'text', 'label' => 'Display Name', 'description' => 'Descriptive information for the IP Address for internal use'), 'locationid' => array('property' => 'locationid', 'type' => 'enum', 'values' => $locationLookupList, 'label' => 'Location', 'description' => 'The Location which this IP address maps to'));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
 static function getObjectStructure()
 {
     global $user;
     $location = new Location();
     $location->orderBy('displayName');
     if ($user->hasRole('libraryAdmin')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $location->libraryId = $homeLibrary->libraryId;
     }
     $location->find();
     while ($location->fetch()) {
         $locationList[$location->locationId] = $location->displayName;
     }
     $structure = parent::getObjectStructure();
     $structure['locationId'] = array('property' => 'locationId', 'type' => 'enum', 'values' => $locationList, 'label' => 'Location', 'description' => 'The id of a location');
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
 static function getObjectStructure()
 {
     $location = new Location();
     $location->orderBy('displayName');
     $location->find();
     $locationList = array();
     while ($location->fetch()) {
         $locationList[$location->locationId] = $location->displayName;
     }
     $days = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
     $time = array('01:00', '01:30', '02:00', '02:30', '03:00', '03:30', '04:00', '04:30', '05:00', '05:30', '06:00', '06:30', '07:00', '07:30', '08:00', '08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30', '18:00', '18:30', '19:00', '19:30', '20:00', '20:30', '21:00', '21:30', '22:00', '22:30', '23:00', '23:30');
     $timeList = array();
     foreach ($time as $t) {
         $timeList[$t] = $t;
     }
     $structure = array('id' => array('property' => 'id', 'type' => 'label', 'label' => 'Id', 'description' => 'The unique id of the hours within the database'), 'locationId' => array('property' => 'locationId', 'type' => 'enum', 'values' => $locationList, 'label' => 'Location', 'description' => 'The library location.'), 'day' => array('property' => 'day', 'type' => 'enum', 'values' => $days, 'label' => 'Day of Week', 'description' => 'The day of the week 0 to 6 (0 = Sunday to 6 = Saturday)'), 'closed' => array('property' => 'closed', 'type' => 'checkbox', 'label' => 'Closed', 'description' => 'Check to indicate that the library is closed on this day.'), 'open' => array('property' => 'open', 'type' => 'enum', 'values' => $timeList, 'label' => 'Opening Hour', 'description' => 'The opening hour. Use 24 hour format HH:MM, eg: 08:30'), 'close' => array('property' => 'close', 'type' => 'enum', 'values' => $timeList, 'label' => 'Closing Hour', 'description' => 'The closing hour. Use 24 hour format HH:MM, eg: 16:30'));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return View::make('locations.index')->with('title', 'Locations')->with('locations', Location::orderBy('id', 'desc')->paginate(10));
 }
Beispiel #14
0
 function getHoursAndLocations()
 {
     //Get a list of locations for the current library
     global $library;
     $tmpLocation = new Location();
     $tmpLocation->libraryId = $library->libraryId;
     $tmpLocation->showInLocationsAndHoursList = 1;
     $tmpLocation->orderBy('displayName');
     $libraryLocations = array();
     $tmpLocation->find();
     if ($tmpLocation->N == 0) {
         //Get all locations
         $tmpLocation = new Location();
         $tmpLocation->showInLocationsAndHoursList = 1;
         $tmpLocation->orderBy('displayName');
         $tmpLocation->find();
     }
     while ($tmpLocation->fetch()) {
         $mapAddress = urlencode(preg_replace('/\\r\\n|\\r|\\n/', '+', $tmpLocation->address));
         $clonedLocation = clone $tmpLocation;
         $hours = $clonedLocation->getHours();
         foreach ($hours as $key => $hourObj) {
             if (!$hourObj->closed) {
                 $hourString = $hourObj->open;
                 list($hour, $minutes) = explode(':', $hourString);
                 if ($hour < 12) {
                     $hourObj->open .= ' AM';
                 } elseif ($hour == 12) {
                     $hourObj->open = 'Noon';
                 } elseif ($hour == 24) {
                     $hourObj->open = 'Midnight';
                 } else {
                     $hour -= 12;
                     $hourObj->open = "{$hour}:{$minutes} PM";
                 }
                 $hourString = $hourObj->close;
                 list($hour, $minutes) = explode(':', $hourString);
                 if ($hour < 12) {
                     $hourObj->close .= ' AM';
                 } elseif ($hour == 12) {
                     $hourObj->close = 'Noon';
                 } elseif ($hour == 24) {
                     $hourObj->close = 'Midnight';
                 } else {
                     $hour -= 12;
                     $hourObj->close = "{$hour}:{$minutes} PM";
                 }
             }
             $hours[$key] = $hourObj;
         }
         $libraryLocations[] = array('id' => $tmpLocation->locationId, 'name' => $tmpLocation->displayName, 'address' => preg_replace('/\\r\\n|\\r|\\n/', '<br/>', $tmpLocation->address), 'phone' => $tmpLocation->phone, 'map_image' => "http://maps.googleapis.com/maps/api/staticmap?center={$mapAddress}&zoom=15&size=200x200&sensor=false&markers=color:red%7C{$mapAddress}", 'map_link' => "http://maps.google.com/maps?f=q&hl=en&geocode=&q={$mapAddress}&ie=UTF8&z=15&iwloc=addr&om=1&t=m", 'hours' => $hours);
     }
     global $interface;
     $interface->assign('libraryLocations', $libraryLocations);
     return $interface->fetch('AJAX/libraryHoursAndLocations.tpl');
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $location_lists = Location::orderBy('name')->lists('name', 'id');
     return View::make('hotel.create')->with('location_lists', $location_lists);
 }
 public function __construct()
 {
     View::share('locations', Location::orderBy('created_at')->get());
     View::share('news', Post::where('post_type', 'news')->orderBy('created_at', 'desc')->limit(4)->get());
 }
Beispiel #17
0
function locationsList()
{
    $location_list = array('' => Lang::get('general.select_location')) + Location::orderBy('name', 'asc')->lists('name', 'id');
    return $location_list;
}
Beispiel #18
0
 function getObjectStructure()
 {
     global $user;
     //Load Libraries for lookup values
     $library = new Library();
     $library->orderBy('displayName');
     if ($user->hasRole('libraryAdmin') && !$user->hasRole('opacAdmin')) {
         $homeLibrary = Library::getPatronHomeLibrary();
         $library->libraryId = $homeLibrary->libraryId;
     }
     $library->find();
     $libraryList = array();
     while ($library->fetch()) {
         $libraryList[$library->libraryId] = $library->displayName;
     }
     //Look lookup information for display in the user interface
     $location = new Location();
     $location->orderBy('displayName');
     $location->find();
     $locationList = array();
     $locationLookupList = array();
     $locationLookupList[-1] = '<No Nearby Location>';
     while ($location->fetch()) {
         $locationLookupList[$location->locationId] = $location->displayName;
         $locationList[$location->locationId] = clone $location;
     }
     // get the structure for the location's hours
     $hoursStructure = LocationHours::getObjectStructure();
     // we don't want to make the locationId property editable
     // because it is associated with this location only
     unset($hoursStructure['locationId']);
     $facetSettingStructure = LocationFacetSetting::getObjectStructure();
     unset($facetSettingStructure['weight']);
     unset($facetSettingStructure['locationId']);
     unset($facetSettingStructure['numEntriesToShowByDefault']);
     unset($facetSettingStructure['showAsDropDown']);
     //unset($facetSettingStructure['sortMode']);
     $locationBrowseCategoryStructure = LocationBrowseCategory::getObjectStructure();
     unset($locationBrowseCategoryStructure['weight']);
     unset($locationBrowseCategoryStructure['locationId']);
     $locationMoreDetailsStructure = LocationMoreDetails::getObjectStructure();
     unset($locationMoreDetailsStructure['weight']);
     unset($locationMoreDetailsStructure['locationId']);
     $structure = array(array('property' => 'code', 'type' => 'text', 'label' => 'Code', 'description' => 'The code for use when communicating with Millennium'), array('property' => 'displayName', 'type' => 'text', 'label' => 'Display Name', 'description' => 'The full name of the location for display to the user', 'size' => '40'), array('property' => 'showDisplayNameInHeader', 'type' => 'checkbox', 'label' => 'Show Display Name in Header', 'description' => 'Whether or not the display name should be shown in the header next to the logo', 'hideInLists' => true, 'default' => false), array('property' => 'libraryId', 'type' => 'enum', 'values' => $libraryList, 'label' => 'Library', 'description' => 'A link to the library which the location belongs to'), array('property' => 'showInLocationsAndHoursList', 'type' => 'checkbox', 'label' => 'Show In Locations And Hours List', 'description' => 'Whether or not this location should be shown in the list of library hours and locations', 'hideInLists' => true, 'default' => true), array('property' => 'address', 'type' => 'textarea', 'label' => 'Address', 'description' => 'The address of the branch.', 'hideInLists' => true), array('property' => 'phone', 'type' => 'text', 'label' => 'Phone Number', 'description' => 'The main phone number for the site .', 'size' => '40', 'hideInLists' => true), array('property' => 'extraLocationCodesToInclude', 'type' => 'text', 'label' => 'Extra Locations To Include', 'description' => 'A list of other location codes to include in this location for indexing special collections, juvenile collections, etc.', 'size' => '40', 'hideInLists' => true), array('property' => 'nearbyLocation1', 'type' => 'enum', 'values' => $locationLookupList, 'label' => 'Nearby Location 1', 'description' => 'A secondary location which is nearby and could be used for pickup of materials.', 'hideInLists' => true), array('property' => 'nearbyLocation2', 'type' => 'enum', 'values' => $locationLookupList, 'label' => 'Nearby Location 2', 'description' => 'A tertiary location which is nearby and could be used for pickup of materials.', 'hideInLists' => true), array('property' => 'automaticTimeoutLength', 'type' => 'integer', 'label' => 'Automatic Timeout Length (logged in)', 'description' => 'The length of time before the user is automatically logged out in seconds.', 'size' => '8', 'hideInLists' => true, 'default' => 90), array('property' => 'automaticTimeoutLengthLoggedOut', 'type' => 'integer', 'label' => 'Automatic Timeout Length (logged out)', 'description' => 'The length of time before the catalog resets to the home page set to 0 to disable.', 'size' => '8', 'hideInLists' => true, 'default' => 450), array('property' => 'displaySection', 'type' => 'section', 'label' => 'Basic Display', 'hideInLists' => true, 'properties' => array(array('property' => 'homeLink', 'type' => 'text', 'label' => 'Home Link', 'description' => 'The location to send the user when they click on the home button or logo.  Use default or blank to go back to the vufind home location.', 'hideInLists' => true, 'size' => '40'), array('property' => 'additionalCss', 'type' => 'textarea', 'label' => 'Additional CSS', 'description' => 'Extra CSS to apply to the site.  Will apply to all pages.', 'hideInLists' => true), 'defaultBrowseMode' => array('property' => 'defaultBrowseMode', 'type' => 'enum', 'label' => 'Default Viewing Mode for Browse Categories', 'description' => 'Sets how browse categories will be displayed when users haven\'t chosen themselves.', 'hideInLists' => true, 'values' => array('' => null, 'covers' => 'Show Covers Only', 'grid' => 'Show as Grid')))), array('property' => 'ilsSection', 'type' => 'section', 'label' => 'ILS/Account Integration', 'hideInLists' => true, 'properties' => array(array('property' => 'holdingBranchLabel', 'type' => 'text', 'label' => 'Holding Branch Label', 'description' => 'The label used within the holdings table in Millennium'), array('property' => 'scope', 'type' => 'text', 'label' => 'Scope', 'description' => 'The scope for the system in Millennium to refine holdings to the branch.  If there is no scope defined for the branch, this can be set to 0.'), array('property' => 'useScope', 'type' => 'checkbox', 'label' => 'Use Scope?', 'description' => 'Whether or not the scope should be used when displaying holdings.', 'hideInLists' => true), array('property' => 'defaultPType', 'type' => 'text', 'label' => 'Default P-Type', 'description' => 'The P-Type to use when accessing a subdomain if the patron is not logged in.  Use -1 to use the library default PType.', 'default' => -1), array('property' => 'validHoldPickupBranch', 'type' => 'checkbox', 'label' => 'Valid Hold Pickup Branch?', 'description' => 'Determines if the location can be used as a pickup location if it is not the patrons home location or the location they are in.', 'hideInLists' => true, 'default' => true), array('property' => 'showHoldButton', 'type' => 'checkbox', 'label' => 'Show Hold Button', 'description' => 'Whether or not the hold button is displayed so patrons can place holds on items', 'hideInLists' => true, 'default' => true), array('property' => 'ptypesToAllowRenewals', 'type' => 'text', 'label' => 'PTypes that can renew', 'description' => 'A list of P-Types that can renew items or * to allow all P-Types to renew items.', 'hideInLists' => true), array('property' => 'suppressHoldings', 'type' => 'checkbox', 'label' => 'Suppress Holdings', 'description' => 'Whether or not all items for the title should be suppressed', 'hideInLists' => true, 'default' => false))), array('property' => 'searchingSection', 'type' => 'section', 'label' => 'Searching', 'hideInLists' => true, 'properties' => array(array('property' => 'facetLabel', 'type' => 'text', 'label' => 'Facet Label', 'description' => 'The label of the facet that identifies this location.', 'hideInLists' => true, 'size' => '40'), array('property' => 'restrictSearchByLocation', 'type' => 'checkbox', 'label' => 'Restrict Search By Location', 'description' => 'Whether or not search results should only include titles from this location', 'hideInLists' => true, 'default' => false), array('property' => 'econtentLocationsToInclude', 'type' => 'text', 'label' => 'eContent Locations To Include', 'description' => 'A list of eContent Locations to include within the scope.', 'size' => '40', 'hideInLists' => true), array('property' => 'boostByLocation', 'type' => 'checkbox', 'label' => 'Boost By Location', 'description' => 'Whether or not boosting of titles owned by this location should be applied', 'hideInLists' => true, 'default' => true), array('property' => 'additionalLocalBoostFactor', 'type' => 'integer', 'label' => 'Additional Local Boost Factor', 'description' => 'An additional numeric boost to apply to any locally owned and locally available titles', 'hideInLists' => true, 'default' => 1), array('property' => 'recordsToBlackList', 'type' => 'textarea', 'label' => 'Records to deaccession', 'description' => 'A list of records to deaccession (hide) in search results.  Enter one record per line.', 'hideInLists' => true), array('property' => 'availabilityToggleLabelSuperScope', 'type' => 'text', 'label' => 'SuperScope Toggle Label', 'description' => 'The label to show when viewing super scope i.e. Consortium Name / Entire Collection / Everything.  Does not show if superscope is not enabled.', 'default' => 'Entire Collection'), array('property' => 'availabilityToggleLabelLocal', 'type' => 'text', 'label' => 'Local Collection Toggle Label', 'description' => 'The label to show when viewing the local collection i.e. Library Name / Local Collection.  Leave blank to hide the button.', 'default' => '{display name}'), array('property' => 'availabilityToggleLabelAvailable', 'type' => 'text', 'label' => 'Available Toggle Label', 'description' => 'The label to show when viewing available items i.e. Available Now / Available Locally / Available Here.', 'default' => 'Available Now'), array('property' => 'repeatSearchOption', 'type' => 'enum', 'values' => array('none' => 'None', 'librarySystem' => 'Library System', 'marmot' => 'Entire Consortium'), 'label' => 'Repeat Search Options', 'description' => 'Where to allow repeating search. Valid options are: none, librarySystem, marmot, all', 'default' => 'marmot'), array('property' => 'repeatInOnlineCollection', 'type' => 'checkbox', 'label' => 'Repeat In Online Collection', 'description' => 'Turn on to allow repeat search in the Online Collection.', 'hideInLists' => true, 'default' => false), array('property' => 'repeatInProspector', 'type' => 'checkbox', 'label' => 'Repeat In Prospector', 'description' => 'Turn on to allow repeat search in Prospector functionality.', 'hideInLists' => true, 'default' => false), array('property' => 'repeatInWorldCat', 'type' => 'checkbox', 'label' => 'Repeat In WorldCat', 'description' => 'Turn on to allow repeat search in WorldCat functionality.', 'hideInLists' => true, 'default' => false), array('property' => 'repeatInOverdrive', 'type' => 'checkbox', 'label' => 'Repeat In Overdrive', 'description' => 'Turn on to allow repeat search in Overdrive functionality.', 'hideInLists' => true, 'default' => false), array('property' => 'systemsToRepeatIn', 'type' => 'text', 'label' => 'Systems To Repeat In', 'description' => 'A list of library codes that you would like to repeat search in separated by pipes |.', 'hideInLists' => true))), array('property' => 'enrichmentSection', 'type' => 'section', 'label' => 'Catalog Enrichment', 'hideInLists' => true, 'properties' => array(array('property' => 'showStandardReviews', 'type' => 'checkbox', 'label' => 'Show Standard Reviews', 'description' => 'Whether or not reviews from Content Cafe/Syndetics are displayed on the full record page.', 'hideInLists' => true, 'default' => true), array('property' => 'showGoodReadsReviews', 'type' => 'checkbox', 'label' => 'Show GoodReads Reviews', 'description' => 'Whether or not reviews from GoodReads are displayed on the full record page.', 'hideInLists' => true, 'default' => true), 'showFavorites' => array('property' => 'showFavorites', 'type' => 'checkbox', 'label' => 'Show Favorites', 'description' => 'Whether or not users can maintain favorites lists', 'hideInLists' => true, 'default' => 1))), array('property' => 'fullRecordSection', 'type' => 'section', 'label' => 'Full Record Display', 'hideInLists' => true, 'properties' => array('showTextThis' => array('property' => 'showTextThis', 'type' => 'checkbox', 'label' => 'Show Text This', 'description' => 'Whether or not the Text This link is shown', 'hideInLists' => true, 'default' => 1), 'showEmailThis' => array('property' => 'showEmailThis', 'type' => 'checkbox', 'label' => 'Show Email This', 'description' => 'Whether or not the Email This link is shown', 'hideInLists' => true, 'default' => 1), 'showShareOnExternalSites' => array('property' => 'showShareOnExternalSites', 'type' => 'checkbox', 'label' => 'Show Sharing To External Sites', 'description' => 'Whether or not sharing on external sites (Twitter, Facebook, Pinterest, etc. is shown)', 'hideInLists' => true, 'default' => 1), 'showComments' => array('property' => 'showComments', 'type' => 'checkbox', 'label' => 'Show Comments', 'description' => 'Whether or not user comments are shown (also disables adding comments)', 'hideInLists' => true, 'default' => 1), 'showQRCode' => array('property' => 'showQRCode', 'type' => 'checkbox', 'label' => 'Show QR Code', 'description' => 'Whether or not the catalog should show a QR Code in full record view', 'hideInLists' => true, 'default' => 1), array('property' => 'showStaffView', 'type' => 'checkbox', 'label' => 'Show Staff View', 'description' => 'Whether or not the staff view is displayed in full record view.', 'hideInLists' => true, 'default' => true), 'moreDetailsOptions' => array('property' => 'moreDetailsOptions', 'type' => 'oneToMany', 'label' => 'Full Record Options', 'description' => 'Record Options for the display of full record', 'keyThis' => 'locationId', 'keyOther' => 'locationId', 'subObjectType' => 'LocationMoreDetails', 'structure' => $locationMoreDetailsStructure, 'sortable' => true, 'storeDb' => true, 'allowEdit' => true, 'canEdit' => true))), array('property' => 'overdriveSection', 'type' => 'section', 'label' => 'OverDrive', 'hideInLists' => true, 'properties' => array('enableOverdriveCollection' => array('property' => 'enableOverdriveCollection', 'type' => 'checkbox', 'label' => 'Enable Overdrive Collection', 'description' => 'Whether or not titles from the Overdrive collection should be included in searches', 'hideInLists' => true, 'default' => true))), array('property' => 'hours', 'type' => 'oneToMany', 'keyThis' => 'locationId', 'keyOther' => 'locationId', 'subObjectType' => 'LocationHours', 'structure' => $hoursStructure, 'label' => 'Hours', 'description' => 'Library Hours', 'sortable' => false, 'storeDb' => true), 'facets' => array('property' => 'facets', 'type' => 'oneToMany', 'label' => 'Facets', 'description' => 'A list of facets to display in search results', 'keyThis' => 'locationId', 'keyOther' => 'locationId', 'subObjectType' => 'LocationFacetSetting', 'structure' => $facetSettingStructure, 'sortable' => true, 'storeDb' => true, 'allowEdit' => true, 'canEdit' => true), 'browseCategories' => array('property' => 'browseCategories', 'type' => 'oneToMany', 'label' => 'Browse Categories', 'description' => 'Browse Categories To Show on the Home Screen', 'keyThis' => 'locationId', 'keyOther' => 'locationId', 'subObjectType' => 'LocationBrowseCategory', 'structure' => $locationBrowseCategoryStructure, 'sortable' => true, 'storeDb' => true, 'allowEdit' => false, 'canEdit' => false));
     foreach ($structure as $fieldName => $field) {
         $field['propertyOld'] = $field['property'] . 'Old';
         $structure[$fieldName] = $field;
     }
     return $structure;
 }