|
From: <pan...@us...> - 2009-03-01 16:23:20
|
Revision: 514
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=514&view=rev
Author: panzaboi
Date: 2009-03-01 16:23:15 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Added general view helper plugins
Added Paths:
-----------
website/application/views/
website/application/views/helpers/
website/application/views/helpers/IsLoggedIn.php
website/application/views/helpers/getUser.php
website/application/views/scripts/
website/application/views/scripts/error/
website/application/views/scripts/error/error.phtml
website/application/views/scripts/logedin.phtml
website/application/views/scripts/paginator.phtml
Property changes on: website/application/views
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Property changes on: website/application/views/helpers
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Added: website/application/views/helpers/IsLoggedIn.php
===================================================================
--- website/application/views/helpers/IsLoggedIn.php (rev 0)
+++ website/application/views/helpers/IsLoggedIn.php 2009-03-01 16:23:15 UTC (rev 514)
@@ -0,0 +1,14 @@
+<?php
+
+class Acm_View_Helper_IsLoggedIn extends Zend_View_Helper_Abstract
+{
+ public function isLoggedIn()
+ {
+ $auth = Zend_Auth::getInstance();
+
+ if ($auth->hasIdentity())
+ return true;
+ else
+ return false;
+ }
+}
\ No newline at end of file
Added: website/application/views/helpers/getUser.php
===================================================================
--- website/application/views/helpers/getUser.php (rev 0)
+++ website/application/views/helpers/getUser.php 2009-03-01 16:23:15 UTC (rev 514)
@@ -0,0 +1,14 @@
+<?php
+
+class Acm_View_Helper_getUser extends Zend_View_Helper_Abstract
+{
+ public function getUser()
+ {
+ $auth = Zend_Auth::getInstance();
+
+ if ($auth->hasIdentity())
+ return $auth->getIdentity();
+ else
+ return NULL;
+ }
+}
\ No newline at end of file
Property changes on: website/application/views/scripts
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Property changes on: website/application/views/scripts/error
___________________________________________________________________
Added: tsvn:logminsize
+ 5
Added: website/application/views/scripts/error/error.phtml
===================================================================
--- website/application/views/scripts/error/error.phtml (rev 0)
+++ website/application/views/scripts/error/error.phtml 2009-03-01 16:23:15 UTC (rev 514)
@@ -0,0 +1,14 @@
+<h1>An error occurred</h1>
+<h2><?= $this->msg ?></h2>
+<? if ('development' == $this->env): ?>
+<h3>Exception information:</h3>
+ <p>
+ <b>Message:</b> <?= ($this->exception ? $this->exception->getMessage() : ($this->other_message ? $this->other_message : $this->translate("unknownError"))) ?>
+ </p>
+
+ <h3>Stack trace:</h3>
+ <pre><?= ($this->exception ? $this->exception->getTraceAsString() : "") ?></pre>
+
+ <h3>Request Parameters:</h3>
+ <pre><? var_dump($this->request->getParams()) ?></pre>
+<? endif ?>
Added: website/application/views/scripts/logedin.phtml
===================================================================
--- website/application/views/scripts/logedin.phtml (rev 0)
+++ website/application/views/scripts/logedin.phtml 2009-03-01 16:23:15 UTC (rev 514)
@@ -0,0 +1,4 @@
+<div class="box2 c">
+ <h2><?= $this->translate('user_menu') ?></h2>
+ <a href="<?= $this->url(array('module' => 'default', 'controller' => 'index', 'action' => 'logout'), null, true) ?>"><?= $this->translate('log_out') ?></a>
+</div>
\ No newline at end of file
Added: website/application/views/scripts/paginator.phtml
===================================================================
--- website/application/views/scripts/paginator.phtml (rev 0)
+++ website/application/views/scripts/paginator.phtml 2009-03-01 16:23:15 UTC (rev 514)
@@ -0,0 +1,30 @@
+<?php if ($this->pageCount): ?>
+<div class="paginationControl">
+<!-- Previous page link -->
+<?php if (isset($this->previous)): ?>
+ <a href="<?= $this->url(array('page' => $this->previous)); ?>">
+ < Previous
+ </a> |
+<?php else: ?>
+ <span class="disabled">< Previous</span> |
+<?php endif; ?>
+
+<!-- Numbered page links -->
+<?php foreach ($this->pagesInRange as $page): ?>
+ <?php if ($page != $this->current): ?>
+ <a href="<?= $this->url(array('page' => $page)); ?>"><?= $page; ?></a> |
+ <?php else: ?>
+ <?= $page; ?> |
+ <?php endif; ?>
+<?php endforeach; ?>
+
+<!-- Next page link -->
+<?php if (isset($this->next)): ?>
+ <a href="<?= $this->url(array('page' => $this->next)); ?>">
+ Next >
+ </a>
+<?php else: ?>
+ <span class="disabled">Next ></span>
+<?php endif; ?>
+</div>
+<?php endif; ?>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|