Exemple #1
0
 /**
  * Event call to get content for public project page
  *
  * @return
  */
 public function onProjectPublicList($model)
 {
     if (!$model->exists() || !$model->access('content') || !$model->isPublic()) {
         return false;
     }
     if (!$model->params->get('notes_public', 0)) {
         return false;
     }
     $view = new \Hubzero\Plugin\View(array('folder' => 'projects', 'element' => 'notes', 'name' => 'publist'));
     require_once PATH_CORE . DS . 'components' . DS . 'com_projects' . DS . 'tables' . DS . 'publicstamp.php';
     $database = App::get('db');
     $objSt = new \Components\Projects\Tables\Stamp($database);
     $view->items = $objSt->getPubList($model->get('id'), 'notes');
     $view->page = new \Components\Wiki\Tables\Page($database);
     $view->model = $model;
     return $view->loadTemplate();
 }
Exemple #2
0
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * 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;
require_once PATH_CORE . DS . 'components' . DS . 'com_projects' . DS . 'tables' . DS . 'publicstamp.php';
$database = App::get('db');
$objSt = new \Components\Projects\Tables\Stamp($database);
// Get listed public files
$items = $objSt->getPubList($this->model->get('id'), 'files');
if ($items) {
    ?>
<div class="public-list-header">
	<h3><?php 
    echo ucfirst(Lang::txt('COM_PROJECTS_PUBLIC'));
    ?>
 <?php 
    echo Lang::txt('COM_PROJECTS_FILES');
    ?>
</h3>
</div>
<div class="public-list-wrap">
	<ul>
		<?php 
    foreach ($items as $item) {