[Isocial-svn] SF.net SVN: isocial: [244] app
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <fsn...@us...> - 2008-06-20 15:13:23
|
Revision: 244 http://isocial.svn.sourceforge.net/isocial/?rev=244&view=rev Author: fsnobody Date: 2008-06-20 08:13:32 -0700 (Fri, 20 Jun 2008) Log Message: ----------- step by step, blog is coming (design list , view) Modified Paths: -------------- app/controllers/blogapp/post_controller.php app/views/blogapp/post/_menu.tpl app/views/blogapp/post/index.tpl Added Paths: ----------- app/views/blogapp/post/view.tpl Modified: app/controllers/blogapp/post_controller.php =================================================================== --- app/controllers/blogapp/post_controller.php 2008-06-20 12:56:44 UTC (rev 243) +++ app/controllers/blogapp/post_controller.php 2008-06-20 15:13:32 UTC (rev 244) @@ -19,6 +19,19 @@ } } + function view () { + $post = $this->BlogappPost->find($this->params['id']); + if ($this->current_user->getId() == $post->user_id ){ + $post->media_item->load(); + $post->attachments = $post->attachment->load(); + foreach ($post->attachments as $k => $attach) { + $attach->stored_file->load(); + } + $this->post = $post; + } + + } + function create () { if (!empty($this->params['post']) && $this->Request->isPost() ){ $post = $this->BlogappPost; Modified: app/views/blogapp/post/_menu.tpl =================================================================== --- app/views/blogapp/post/_menu.tpl 2008-06-20 12:56:44 UTC (rev 243) +++ app/views/blogapp/post/_menu.tpl 2008-06-20 15:13:32 UTC (rev 244) @@ -2,7 +2,7 @@ <div class="left"> <ul class="toggle_tabs"> <li class="first"><a href="/blogapp" class="<?= $controller->getActionName() == 'index' ? 'selected' : '' ?>">_{My Posts}</a></li><? - ?><li><a href="/blogapp" class="<?= in_array($controller->getActionName(), array('edit', 'create')) ? 'selected' : '' ?>">_{Edit / Create Post}</a></li><? + ?><li><a href="/blogapp" class="<?= in_array($controller->getActionName(), array('view', 'edit', 'create')) ? 'selected' : '' ?>">_{Edit / Create Post}</a></li><? ?><li><a href="/blogapp" class="last <?= $controller->getActionName() == 'smth' ? 'selected' : '' ?>">_{Smth}</a></li> </ul> </div> Modified: app/views/blogapp/post/index.tpl =================================================================== --- app/views/blogapp/post/index.tpl 2008-06-20 12:56:44 UTC (rev 243) +++ app/views/blogapp/post/index.tpl 2008-06-20 15:13:32 UTC (rev 244) @@ -36,7 +36,7 @@ </div> </div> <div class="clearfix"></div> - <div class="info">Автор:Капитолина Блоговая | Комментарии (7) | Комментировать</div> + <div class="info">Автор: OWNER | Комментарии (7) | Комментировать</div> </div> {end} </div> Added: app/views/blogapp/post/view.tpl =================================================================== --- app/views/blogapp/post/view.tpl (rev 0) +++ app/views/blogapp/post/view.tpl 2008-06-20 15:13:32 UTC (rev 244) @@ -0,0 +1,24 @@ +<?= $controller->renderPartial("menu") ?> + +<?= $controller->renderErrors() ?> + +<div class="container"> + + <div class="post_item"> + <div class="title"><?= $post->media_item->get('title');?> + <div class="created"><?= $post->media_item->created_at;?></div> + </div> + <div class="clearfix"></div> + <div class="body"> + <div class="text"> + <?= $post->media_item->get('body');?> + </div> + + </div> + <div class="clearfix"></div> + <div class="info">Автор: OWNER | Комментарии (7) | Комментировать</div> + </div> + +</div> + +<div class="clearfix"></div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |