示例#1
0
 /**
  * Return data on a course view (this will be some form of HTML)
  *
  * @param   object   $course    Current course
  * @param   object   $offering  Name of the component
  * @param   boolean  $describe  Return plugin description only?
  * @return  object
  */
 public function onCourse($course, $offering, $describe = false)
 {
     if (!$offering->access('manage', 'section')) {
         return;
     }
     $response = with(new \Hubzero\Base\Object())->set('name', $this->_name)->set('title', Lang::txt('PLG_COURSES_' . strtoupper($this->_name)))->set('description', Lang::txt('PLG_COURSES_' . strtoupper($this->_name) . '_BLURB'))->set('default_access', $this->params->get('plugin_access', 'managers'))->set('display_menu_tab', true)->set('icon', 'f083');
     if ($describe) {
         return $response;
     }
     $nonadmin = Request::getState('com_courses.offering' . $offering->get('id') . '.nonadmin', 0);
     if (!($active = Request::getVar('active')) && !$nonadmin) {
         Request::setVar('active', $active = $this->_name);
     }
     if ($response->get('name') == $active) {
         // Set the page title
         Document::setTitle(Document::getTitle() . ': ' . Lang::txt('PLG_COURSES_' . strtoupper($this->_name)));
         Pathway::append(Lang::txt('PLG_COURSES_' . strtoupper($this->_name)), $offering->link() . '&active=' . $this->_name);
         $view = with($this->view('default', 'overview'))->set('option', Request::getVar('option', 'com_courses'))->set('course', $course)->set('offering', $offering)->set('params', $this->params);
         foreach ($this->getErrors() as $error) {
             $view->setError($error);
         }
         $response->set('html', $view->loadTemplate());
     }
     // Return the output
     return $response;
 }
示例#2
0
 function __construct()
 {
     parent::__construct();
     $this->view->setLayout('login_layout');
     Document::setCss(array('login-admin'));
     Document::setTitle('Đăng nhập');
 }
示例#3
0
 function exeAlbum()
 {
     if (Session::get('user') != null) {
         Document::setTitle('Album ảnh');
         Document::setJs(array('image', 'jquery.form'));
         $data = array();
         $display = 15;
         $totalPage = ceil($this->model->total("`username` = '" . Session::get('user')['username'] . "'") / $display);
         if ((int) Request::get('page') > 0) {
             $page = Request::get('page');
             if ($totalPage < $page) {
                 $page = $totalPage;
             }
         } else {
             $page = 1;
         }
         $pageLink = new Paging($page, $totalPage);
         $data['pagination'] = $pageLink->pagination('?');
         $data['images'] = $this->model->selectUser(Session::get('user')['username'], ($page - 1) * $display, $display);
         $data['url'] = BASE_URL . '/';
         $data['action'] = BASE_URL . '/image/add';
         $this->view->render('album', $data);
     } else {
         Until::redirectTo();
     }
 }
