diff --git a/application/modules/blog/views/scripts/index/latest.phtml b/application/modules/blog/views/scripts/index/latest.phtml index 908109f..f3b926a 100644 --- a/application/modules/blog/views/scripts/index/latest.phtml +++ b/application/modules/blog/views/scripts/index/latest.phtml @@ -6,13 +6,15 @@ posts); for ($i = 0; $i < $postCount; $i++): -$post = $this->posts[$i]; + + $post = $this->posts[$i]; ?>

getTitle() ?>

getPubDate()->toString('yyyy-MM-dd').' at '.$post->getPubDate()->toString('HH:mm').' '.$post->getAuthor()->getFirstName() ?>
getContent() ?>
+
getTags()) ?>
diff --git a/application/modules/default/controllers/ProfileController.php b/application/modules/default/controllers/ProfileController.php index a71eaec..4514bb6 100644 --- a/application/modules/default/controllers/ProfileController.php +++ b/application/modules/default/controllers/ProfileController.php @@ -2,6 +2,11 @@ class ProfileController extends Fiktiv_Controller_Action { + public function preDispatch() { + if (!Zend_Auth::getInstance()->hasIdentity()) + $this->_redirect('/'); + } + public function indexAction() { @@ -22,6 +27,21 @@ class ProfileController extends Fiktiv_Controller_Action 'validators' => array(new Zend_Validate_Alpha()) )); + $options = array( + User::AVATAR_NONE => 'Ingen avatar', + User::AVATAR_FIKTIV => 'Egen avatar', + User::AVATAR_GRVTAR => 'Gravatar' + ); + $form->addElement('select', 'avatar', array( + 'label' => 'u:avatar type', + 'validators' => array(new Zend_Validate_InArray($options)), + 'multiOptions' => $options + )); + + $form->addElement('file', 'avatarImage', array( + 'label' => 'Upload avatar' + )); + $form->addElement('password', 'password', array( 'label' => 'u:password', 'validators' => array(new Zend_Validate_Alnum()) @@ -48,12 +68,23 @@ class ProfileController extends Fiktiv_Controller_Action ) ); + $form->addDisplayGroup( + array( + 'avatar', + 'avatarImage', + ), + 'partTwo', + array( + 'legend' => 'u:avatar' + ) + ); + $form->addDisplayGroup( array( 'password', 'passwordConfirm' ), - 'partTwo', + 'partThree', array( 'legend' => 'u:change password' ) @@ -87,6 +118,7 @@ class ProfileController extends Fiktiv_Controller_Action unset($data['password']); } + unset($data['passwordConfirm']); unset($data['save']); diff --git a/application/modules/default/views/scripts/index/index.phtml b/application/modules/default/views/scripts/index/index.phtml index 68d738c..70dcbd8 100644 --- a/application/modules/default/views/scripts/index/index.phtml +++ b/application/modules/default/views/scripts/index/index.phtml @@ -44,3 +44,12 @@ function get_gravatar( $email, $s = 80, $d = '404', $r = 'g', $img = false, $att bbb + + + 'Kalle', 'lastName' => 'Andersson')); + +$user->save(); + +?> \ No newline at end of file diff --git a/public/css/default.css b/public/css/default.css index e7ead89..a486d98 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -250,3 +250,21 @@ div#agrement { #footer, #footer a { color: #999 } #footer a:hover { color: #333 } + + +ul.custom { + list-style-image: url(../img/ulli.png); + padding-left: 20px; +} + +ul.custom li.item { margin-bottom: 20px } + +ul.custom li.item h3 { + padding: 0 0 0 0; + margin: 0 0 0 0; +} + +ul.custom li.item p { + padding: 0; + margin: 0 0 0 10px; +} \ No newline at end of file