diff --git a/README.md b/README.md new file mode 100644 index 0000000..e6d314f --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +https://github.com/pulipulichen/ocs +http://getbootstrap.com/components/ \ No newline at end of file diff --git a/classes/manager/form/TimelineForm.inc.php b/classes/manager/form/TimelineForm.inc.php index 9ebfee9..5f22bb9 100644 --- a/classes/manager/form/TimelineForm.inc.php +++ b/classes/manager/form/TimelineForm.inc.php @@ -176,17 +176,29 @@ function initData() { 'postPapers' => $schedConf->getSetting('postPapers'), 'postPapersDate' => $schedConf->getSetting('postPapersDate'), 'postTimeline' => $schedConf->getSetting('postTimeline'), + 'postTimelineOrder' => $schedConf->getSetting('postTimelineOrder'), 'postOverview' => $schedConf->getSetting('postOverview'), + 'postOverviewOrder' => $schedConf->getSetting('postOverviewOrder'), 'postCFP' => $schedConf->getSetting('postCFP'), + 'postCFPOrder' => $schedConf->getSetting('postCFPOrder'), 'postProposalSubmission' => $schedConf->getSetting('postProposalSubmission'), + 'postProposalSubmissionOrder' => $schedConf->getSetting('postProposalSubmissionOrder'), 'postTrackPolicies' => $schedConf->getSetting('postTrackPolicies'), + 'postTrackPoliciesOrder' => $schedConf->getSetting('postTrackPoliciesOrder'), 'postProgram' => $schedConf->getSetting('postProgram'), + 'postProgramOrder' => $schedConf->getSetting('postProgramOrder'), 'postContact' => $schedConf->getSetting('postContact'), + 'postContactOrder' => $schedConf->getSetting('postContactOrder'), 'postPresentations' => $schedConf->getSetting('postPresentations'), + 'postPresentationsOrder' => $schedConf->getSetting('postPresentationsOrder'), 'postAccommodation' => $schedConf->getSetting('postAccommodation'), + 'postAccommodationOrder' => $schedConf->getSetting('postAccommodationOrder'), 'postLocation' => $schedConf->getSetting('postLocation'), + 'postLocationOrder' => $schedConf->getSetting('postLocationOrder'), 'postSupporters' => $schedConf->getSetting('postSupporters'), + 'postSupportersOrder' => $schedConf->getSetting('postSupportersOrder'), 'postPayment' => $schedConf->getSetting('postPayment'), + 'postPaymentOrder' => $schedConf->getSetting('postPaymentOrder'), 'delayOpenAccess' => $schedConf->getSetting('delayOpenAccess'), 'delayOpenAccessDate' => $schedConf->getSetting('delayOpenAccessDate'), 'closeComments' => $schedConf->getSetting('closeComments'), @@ -270,17 +282,29 @@ function readInputData() { 'delayOpenAccess', 'closeComments', 'postTimeline', + 'postTimelineOrder', 'postOverview', + 'postOverviewOrder', 'postCFP', + 'postCFPOrder', 'postProposalSubmission', + 'postProposalSubmissionOrder', 'postTrackPolicies', + 'postTrackPoliciesOrder', 'postProgram', + 'postProgramOrder', 'postContact', + 'postContactOrder', 'postPresentations', + 'postPresentationsOrder', 'postAccommodation', + 'postAccommodationOrder', 'postLocation', + 'postLocationOrder', 'postSupporters', - 'postPayment' + 'postSupportersOrder', + 'postPayment', + 'postPaymentOrder' )); } @@ -312,17 +336,29 @@ function execute() { // Conference Information display flags $schedConf->updateSetting('postTimeline', $this->getData('postTimeline'), 'bool'); + $schedConf->updateSetting('postTimelineOrder', $this->getData('postTimelineOrder'), 'int'); $schedConf->updateSetting('postOverview', $this->getData('postOverview'), 'bool'); + $schedConf->updateSetting('postOverviewOrder', $this->getData('postOverviewOrder'), 'int'); $schedConf->updateSetting('postCFP', $this->getData('postCFP'), 'bool'); + $schedConf->updateSetting('postCFPOrder', $this->getData('postCFPOrder'), 'int'); $schedConf->updateSetting('postProposalSubmission', $this->getData('postProposalSubmission'), 'bool'); + $schedConf->updateSetting('postProposalSubmissionOrder', $this->getData('postProposalSubmissionOrder'), 'int'); $schedConf->updateSetting('postTrackPolicies', $this->getData('postTrackPolicies'), 'bool'); + $schedConf->updateSetting('postTrackPoliciesOrder', $this->getData('postTrackPoliciesOrder'), 'int'); $schedConf->updateSetting('postProgram', $this->getData('postProgram'), 'bool'); + $schedConf->updateSetting('postProgramOrder', $this->getData('postProgramOrder'), 'int'); $schedConf->updateSetting('postContact', $this->getData('postContact'), 'bool'); + $schedConf->updateSetting('postContactOrder', $this->getData('postContactOrder'), 'int'); $schedConf->updateSetting('postPresentations', $this->getData('postPresentations'), 'bool'); + $schedConf->updateSetting('postPresentationsOrder', $this->getData('postPresentationsOrder'), 'int'); $schedConf->updateSetting('postAccommodation', $this->getData('postAccommodation'), 'bool'); + $schedConf->updateSetting('postAccommodationOrder', $this->getData('postAccommodationOrder'), 'int'); $schedConf->updateSetting('postLocation', $this->getData('postLocation'), 'bool'); + $schedConf->updateSetting('postLocationOrder', $this->getData('postLocationOrder'), 'int'); $schedConf->updateSetting('postSupporters', $this->getData('postSupporters'), 'bool'); + $schedConf->updateSetting('postSupportersOrder', $this->getData('postSupportersOrder'), 'int'); $schedConf->updateSetting('postPayment', $this->getData('postPayment'), 'bool'); + $schedConf->updateSetting('postPaymentOrder', $this->getData('postPaymentOrder'), 'int'); // diff --git a/classes/template/TemplateManager.inc.php b/classes/template/TemplateManager.inc.php index 25d7e17..eaec2b7 100644 --- a/classes/template/TemplateManager.inc.php +++ b/classes/template/TemplateManager.inc.php @@ -22,291 +22,359 @@ import('template.PKPTemplateManager'); class TemplateManager extends PKPTemplateManager { - /** - * Constructor. - * Initialize template engine and assign basic template variables. - */ - function TemplateManager() { - parent::PKPTemplateManager(); - - if (!defined('SESSION_DISABLE_INIT')) { - /** - * Kludge to make sure no code that tries to connect to - * the database is executed (e.g., when loading - * installer pages). - */ - - $conference =& Request::getConference(); - $schedConf =& Request::getSchedConf(); - $site =& Request::getSite(); - if (isset($schedConf)) { - $this->assign('schedConfAcronym', $schedConf->getLocalizedSetting('acronym')); + /** + * Constructor. + * Initialize template engine and assign basic template variables. + */ + function TemplateManager() { + parent::PKPTemplateManager(); + + if (!defined('SESSION_DISABLE_INIT')) { + /** + * Kludge to make sure no code that tries to connect to + * the database is executed (e.g., when loading + * installer pages). + */ + + $conference =& Request::getConference(); + $schedConf =& Request::getSchedConf(); + $site =& Request::getSite(); + if (isset($schedConf)) { + $this->assign('schedConfAcronym', $schedConf->getLocalizedSetting('acronym')); + } + + $this->assign('siteTitle', $site->getLocalizedTitle()); + + $siteFilesDir = Request::getBaseUrl() . '/' . PublicFileManager::getSiteFilesPath(); + $this->assign('sitePublicFilesDir', $siteFilesDir); + + $this->assign('homeContext', array('conference' => 'index', 'schedConf' => 'index')); + + $siteStyleFilename = PublicFileManager::getSiteFilesPath() . '/' . $site->getSiteStyleFilename(); + if (file_exists($siteStyleFilename)) $this->addStyleSheet(Request::getBaseUrl() . '/' . $siteStyleFilename); + + if (isset($conference)) { + $schedConfDao =& DAORegistry::getDAO('SchedConfDAO'); + $archivedSchedConfsExist = $schedConfDao->archivedSchedConfsExist($conference->getId()); + $currentSchedConfsExist = $schedConfDao->currentSchedConfsExist($conference->getId()); + $this->assign('archivedSchedConfsExist', $archivedSchedConfsExist); + $this->assign('currentSchedConfsExist', $currentSchedConfsExist); + + $this->assign_by_ref('currentConference', $conference); + $conferenceTitle = $conference->getConferenceTitle(); + + $this->assign('numPageLinks', $conference->getSetting('numPageLinks')); + $this->assign('itemsPerPage', $conference->getSetting('itemsPerPage')); + + // Load and apply theme plugin, if chosen + $themePluginPath = $conference->getSetting('conferenceTheme'); + + if (!empty($themePluginPath)) { + // Load and activate the theme + $themePlugin =& PluginRegistry::loadPlugin('themes', $themePluginPath); + if ($themePlugin) $themePlugin->activate($this); + } + + // Assign additional navigation bar items + $navMenuItems =& $conference->getLocalizedSetting('navItems'); + $this->assign_by_ref('navMenuItems', $navMenuItems); + + $this->assign('publicFilesDir', Request::getBaseUrl() . '/' . PublicFileManager::getConferenceFilesPath($conference->getId())); + $this->assign('displayPageHeaderTitle', $conference->getPageHeaderTitle()); + $this->assign('displayPageHeaderSubTitle', $conference->getLocalizedSetting('homeHeaderSubTitle')); + $this->assign('displayPageHeaderLogo', $conference->getPageHeaderLogo()); + $this->assign('displayPageHeaderTitleAltText', $conference->getLocalizedSetting('pageHeaderTitleImageAltText')); + $this->assign('displayPageHeaderLogoAltText', $conference->getLocalizedSetting('pageHeaderLogoImageAltText')); + $this->assign('displayFavicon', $conference->getLocalizedFavicon()); + $this->assign('faviconDir', Request::getBaseUrl() . '/' . PublicFileManager::getConferenceFilesPath($conference->getId())); + $this->assign('alternatePageHeader', $conference->getLocalizedSetting('conferencePageHeader')); + $this->assign('metaSearchDescription', $conference->getLocalizedSetting('searchDescription')); + $this->assign('metaSearchKeywords', $conference->getLocalizedSetting('searchKeywords')); + $this->assign('metaCustomHeaders', $conference->getLocalizedSetting('customHeaders')); + $this->assign('enableAnnouncements', $conference->getSetting('enableAnnouncements')); + + $this->assign('pageFooter', $conference->getLocalizedSetting('conferencePageFooter')); + $this->assign('displayCreativeCommons', $conference->getSetting('postCreativeCommons')); + $this->assign('analyticsTrackingID', $conference->getSetting('analyticsTrackingID')); + + $this->assign('currentConferenceHome', Request::url(null, $conference->getSetting("path"), 'index')); + + if (isset($schedConf)) { + $navMenuItemOrder = array(); + + + // This will be needed if inheriting public conference files from the scheduled conference. + $this->assign('publicSchedConfFilesDir', Request::getBaseUrl() . '/' . PublicFileManager::getSchedConfFilesPath($schedConf->getId())); + $this->assign('primaryLocale', $conference->getSetting('primaryLocale')); + $this->assign('alternateLocales', $conference->getPrimaryLocale()); + + $this->assign_by_ref('currentSchedConf', $schedConf); + + // Assign common sched conf vars: + $currentTime = time(); + $submissionsCloseDate = $schedConf->getSetting('submissionsCloseDate'); + $this->assign('submissionsCloseDate', $submissionsCloseDate); + + $this->assign('schedConfPostTimeline', $schedConf->getSetting('postTimeline')); + $this->assign('schedConfPostTimelineOrder', $schedConf->getSetting('postTimelineOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'Timeline'); + + $this->assign('schedConfPostOverview', $schedConf->getSetting('postOverview')); + $this->assign('schedConfPostOverviewOrder', $schedConf->getSetting('postOverviewOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'Overview'); + + $this->assign('schedConfPostTrackPolicies', $schedConf->getSetting('postTrackPolicies')); + $this->assign('schedConfPostTrackPoliciesOrder', $schedConf->getSetting('postTrackPoliciesOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'TrackPolicies'); + + $this->assign('schedConfPostPresentations', $schedConf->getSetting('postPresentations')); + $this->assign('schedConfPostPresentationsOrder', $schedConf->getSetting('postPresentationsOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'Presentations'); + + $this->assign('schedConfPostAccommodation', $schedConf->getSetting('postAccommodation')); + $this->assign('schedConfPostAccommodationOrder', $schedConf->getSetting('postAccommodationOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'Accommodation'); + + $this->assign('schedConfPostLocation', $schedConf->getSetting('postLocation')); + $this->assign('schedConfPostLocationOrder', $schedConf->getSetting('postLocationOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'Location'); + + $this->assign('schedConfPostSupporters', $schedConf->getSetting('postSupporters')); + $this->assign('schedConfPostSupportersOrder', $schedConf->getSetting('postSupportersOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'Supporters'); + + $this->assign('schedConfPostPayment', $schedConf->getSetting('postPayment')); + $this->assign('schedConfPostPaymentOrder', $schedConf->getSetting('postPaymentOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'Payment'); + + // CFP displayed + $showCFPDate = $schedConf->getSetting('showCFPDate'); + $postCFP = $schedConf->getSetting('postCFP'); + if ($postCFP && $showCFPDate && $submissionsCloseDate && $currentTime > $showCFPDate && $currentTime < $submissionsCloseDate) { + $this->assign('schedConfShowCFP', true); + $this->assign('schedConfShowCFPOrder', $schedConf->getSetting('postCFPOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'CFP'); + } + + // Schedule displayed + $postScheduleDate = $schedConf->getSetting('postScheduleDate'); + if ($postScheduleDate && $currentTime > $postScheduleDate && $schedConf->getSetting('postSchedule')) { + $this->assign('schedConfPostSchedule', true); + } + + // Program + if ($schedConf->getSetting('postProgram') && ($schedConf->getSetting('program') || $schedConf->getSetting('programFile'))) { + $this->assign('schedConfShowProgram', true); + $this->assign('schedConfShowProgramOrder', $schedConf->getSetting('postProgramOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'Program'); + + } + + // Contact & Contact Email + if ($schedConf->getSetting('postContact') && ($schedConf->getSetting('postContact') || $schedConf->getSetting('postContact'))) { + $this->assign('schedConfShowContact', true); + $this->assign('schedConfShowContactOrder', $schedConf->getSetting('postContactOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'Contact'); + } + + if ($schedConf->getSetting('contactEmail') && ($schedConf->getSetting('contactEmail') || $schedConf->getSetting('contactEmail'))) { + $this->assign('schedConfContactEmail', $schedConf->getSetting('contactEmail')); + } + + // Submissions open + $submissionsOpenDate = $schedConf->getSetting('submissionsOpenDate'); + $postSubmission = $schedConf->getSetting('postProposalSubmission'); + $this->assign('submissionsOpenDate', $submissionsOpenDate); + $this->assign('schedConfShowProposalSubmissionOrder', $schedConf->getSetting('postProposalSubmissionOrder')); + $this->_addNavMenuItemOrder($schedConf, $navMenuItemOrder, 'ProposalSubmission'); + + import('payment.ocs.OCSPaymentManager'); + $paymentManager =& OCSPaymentManager::getManager(); + $this->assign('schedConfPaymentsEnabled', $paymentManager->isConfigured()); + + // 再加入 $navMenuItems + foreach ($navMenuItems AS $navItemId => $navItem) { + $navItemOrder = 0; + if (isset($navItem["order"]) && trim($navItem["order"]) !== "") { + $navItemOrder = trim($navItem["order"]); } - $this->assign('siteTitle', $site->getLocalizedTitle()); - - $siteFilesDir = Request::getBaseUrl() . '/' . PublicFileManager::getSiteFilesPath(); - $this->assign('sitePublicFilesDir', $siteFilesDir); - - $this->assign('homeContext', array('conference' => 'index', 'schedConf' => 'index')); - - $siteStyleFilename = PublicFileManager::getSiteFilesPath() . '/' . $site->getSiteStyleFilename(); - if (file_exists($siteStyleFilename)) $this->addStyleSheet(Request::getBaseUrl() . '/' . $siteStyleFilename); - - if (isset($conference)) { - $schedConfDao =& DAORegistry::getDAO('SchedConfDAO'); - $archivedSchedConfsExist = $schedConfDao->archivedSchedConfsExist($conference->getId()); - $currentSchedConfsExist = $schedConfDao->currentSchedConfsExist($conference->getId()); - $this->assign('archivedSchedConfsExist', $archivedSchedConfsExist); - $this->assign('currentSchedConfsExist', $currentSchedConfsExist); - - $this->assign_by_ref('currentConference', $conference); - $conferenceTitle = $conference->getConferenceTitle(); - - $this->assign('numPageLinks', $conference->getSetting('numPageLinks')); - $this->assign('itemsPerPage', $conference->getSetting('itemsPerPage')); - - // Load and apply theme plugin, if chosen - $themePluginPath = $conference->getSetting('conferenceTheme'); - - if (!empty($themePluginPath)) { - // Load and activate the theme - $themePlugin =& PluginRegistry::loadPlugin('themes', $themePluginPath); - if ($themePlugin) $themePlugin->activate($this); - } - - // Assign additional navigation bar items - $navMenuItems =& $conference->getLocalizedSetting('navItems'); - $this->assign_by_ref('navMenuItems', $navMenuItems); - - $this->assign('publicFilesDir', Request::getBaseUrl() . '/' . PublicFileManager::getConferenceFilesPath($conference->getId())); - $this->assign('displayPageHeaderTitle', $conference->getPageHeaderTitle()); - $this->assign('displayPageHeaderSubTitle', $conference->getLocalizedSetting('homeHeaderSubTitle')); - $this->assign('displayPageHeaderLogo', $conference->getPageHeaderLogo()); - $this->assign('displayPageHeaderTitleAltText', $conference->getLocalizedSetting('pageHeaderTitleImageAltText')); - $this->assign('displayPageHeaderLogoAltText', $conference->getLocalizedSetting('pageHeaderLogoImageAltText')); - $this->assign('displayFavicon', $conference->getLocalizedFavicon()); - $this->assign('faviconDir', Request::getBaseUrl() . '/' . PublicFileManager::getConferenceFilesPath($conference->getId())); - $this->assign('alternatePageHeader', $conference->getLocalizedSetting('conferencePageHeader')); - $this->assign('metaSearchDescription', $conference->getLocalizedSetting('searchDescription')); - $this->assign('metaSearchKeywords', $conference->getLocalizedSetting('searchKeywords')); - $this->assign('metaCustomHeaders', $conference->getLocalizedSetting('customHeaders')); - $this->assign('enableAnnouncements', $conference->getSetting('enableAnnouncements')); - - $this->assign('pageFooter', $conference->getLocalizedSetting('conferencePageFooter')); - $this->assign('displayCreativeCommons', $conference->getSetting('postCreativeCommons')); - $this->assign('analyticsTrackingID', $conference->getSetting('analyticsTrackingID')); - - $this->assign('currentConferenceHome', Request::url(null, $conference->getSetting("path"), 'index')); - - if (isset($schedConf)) { - - // This will be needed if inheriting public conference files from the scheduled conference. - $this->assign('publicSchedConfFilesDir', Request::getBaseUrl() . '/' . PublicFileManager::getSchedConfFilesPath($schedConf->getId())); - $this->assign('primaryLocale', $conference->getSetting('primaryLocale')); - $this->assign('alternateLocales', $conference->getPrimaryLocale()); - - $this->assign_by_ref('currentSchedConf', $schedConf); - - // Assign common sched conf vars: - $currentTime = time(); - $submissionsCloseDate = $schedConf->getSetting('submissionsCloseDate'); - $this->assign('submissionsCloseDate', $submissionsCloseDate); - $this->assign('schedConfPostTimeline', $schedConf->getSetting('postTimeline')); - $this->assign('schedConfPostOverview', $schedConf->getSetting('postOverview')); - $this->assign('schedConfPostTrackPolicies', $schedConf->getSetting('postTrackPolicies')); - $this->assign('schedConfPostPresentations', $schedConf->getSetting('postPresentations')); - $this->assign('schedConfPostAccommodation', $schedConf->getSetting('postAccommodation')); - $this->assign('schedConfPostLocation', $schedConf->getSetting('postLocation')); - $this->assign('schedConfPostSupporters', $schedConf->getSetting('postSupporters')); - $this->assign('schedConfPostPayment', $schedConf->getSetting('postPayment')); - - // CFP displayed - $showCFPDate = $schedConf->getSetting('showCFPDate'); - $postCFP = $schedConf->getSetting('postCFP'); - if ($postCFP && $showCFPDate && $submissionsCloseDate && $currentTime > $showCFPDate && $currentTime < $submissionsCloseDate) { - $this->assign('schedConfShowCFP', true); - } - - // Schedule displayed - $postScheduleDate = $schedConf->getSetting('postScheduleDate'); - if ($postScheduleDate && $currentTime > $postScheduleDate && $schedConf->getSetting('postSchedule')) { - $this->assign('schedConfPostSchedule', true); - } - - // Program - if ($schedConf->getSetting('postProgram') && ($schedConf->getSetting('program') || $schedConf->getSetting('programFile'))) { - $this->assign('schedConfShowProgram', true); - } - - // Program - if ($schedConf->getSetting('postContact') && ($schedConf->getSetting('postContact') || $schedConf->getSetting('postContact'))) { - $this->assign('schedConfShowContact', true); - } - - if ($schedConf->getSetting('contactEmail') && ($schedConf->getSetting('contactEmail') || $schedConf->getSetting('contactEmail'))) { - $this->assign('schedConfContactEmail', $schedConf->getSetting('contactEmail')); - } - - // Submissions open - $submissionsOpenDate = $schedConf->getSetting('submissionsOpenDate'); - $postSubmission = $schedConf->getSetting('postProposalSubmission'); - $this->assign('submissionsOpenDate', $submissionsOpenDate); - - import('payment.ocs.OCSPaymentManager'); - $paymentManager =& OCSPaymentManager::getManager(); - $this->assign('schedConfPaymentsEnabled', $paymentManager->isConfigured()); - - } - - // Assign conference stylesheet and footer - $conferenceStyleSheet = $conference->getSetting('conferenceStyleSheet'); - if ($conferenceStyleSheet) { - $this->addStyleSheet(Request::getBaseUrl() . - '/' . PublicFileManager::getConferenceFilesPath($conference->getId()) . - '/' . $conferenceStyleSheet['uploadName']); - } - - // Assign scheduled conference stylesheet and footer (after conference stylesheet!) - if($schedConf) { - $schedConfStyleSheet = $schedConf->getSetting('schedConfStyleSheet'); - if ($schedConfStyleSheet) { - $this->addStyleSheet(Request::getBaseUrl() . - '/' . PublicFileManager::getSchedConfFilesPath($schedConf->getId()) . - '/' . $schedConfStyleSheet['uploadName']); - } - } - } else { // Not within conference context - // Add the site-wide logo, if set for this locale or the primary locale - $displayPageHeaderTitle = $site->getLocalizedPageHeaderTitle(); - $this->assign('displayPageHeaderTitle', $displayPageHeaderTitle); - if (isset($displayPageHeaderTitle['altText'])) $this->assign('displayPageHeaderTitleAltText', $displayPageHeaderTitle['altText']); - $this->assign('publicFilesDir', Request::getBaseUrl() . '/' . PublicFileManager::getSiteFilesPath()); - } - } - } - - /** - * Smarty usage: {get_help_id key="(dir)*.page.topic" url="boolean"} - * - * Custom Smarty function for retrieving help topic ids. - * Direct mapping of page topic key to a numerical value representing the associated help topic xml file - * @params $params array associative array, must contain "key" parameter for string to translate - * @params $smarty Smarty - * @return numerical help topic id - */ - function smartyGetHelpId($params, &$smarty) { - import('help.Help'); - $help =& Help::getHelp(); - if (isset($params) && !empty($params)) { - if (isset($params['key'])) { - $key = $params['key']; - unset($params['key']); - $translatedKey = $help->translate($key); - } else { - $translatedKey = $help->translate(''); - } - - if ($params['url'] == "true") { - return Request::url(null, null, 'help', 'view', explode('/', $translatedKey)); - } else { - return $translatedKey; - } - } - } - - /** - * Smarty usage: {help_topic key="(dir)*.page.topic" text="foo"} - * - * Custom Smarty function for creating anchor tags - * @params $params array associative array - * @params $smarty Smarty - * @return anchor link to related help topic - */ - function smartyHelpTopic($params, &$smarty) { - import('help.Help'); - $help =& Help::getHelp(); - if (isset($params) && !empty($params)) { - $translatedKey = isset($params['key']) ? $help->translate($params['key']) : $help->translate(''); - $link = Request::url(null, null, 'help', 'view', explode('/', $translatedKey)); - $text = isset($params['text']) ? $params['text'] : ''; - return "$text"; - } - } - - /** - * Display page links for a listing of items that has been - * divided onto multiple pages. - * Usage: - * {page_links - * name="nameMustMatchGetRangeInfoCall" - * iterator=$myIterator - * additional_param=myAdditionalParameterValue - * } - */ - function smartyPageLinks($params, &$smarty) { - $iterator = $params['iterator']; - $name = $params['name']; - if (isset($params['anchor'])) { - $anchor = $params['anchor']; - unset($params['anchor']); - } else { - $anchor = null; - } - - // 禁止使用anchor - $anchor = null; - - if (isset($params['all_extra'])) { - $allExtra = ' ' . $params['all_extra']; - unset($params['all_extra']); - } else { - $allExtra = ''; - } - - unset($params['iterator']); - unset($params['name']); - - $numPageLinks = $smarty->get_template_vars('numPageLinks'); - if (!is_numeric($numPageLinks)) $numPageLinks=10; - - $page = $iterator->getPage(); - $pageCount = $iterator->getPageCount(); - $itemTotal = $iterator->getCount(); - - $pageBase = max($page - floor($numPageLinks / 2), 1); - $paramName = $name . 'Page'; - - if ($pageCount<=1) { - return ''; + if (is_array($navMenuItemOrder[$navItemOrder]) === FALSE) { + $navMenuItemOrder[$navItemOrder] = array(); + } + $navMenuItemOrder[$navItemOrder][] = 'schedConfNavItem' . $navItemId; + } + + ksort($navMenuItemOrder); + $this->assign('schedConfNavMenuItemOrder', $navMenuItemOrder); + + //print_r($navMenuItemOrder); + } //if (isset($schedConf)) { + + // Assign conference stylesheet and footer + $conferenceStyleSheet = $conference->getSetting('conferenceStyleSheet'); + if ($conferenceStyleSheet) { + $this->addStyleSheet(Request::getBaseUrl() . + '/' . PublicFileManager::getConferenceFilesPath($conference->getId()) . + '/' . $conferenceStyleSheet['uploadName']); } - $value = ''; - - if ($page>1) { - $params[$paramName] = 1; - $value .= '
  • <<
  • '; - $params[$paramName] = $page - 1; - $value .= '
  • <
  • '; - } - - for ($i=$pageBase; $i"; - } else { - $params[$paramName] = $i; - $value .= '
  • ' . $i . '
  • '; - } - } - if ($page < $pageCount) { - $params[$paramName] = $page + 1; - $value .= '
  • >
  • '; - $params[$paramName] = $pageCount; - $value .= '
  • >>
  • '; - } - $value = '"; - return $value; - } + // Assign scheduled conference stylesheet and footer (after conference stylesheet!) + if($schedConf) { + $schedConfStyleSheet = $schedConf->getSetting('schedConfStyleSheet'); + if ($schedConfStyleSheet) { + $this->addStyleSheet(Request::getBaseUrl() . + '/' . PublicFileManager::getSchedConfFilesPath($schedConf->getId()) . + '/' . $schedConfStyleSheet['uploadName']); + } + } + } else { // Not within conference context + // Add the site-wide logo, if set for this locale or the primary locale + $displayPageHeaderTitle = $site->getLocalizedPageHeaderTitle(); + $this->assign('displayPageHeaderTitle', $displayPageHeaderTitle); + if (isset($displayPageHeaderTitle['altText'])) { + $this->assign('displayPageHeaderTitleAltText', $displayPageHeaderTitle['altText']); + } + $this->assign('publicFilesDir', Request::getBaseUrl() . '/' . PublicFileManager::getSiteFilesPath()); + } + } + } + + function _addNavMenuItemOrder($schedConf, & $navMenuItemOrder, $key, $defaultOrder = 0) { + echo $schedConf->getSetting('port' . $key); + if ($schedConf->getSetting('port' . $key) !== "") { + $defaultOrder = 0; + if (is_int($schedConf->getSetting('post'.$key. 'Order'))) { + $defaultOrder = $schedConf->getSetting('post'.$key. 'Order'); + } + if (is_array($navMenuItemOrder[$defaultOrder]) === FALSE) { + $navMenuItemOrder[$defaultOrder] = array(); + } + $navMenuItemOrder[$defaultOrder][] = 'schedConfPost' . $key; + } + } + + /** + * Smarty usage: {get_help_id key="(dir)*.page.topic" url="boolean"} + * + * Custom Smarty function for retrieving help topic ids. + * Direct mapping of page topic key to a numerical value representing the associated help topic xml file + * @params $params array associative array, must contain "key" parameter for string to translate + * @params $smarty Smarty + * @return numerical help topic id + */ + function smartyGetHelpId($params, &$smarty) { + import('help.Help'); + $help =& Help::getHelp(); + if (isset($params) && !empty($params)) { + if (isset($params['key'])) { + $key = $params['key']; + unset($params['key']); + $translatedKey = $help->translate($key); + } else { + $translatedKey = $help->translate(''); + } + + if ($params['url'] == "true") { + return Request::url(null, null, 'help', 'view', explode('/', $translatedKey)); + } else { + return $translatedKey; + } + } + } + + /** + * Smarty usage: {help_topic key="(dir)*.page.topic" text="foo"} + * + * Custom Smarty function for creating anchor tags + * @params $params array associative array + * @params $smarty Smarty + * @return anchor link to related help topic + */ + function smartyHelpTopic($params, &$smarty) { + import('help.Help'); + $help =& Help::getHelp(); + if (isset($params) && !empty($params)) { + $translatedKey = isset($params['key']) ? $help->translate($params['key']) : $help->translate(''); + $link = Request::url(null, null, 'help', 'view', explode('/', $translatedKey)); + $text = isset($params['text']) ? $params['text'] : ''; + return "$text"; + } + } + + /** + * Display page links for a listing of items that has been + * divided onto multiple pages. + * Usage: + * {page_links + * name="nameMustMatchGetRangeInfoCall" + * iterator=$myIterator + * additional_param=myAdditionalParameterValue + * } + */ + function smartyPageLinks($params, &$smarty) { + $iterator = $params['iterator']; + $name = $params['name']; + if (isset($params['anchor'])) { + $anchor = $params['anchor']; + unset($params['anchor']); + } else { + $anchor = null; + } + + // 禁止使用anchor + $anchor = null; + + if (isset($params['all_extra'])) { + $allExtra = ' ' . $params['all_extra']; + unset($params['all_extra']); + } else { + $allExtra = ''; + } + + unset($params['iterator']); + unset($params['name']); + + $numPageLinks = $smarty->get_template_vars('numPageLinks'); + if (!is_numeric($numPageLinks)) $numPageLinks=10; + + $page = $iterator->getPage(); + $pageCount = $iterator->getPageCount(); + $itemTotal = $iterator->getCount(); + + $pageBase = max($page - floor($numPageLinks / 2), 1); + $paramName = $name . 'Page'; + + if ($pageCount<=1) { + return ''; + } + + $value = ''; + + if ($page>1) { + $params[$paramName] = 1; + $value .= '
  • <<
  • '; + $params[$paramName] = $page - 1; + $value .= '
  • <
  • '; + } + + for ($i=$pageBase; $i"; + } else { + $params[$paramName] = $i; + $value .= '
  • ' . $i . '
  • '; + } + } + if ($page < $pageCount) { + $params[$paramName] = $page + 1; + $value .= '
  • >
  • '; + $params[$paramName] = $pageCount; + $value .= '
  • >>
  • '; + } + $value = '"; + return $value; + } } ?> diff --git a/lib/affix-sidebar/css/styles.css b/lib/affix-sidebar/css/styles.css index 39f7424..9478aef 100644 --- a/lib/affix-sidebar/css/styles.css +++ b/lib/affix-sidebar/css/styles.css @@ -71,6 +71,8 @@ body { top:70px; /*width: 20%;*/ /*width:228px;*/ + max-height: calc(100% - 70px); + overflow-y: auto; } } /* @media (min-width: 979px) {*/ diff --git a/locale/zh_TW/manager.xml b/locale/zh_TW/manager.xml index b35ac63..2a684dc 100644 --- a/locale/zh_TW/manager.xml +++ b/locale/zh_TW/manager.xml @@ -607,7 +607,7 @@ 如何取得Google分析的追蹤編號? 這是絕對網址 (如:"http://www.example.com"),而不是相對路徑 (如: "/manager/setup")。 該名稱不是語系關鍵字(如:"manager.setup"),而是實際顯示的文字(如:「管理者設定」) - 導航條 + 其他導覽列項目 無圖示檔上傳 頁面連結 步驟 3. 網站頁首、頁尾、名單和導航條 diff --git a/pages/manager/TimelineHandler.inc.php b/pages/manager/TimelineHandler.inc.php index ad94f8b..05b957c 100644 --- a/pages/manager/TimelineHandler.inc.php +++ b/pages/manager/TimelineHandler.inc.php @@ -57,11 +57,11 @@ function updateTimeline($args) { $timelineForm->readInputData(); if ($timelineForm->validate()) { - $timelineForm->execute(); - Request::redirect(null, null, null, 'index'); + $timelineForm->execute(); + Request::redirect(null, null, null, 'timeline'); } else { - $timelineForm->setData('errorsExist', true); - $timelineForm->display(); + $timelineForm->setData('errorsExist', true); + $timelineForm->display(); } } diff --git a/pages/schedConf/SchedConfHandler.inc.php b/pages/schedConf/SchedConfHandler.inc.php index 1e297b7..08e6a02 100644 --- a/pages/schedConf/SchedConfHandler.inc.php +++ b/pages/schedConf/SchedConfHandler.inc.php @@ -702,6 +702,7 @@ function navPage() { $templateMgr->assign('title', $title); $templateMgr->assign('navPage', $navItem["navPage"]); + $templateMgr->assign('navId', $id); $templateMgr->assign('helpTopicId', 'conference.currentConferences.navPage'); $templateMgr->display('schedConf/navPage.tpl'); diff --git a/plugins/blocks/navigation/block.tpl b/plugins/blocks/navigation/block.tpl index ab46441..f530949 100644 --- a/plugins/blocks/navigation/block.tpl +++ b/plugins/blocks/navigation/block.tpl @@ -8,199 +8,345 @@ * * $Id$ *} -
    - - - -
    - - - - - - - -
    - - - - - -
    -
    - -
    - - {if $currentSchedConf && ($schedConfPostOverview || $schedConfShowCFP - || $schedConfPostPolicies || $schedConfShowProgram || $schedConfPostPresentations || $schedConfPostSchedule - || $schedConfPostPayment || $schedConfPostAccommodation || $schedConfPostSupporters || $schedConfPostTimeline - || $schedConfContactEmail)} - - - +
    + {/if} + + {if $schedConfContactEmail and $schedConfShowContact} + + {/if} + + {if $schedConfNavMenuItemOrder|count > 0} + + {/if} + + diff --git a/styles/common.css b/styles/common.css index 5cdbb09..ed9929f 100644 --- a/styles/common.css +++ b/styles/common.css @@ -379,6 +379,15 @@ ul.nav.nav-stacked li a { margin-left: 2px; } +ul.nav.nav-stacked li.panel.panel-primary a { + border-bottom-width: 0; + color: white; +} + +ul.nav.nav-stacked li.panel.panel-primary { + background-color: #337ab7; +} + .header-container.compact, .header-container.compact .row { min-height: 0 !important; @@ -437,4 +446,5 @@ table.listing tr.listing-tr.hover { #sidebar.affix { position: static; } -} \ No newline at end of file +} + diff --git a/templates/manager/setup/step3.tpl b/templates/manager/setup/step3.tpl index 37586ac..158087d 100644 --- a/templates/manager/setup/step3.tpl +++ b/templates/manager/setup/step3.tpl @@ -242,13 +242,13 @@ var _linkTypeChange = function (_select) { {foreach name=navItems from=$navItems[$formLocale] key=navItemId item=navItem} - + + + + + {/if} {foreachelse} - + {* 只有一行! *} +
    + {fieldLabel name="navItems-$navItemId-order" key="common.order"} + + + * 數字越小,排在越上面 {* @TODO 語系 *} +
    {fieldLabel name="navItems-$navItemId-url" key="manager.setup.layout.linkType"} @@ -335,7 +344,8 @@ var _linkTypeChange = function (_select) {
    -

    +

    diff --git a/templates/manager/timelineEdit.tpl b/templates/manager/timelineEdit.tpl index 307c67c..7cf19ef 100644 --- a/templates/manager/timelineEdit.tpl +++ b/templates/manager/timelineEdit.tpl @@ -177,7 +177,7 @@
    -

    {translate key="manager.timeline.websitePosting"}

    + {* @@ -192,30 +192,49 @@ *} - + + + + + + + + @@ -223,6 +242,9 @@ {fieldLabel name="postTimeline" key="manager.timeline.postTimeline"} + @@ -230,6 +252,9 @@ {fieldLabel name="postAccommodation" key="manager.timeline.postAccommodation"} + @@ -237,46 +262,78 @@ {fieldLabel name="postLocation" key="manager.timeline.postLocation"} + - - - + + + + + + + + + + + + + + + - - + + - @@ -285,7 +342,7 @@ - @@ -294,16 +351,16 @@ - - @@ -312,12 +369,12 @@ -
    +

    {translate key="manager.timeline.websitePosting"}

    +
    + 排序 (數字越小,排序越前面) {* @TODO 語系 *} +
    {fieldLabel name="postOverview" key="manager.timeline.postOverview"} + +
    {fieldLabel name="postCFP" key="manager.timeline.postCFP"} + +
    {fieldLabel name="postProgram" key="manager.timeline.postProgram"} + +
    {fieldLabel name="postPayment" key="manager.timeline.postRegistration"} + +
    + +
    + +
    + +
    - - {fieldLabel name="postContact" key="manager.timeline.postContact"} -
    {fieldLabel name="postProposalSubmission" key="manager.timeline.postProposalSubmission"} + +
    {fieldLabel name="postTrackPolicies" key="manager.timeline.postTrackPolicies"} + +
    {fieldLabel name="postPresentations" key="manager.timeline.postPresentations"} + +
    {fieldLabel name="postSupporters" key="manager.timeline.postSupporters"} + +
    + + {fieldLabel name="postContact" key="manager.timeline.postContact"} + + +
    + +

    {translate key="manager.timeline.include"}

    {translate key="manager.timeline.postDate"}

    {translate key="manager.timeline.include"}

    {translate key="manager.timeline.postDate"}

    + {fieldLabel name="postSchedule" key="manager.timeline.postSchedule"}
    + {fieldLabel name="postAbstracts" key="manager.timeline.postAbstracts"}
    - - {fieldLabel name="postPapers" key="manager.timeline.postPapers"} + + + {fieldLabel name="postPapers" key="manager.timeline.postPapers"} - {html_select_date prefix="postPapersDate" time=$postPapersDate all_extra="class=\"selectMenu\"" start_year=$firstYear end_year=$lastYear} + {html_select_date prefix="postPapersDate" time=$postPapersDate all_extra="class=\"selectMenu\"" start_year=$firstYear end_year=$lastYear}
    + {fieldLabel name="delayOpenAccess" key="manager.timeline.delayOpenAccess"}
    + {fieldLabel name="closeComments" key="manager.timeline.closeComments"} - {html_select_date prefix="closeCommentsDate" time=$closeCommentsDate all_extra="class=\"selectMenu\"" start_year=$firstYear end_year=$lastYear} + {html_select_date prefix="closeCommentsDate" time=$closeCommentsDate all_extra="class=\"selectMenu\"" start_year=$firstYear end_year=$lastYear} diff --git a/templates/schedConf/navPage.tpl b/templates/schedConf/navPage.tpl index b1a816c..e2a6e8b 100644 --- a/templates/schedConf/navPage.tpl +++ b/templates/schedConf/navPage.tpl @@ -15,7 +15,7 @@ {if $isConferenceManager} - + {/if}