示例#4
0
 public function exeDefault()
 {
     Document::setTitle('Quản lý ảnh');
     Document::setJs(array('jquery-1.8.3.min', 'image-admin'));
     $data = array();
     $keySearch = Request::get('keySearch');
     $data['keySearch'] = $keySearch;
     $condition = '';
     if ($keySearch == null) {
         $link = '?';
     } else {
         $link = '?keySearch=' . $keySearch . '&';
         $condition = 'LOWER(`username`)="' . strtolower($keySearch) . '"';
     }
     $display = 20;
     $totalPage = ceil($this->model->total($condition) / $display);
     if ((int) Request::get('page') > 0) {
         $page = Request::get('page');
         if ($totalPage < $page) {
             $page = $totalPage;
         }
     } else {
         $page = 1;
     }
     $pageLink = new Paging($page, $totalPage);
     $data['title'] = BASE_URL_ADMIN . '/image';
     $data['pagination'] = $pageLink->pagination($link);
     $data['images'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
     $data['ajax'] = BASE_URL_ADMIN . '/image/load';
     $data['imageLoad'] = BASE_URL . '/public/css/images/loading.gif';
     $data['url'] = BASE_URL . '/';
     $this->view->render('index', $data);
 }
示例#5
0
 function __construct()
 {
     parent::__construct();
     Document::setTitle('Giới thiệu');
     Document::setCss(array('style'));
     $this->view->setLayout('main_layout');
 }
示例#6
0
 function exeArticle()
 {
     $id = (int) Request::get('article');
     if ($id > 0) {
         $data = $this->model->selectOne($id);
         if (empty($data)) {
             $data['error'] = true;
         } else {
             $data['error'] = false;
             Document::setTitle($data['title']);
             $comments = $this->exeGetComment((int) Request::get('article'), 0, 20);
             $data['comments'] = $comments['data'];
             $data['viewComment'] = $comments['view'];
             Document::setTitle($data['title']);
             if (Session::get('user') != null) {
                 $data['submit'] = '<input name="submitComment" type="button" class="input_submit" login="******" value="Bình luận"/>';
             } else {
                 $data['submit'] = '<input name="submitComment" type="button" class="input_submit" value="Đăng nhập để bình luận"/>';
             }
         }
     } else {
         $data['error'] = true;
     }
     if ($data['error'] == true) {
         Document::setTitle('Lỗi');
     }
     $this->view->render('article', $data);
 }
示例#7
0
 function exeEdit()
 {
     $id = (int) Request::get('id');
     if ($id > 0) {
         if (Session::get('province') != null) {
             $data = Session::get('province');
             $data['error'] = '<p class="error">Bạn vui lòng nhập đầy đủ thông tin</p>';
             Session::unsetSession('province');
         } else {
             $data = $this->model->selectOne($id);
             $data['error'] = '';
         }
         if (empty($data)) {
             Until::redirectTo('province');
         } else {
             Document::setTitle('Sửa - ' . $data['province']);
             Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery'));
             $data['total'] = $this->model->total();
             $data['member'] = BASE_URL_ADMIN . '/user';
             $data['province_title'] = BASE_URL_ADMIN . '/province';
             $data['actionEdit'] = BASE_URL_ADMIN . '/province/update';
             $data['delete'] = BASE_URL_ADMIN . '/province/delete?id=';
             $data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
             $this->view->render('edit', $data);
         }
     } else {
         Until::redirectTo('province');
     }
 }
示例#8
0
 /**
  * Image Manager Popup
  *
  * @param string $listFolder The image directory to display
  * @since 1.5
  */
 function getFolderList($base = null)
 {
     // Get some paths from the request
     if (empty($base)) {
         $base = COM_MEDIA_BASE;
     }
     //corrections for windows paths
     $base = str_replace(DIRECTORY_SEPARATOR, '/', $base);
     $com_media_base_uni = str_replace(DIRECTORY_SEPARATOR, '/', COM_MEDIA_BASE);
     // Get the list of folders
     $folders = Filesystem::directories($base, '.', true, true);
     Document::setTitle(Lang::txt('COM_MEDIA_INSERT_IMAGE'));
     // Build the array of select options for the folder list
     $options[] = Html::select('option', "", "/");
     foreach ($folders as $folder) {
         $folder = str_replace($com_media_base_uni, "", str_replace(DIRECTORY_SEPARATOR, '/', $folder));
         $value = substr($folder, 1);
         $text = str_replace(DIRECTORY_SEPARATOR, "/", $folder);
         $options[] = Html::select('option', $value, $text);
     }
     // Sort the folder list array
     if (is_array($options)) {
         sort($options);
     }
     // Get asset and author id (use integer filter)
     $asset = Request::getInt('asset', 0);
     $author = Request::get('author', 0);
     // Create the drop-down folder select list
     $list = Html::select('genericlist', $options, 'folderlist', 'class="inputbox" size="1" onchange="ImageManager.setFolder(this.options[this.selectedIndex].value, ' . $asset . ', ' . $author . ')" ', 'value', 'text', $base);
     return $list;
 }
示例#9
0
 function exeEdit()
 {
     Document::setTitle('Sửa giới thiệu');
     Document::setJs(array('ckeditor/ckeditor', 'replace-content'));
     $data = $this->model->selectIntro();
     $data['action'] = BASE_URL_ADMIN . '/intro/update';
     $this->view->render('edit', $data);
 }
示例#10
0
文件: Acl.php 项目: noikiy/lovetolove
 function exeDefault()
 {
     Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery'));
     Document::setTitle('Quản lý quyền');
     $data['acl'] = $this->model->selectAll();
     $data['addLink'] = BASE_URL_ADMIN . '/acl/add';
     $data['editLink'] = BASE_URL_ADMIN . '/acl/edit?id=';
     $data['deleteLink'] = BASE_URL_ADMIN . '/acl/delete?id=';
     $data['imageEdit'] = BASE_URL . '/public/css/images/white_edit.png';
     $data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
     $this->view->render('index', $data);
 }
示例#11
0
 function exeDetail()
 {
     Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery'));
     $data = $this->model->selectOne((int) Request::get('id'));
     if (empty($data)) {
         Until::redirectTo('/feedback');
     }
     $data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
     Document::setTitle('Liên hệ - ' . $data['fullname']);
     $this->model->read();
     $data['delete'] = $data['delete'] = BASE_URL_ADMIN . '/feedback/delete?id=';
     $this->view->render('detail', $data);
 }
示例#12
0
 function exeDefault()
 {
     $id = (int) Session::get('user')['id'];
     if ($id > 0) {
         Document::setTitle('Bạn bè');
         Document::setJs(array('relationship'));
         $data = array();
         $data['id'] = $id;
         $data['detail'] = BASE_URL . '/user/detail?user='******'invitation'] = $this->model->listInvitation($id);
         $data['friends'] = $this->model->listFriends($id);
         $this->view->render('index', $data);
     }
 }
示例#13
0
 function exeEdit()
 {
     Document::setTitle('Sửa dịch vụ');
     $data = $this->model->selectOne((int) Request::get('id'));
     $data['error'] = '';
     if (Session::get('service_error') != null) {
         $data['error'] = Session::get('service_error');
         Session::unsetSession('service_error');
     }
     $data['service'] = BASE_URL_ADMIN . '/services';
     $data['update'] = BASE_URL_ADMIN . '/services/update';
     $data['services'] = $this->model->selectAll();
     $data['total'] = $this->model->total();
     $this->view->render('edit', $data);
 }
示例#14
0
 function exeDefault()
 {
     Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery', 'role', 'type_user'));
     Document::setTitle('Quản lý thành viên');
     $data = array();
     $keySearch = Request::get('keySearch');
     $find = Request::get('find');
     $searchName = '';
     $searchEmail = '';
     if ($find == 'name') {
         $searchName = 'selected="selected"';
     } elseif ($find == 'email') {
         $searchEmail = 'selected="selected"';
     }
     $data['title'] = BASE_URL_ADMIN . '/user';
     $data['searchName'] = $searchName;
     $data['searchEmail'] = $searchEmail;
     $data['keySearch'] = $keySearch;
     $condition = '';
     if ($keySearch == null) {
         $link = '?';
     } else {
         $link = '?keySearch=' . $keySearch . '&';
         if ($searchEmail != '') {
             $condition = "LOWER(`email`) like '%" . strtolower($keySearch) . "%'";
         } else {
             $condition = "LOWER(`username`) like '%" . strtolower($keySearch) . "%'";
         }
         if ($find == 'email') {
             $link .= 'find=' . $find . '&';
         }
     }
     $display = 20;
     $totalPage = ceil($this->model->total($condition) / $display);
     if ((int) Request::get('page') > 0) {
         $page = Request::get('page');
         if ($totalPage < $page) {
             $page = $totalPage;
         }
     } else {
         $page = 1;
     }
     $pageLink = new Paging($page, $totalPage);
     $data['pagination'] = $pageLink->pagination($link);
     $data['user'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
     $data['action'] = '';
     $this->view->render('index', $data);
 }
示例#15
0
 /**
  * display
  */
 public function displayTask()
 {
     Pathway::append(Lang::txt('COM_GEOSEARCH_TITLE'), 'index.php?option=' . $this->_option);
     Document::setTitle(Lang::txt('COM_GEOSEARCH_TITLE'));
     $filters = array();
     $filters['limit'] = 1000;
     //Request::getInt('limit', 1000, 'request');
     $filters['start'] = 0;
     //Request::getInt('limitstart', 0, 'request');
     $resources = Request::getVar('resource', '', 'request');
     $tags = trim(Request::getString('tags', '', 'request'));
     $distance = Request::getInt('distance', '', 'request');
     $location = Request::getVar('location', '', 'request');
     $unit = Request::getVar('dist_units', '', 'request');
     $this->view->display();
 }
示例#16
0
 function exeDefault()
 {
     Document::setTitle('Trang chủ');
     $intro = $this->loadIntro();
     $data = array();
     $data['intro'] = $intro->selectIntro();
     $data['detailIntro'] = BASE_URL . '/intro';
     $article = $this->loadArticle();
     $data['article'] = $article->selectAll(0, 10);
     $data['detailArticle'] = BASE_URL . '/article/article?article=';
     $user = $this->loadUser();
     $data['user'] = $user->selectAllDetail(0, 15);
     $data['detailUser'] = BASE_URL . '/user/detail?user='******'detailUserAll'] = BASE_URL . '/user';
     $this->view->render('index', $data);
 }
示例#17
0
 function exeDetail()
 {
     $id = (int) Request::get('service');
     $data = array();
     $data['service'] = $this->model->selectOne($id);
     if (empty($data['service'])) {
         Until::redirectTo('services');
     }
     if ($id > 0) {
         Document::setTitle($data['service']['feature']);
         $art = $this->loadArticle();
         $data['article'] = $art->selectAll(0, 20, '`service_id`="' . $data['service']['id'] . '"');
         $data['detail'] = BASE_URL . '/article/Article?article=';
         $this->view->render('detail', $data);
     } else {
         Until::redirectTo('services');
     }
 }
示例#18
0
 function exeDefault()
 {
     Document::setTitle('Liên hệ');
     Document::setJs(array('feedback'));
     $data = array();
     $data['action'] = BASE_URL . '/feedback/insert';
     $data['captcha'] = BASE_URL . '/function/create_captcha.php';
     if (Session::get('feedback') == null) {
         $data['error'] = $data['success'] = $data['content'] = $data['email'] = $data['fullname'] = '';
     } else {
         $data['error'] = Session::get('feedback')['error'];
         $data['success'] = Session::get('feedback')['success'];
         $data['content'] = Session::get('feedback')['content'];
         $data['email'] = Session::get('feedback')['email'];
         $data['fullname'] = Session::get('feedback')['fullname'];
         Session::unsetSession('feedback');
     }
     $this->view->render('index', $data);
 }
示例#19
0
 /**
  * Return data on a course view (this will be some form of HTML)
  *
  * @param   object   $course    Current course
  * @param   object   $offering  Name of the component
  * @param   boolean  $describe  Return plugin description only?
  * @return  object
  */
 public function onCourse($course, $offering, $describe = false)
 {
     $response = with(new \Hubzero\Base\Object())->set('name', $this->_name)->set('title', Lang::txt('PLG_COURSES_' . strtoupper($this->_name)))->set('description', Lang::txt('PLG_COURSES_' . strtoupper($this->_name) . '_BLURB'))->set('default_access', $this->params->get('plugin_access', 'members'))->set('display_menu_tab', true)->set('icon', 'f095');
     if ($describe) {
         return $response;
     }
     if (!($active = Request::getVar('active'))) {
         Request::setVar('active', $active = $this->_name);
     }
     // Get a student count
     $response->set('meta_count', $offering->announcements(array('count' => true)));
     // Check if our area is in the array of areas we want to return results for
     if ($response->get('name') == $active) {
         // Set some variables so other functions have access
         $this->option = Request::getCmd('option', 'com_courses');
         $this->course = $course;
         $this->offering = $offering;
         // Set the page title
         Document::setTitle(Document::getTitle() . ': ' . Lang::txt('PLG_COURSES_ANNOUNCEMENTS'));
         Pathway::append(Lang::txt('PLG_COURSES_' . strtoupper($this->_name)), $this->offering->link() . '&active=' . $this->_name);
         require_once Component::path('com_courses') . DS . 'models' . DS . 'announcement.php';
         $action = Request::getWord('action', '');
         switch (strtolower($action)) {
             case 'save':
                 $response->set('html', $this->_save());
                 break;
             case 'new':
                 $response->set('html', $this->_edit());
                 break;
             case 'edit':
                 $response->set('html', $this->_edit());
                 break;
             case 'delete':
                 $response->set('html', $this->_delete());
                 break;
             default:
                 $response->set('html', $this->_list());
                 break;
         }
     }
     // Return the output
     return $response;
 }
示例#20
0
 function exeDetail()
 {
     $data = array();
     $id = (int) Request::get('support');
     if ($id > 0) {
         $data = $this->model->selectOne($id);
         if (empty($data)) {
             $data['error'] = true;
         } else {
             Document::setTitle($data['question']);
             $data['error'] = false;
         }
     } else {
         $data['error'] = true;
     }
     if ($data['error'] == true) {
         Document::setTitle('Lỗi');
     }
     $this->view->render('detail', $data);
 }
示例#21
0
 function exeDefault()
 {
     Document::setTitle('Hoá đơn');
     Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery'));
     $data = array();
     $keySearch = Request::get('keySearch');
     $data['keySearch'] = $keySearch;
     $condition = '';
     if ($keySearch == null) {
         $link = '?';
     } else {
         $link = '?keySearch=' . $keySearch . '&';
         $condition = 'LOWER(`username`)="' . strtolower($keySearch) . '"';
     }
     $display = 20;
     $totalPage = ceil($this->model->total($condition) / $display);
     if ((int) Request::get('page') > 0) {
         $page = Request::get('page');
         if ($totalPage < $page) {
             $page = $totalPage;
         }
     } else {
         $page = 1;
     }
     $pageLink = new Paging($page, $totalPage);
     $data['pagination'] = $pageLink->pagination($link);
     $data['title'] = BASE_URL_ADMIN . '/bill';
     $recharge = $this->LoadRecharge();
     $data['recharge'] = $recharge->selectAll();
     $data['actionDelete'] = BASE_URL_ADMIN . '/bill/delete';
     $data['delete'] = BASE_URL_ADMIN . '/bill/delete?id=';
     $data['detail'] = BASE_URL_ADMIN . '/bill/detail?id=';
     $data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
     $data['detailRecharge'] = BASE_URL_ADMIN . '/recharge';
     $data['bill'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
     $this->view->render('index', $data);
 }
示例#22
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     if ($this->getLayout() == 'pagebreak') {
         // TODO: This is really dogy - should change this one day.
         $eName = Request::getVar('e_name');
         $eName = preg_replace('#[^A-Z0-9\\-\\_\\[\\]]#i', '', $eName);
         Document::setTitle(Lang::txt('COM_CONTENT_PAGEBREAK_DOC_TITLE'));
         $this->assignRef('eName', $eName);
         parent::display($tpl);
         return;
     }
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         App::abort(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     parent::display($tpl);
 }
示例#23
0
						<div class="grid">
							<div class="col span12 omega">
								<input type="text" value="ss" />
								<span class="hint">(Command/Ctrl + C to Copy)</span>
							</div>
						</div>
					</div>
				</a>
				<a id="full-screen" class="tooltips control" href="javascript:void(0);" title="View Video Fullscreen">Fullscreen</a>
			</div>
		</div>
	</div><!-- /#control-box -->

	<div id="video-subtitles"></div>
</div><!-- /#video-container -->

<div id="transcript-container">
	<div id="transcript-toolbar">
		<div id="transcript-select"></div>
		<input type="text" id="transcript-search" placeholder="Search Transcript..." />
		<a href="javascript:void(0);" id="font-bigger"></a>
		<a href="javascript:void(0);" id="font-smaller"></a>
	</div>
	<div id="transcripts"></div>
</div>
<div class="bottom-controls">
	<a href="javascript:void(0);" class="btn btn-secondardy icon-popout embed-popout">Pop Out</a>
</div>
<?php 
Document::setTitle($this->resource->title);
示例#24
0
 /**
  * Set the page title
  *
  * @return  void
  */
 protected function _buildTitle()
 {
     $this->_title = Lang::txt(strtoupper($this->_option));
     if ($this->_task && in_array($this->_task, array('story', 'poll', 'sendstory', 'suggestions'))) {
         $this->_title .= ': ' . Lang::txt(strtoupper($this->_option) . '_' . strtoupper($this->_task));
     }
     \Document::setTitle($this->_title);
 }
示例#25
0
 /**
  * Build the title for this component
  *
  * @return  void
  */
 protected function _buildTitle()
 {
     if (!$this->_title) {
         $this->_title = Lang::txt(strtoupper($this->_option)) . ': ' . Lang::txt(strtoupper($this->_option . '_' . $this->_controller));
     }
     Document::setTitle($this->_title);
 }
示例#26
0
 *
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// No direct access
defined('_HZEXEC_') or die;
if (Pathway::count() <= 0) {
    Pathway::append(Lang::txt('COM_BLOG'), 'index.php?option=' . $this->option);
}
Pathway::append($this->row->published('Y'), 'index.php?option=' . $this->option . '&year=' . $this->row->published('Y'));
Pathway::append($this->row->published('m'), 'index.php?option=' . $this->option . '&year=' . $this->row->published('Y') . '&month=' . sprintf("%02d", $this->row->published('m')));
Pathway::append(stripslashes($this->row->get('title')), $this->row->link());
Document::setTitle(Lang::txt('COM_BLOG') . ': ' . stripslashes($this->row->get('title')));
$this->css()->js();
$first = $this->archive->entries(array('state' => $this->filters['state'], 'authorized' => $this->filters['authorized']))->order('publish_up', 'asc')->limit(1)->row();
?>
<header id="content-header">
	<h2><?php 
echo Lang::txt('COM_BLOG');
?>
</h2>

	<div id="content-header-extra">
		<p>
			<a class="icon-archive archive btn" href="<?php 
echo Route::url('index.php?option=' . $this->option . '&task=archive');
?>
">
示例#27
0
 /**
  * Sets the title and pathway based on the current task
  *
  * @return  void
  */
 private function setTitle()
 {
     \Document::setTitle(Lang::txt('COM_MEMBERS_CREDENTIALS_' . ucfirst($this->_task)));
     \Pathway::append(Lang::txt('COM_MEMBERS_CREDENTIALS_' . ucfirst($this->_task)), 'index.php?option=' . $this->_option . '&task=' . $this->_task);
 }
示例#28
0
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 */
// No direct access
defined('_HZEXEC_') or die;
$html = '';
$this->css()->js()->css('jquery.fancybox.css', 'system');
$counts = $this->model->get('counts');
$new = isset($counts['new']) && $counts['new'] > 0 ? $counts['new'] : 0;
// Add new activity count to page title
$title = $new && $this->active == 'feed' ? $this->title . ' (' . $new . ')' : $this->title;
Document::setTitle($title);
// Get project params
$params = $this->model->params;
// Get layout from project params or component
$layout = $params->get('layout', $this->config->get('layout', 'standard'));
$theme = $params->get('theme', $this->config->get('theme', 'light'));
if ($layout == 'extended') {
    // Include extended CSS
    $this->css('extended.css');
    // Include theme CSS
    $this->css('theme' . $theme . '.css');
} else {
    $this->css('standard.css');
}
// Get notifications
$notification = Event::trigger('projects.onProjectNotification', array($this->model, $this->active));
示例#29
0
 /**
  * Serve wiki page (usually via public link)
  *
  * @param   int  	$projectid
  * @return  void
  */
 public function serve($type = '', $projectid = 0, $query = '')
 {
     $this->_area = $this->onProjectAreas();
     if ($type != $this->_area['name']) {
         return false;
     }
     $data = json_decode($query);
     if (!isset($data->pageid) || !$projectid) {
         return false;
     }
     $this->loadLanguage();
     $database = App::get('db');
     $this->_option = 'com_projects';
     // Instantiate a project
     $this->model = new \Components\Projects\Models\Project($projectid);
     if (!$this->model->exists()) {
         return false;
     }
     $groupname = $this->model->config()->get('group_prefix', 'pr-') . $this->model->get('alias');
     $scope = 'projects' . DS . $this->model->get('alias') . DS . 'notes';
     // Include note model
     include_once PATH_CORE . DS . 'components' . DS . 'com_projects' . DS . 'models' . DS . 'note.php';
     // Get our model
     $this->note = new \Components\Projects\Models\Note($scope, $groupname, $projectid);
     // Fix pathway (com_wiki screws it up)
     $this->fixupPathway();
     // Load requested page
     $page = $this->note->page($data->pageid);
     if (!$page->get('id')) {
         return false;
     }
     // Write title & build pathway
     Document::setTitle(Lang::txt(strtoupper($this->_option)) . ': ' . stripslashes($this->model->get('title')) . ' - ' . stripslashes($page->get('title')));
     // Instantiate a new view
     $view = new \Hubzero\Plugin\View(array('folder' => 'projects', 'element' => 'notes', 'name' => 'pubview'));
     $view->option = $this->_option;
     $view->model = $this->model;
     $view->page = $page;
     $view->revision = $page->revision('current');
     $view->masterscope = 'projects' . DS . $this->model->get('alias') . DS . 'notes';
     // Output HTML
     if ($this->getError()) {
         $view->setError($this->getError());
     }
     $view->display();
     return true;
 }
示例#30
0
 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <*****@*****.**>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @copyright Copyright 2005-2014 Open Source Matters, Inc.
 * @license   http://www.gnu.org/licenses/gpl-2.0.html GPLv2
 */
$canDo = \Components\Installer\Admin\Helpers\Installer::getActions();
Toolbar::title(Lang::txt('COM_INSTALLER_HEADER_' . $this->getName()), 'install.png');
if ($canDo->get('core.admin')) {
    Toolbar::preferences('com_installer');
    Toolbar::divider();
}
Toolbar::help('warnings');
Document::setTitle(Lang::txt('COM_INSTALLER_TITLE_' . $this->getName()));
?>
<div id="installer-warnings">
	<form action="<?php 
echo Route::url('index.php?option=com_installer&controller=warnings');
?>
" method="post" name="adminForm" id="item-form">
		<?php 
if (!count($this->messages)) {
    echo '<p class="nowarning">' . Lang::txt('COM_INSTALLER_MSG_WARNINGS_NONE') . '</p>';
} else {
    echo Html::sliders('start', 'warning-sliders', array('useCookie' => 1));
    foreach ($this->messages as $message) {
        echo Html::sliders('panel', $message['message'], str_replace(' ', '', $message['message']));
        echo '<div style="padding: 5px;">' . $message['description'] . '</div>';
    }