ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 9525


Ignore:
Timestamp:
Dec 9, 2008, 10:08:25 PM (11 years ago)
Author:
ShogoKawahara
Message:

#3119:added application gallery

Location:
OpenPNE3/plugins/opOpenSocialPlugin/trunk
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/apps/pc_frontend/modules/application/actions/actions.class.php

    r9507 r9525  
    3838  }
    3939
    40   /**
    41    * Executes list action
    42    *
    43    * @param sfRequest $request A request object
    44    */
     40 /**
     41  * Executes list action
     42  *
     43  * @param sfRequest $request A request object
     44  */
    4545  public function executeList($request)
    4646  {
     
    6868    if (!$request->isMethod('post'))
    6969    {
    70       return $this->apps ? sfView::SUCCESS : sfView::ERROR;
     70      return sfView::SUCCESS;
    7171    }
    7272
     
    7575    if (!$this->form->isValid())
    7676    {
    77       return $this->apps ? sfView::SUCCESS : sfView::ERROR;
     77      return sfView::SUCCESS;
    7878    }
    7979    $contact = $this->form->getValues();
     
    8585    {
    8686      //TODO : add error action
    87       return $this->apps ? sfView::SUCCESS : sfView::ERROR;
     87      return sfView::SUCCESS;
    8888    }
    8989    $criteria = new Criteria();
     
    104104  }
    105105
    106   /**
    107    * Executes setting action
    108    *
    109    * @param sfRequest $request A request object
    110    */
     106 /**
     107  * Executes setting action
     108  *
     109  * @param sfRequest $request A request object
     110  */
    111111  public function executeSetting($request)
    112112  {
     
    149149  }
    150150
    151   /**
    152    * Executes js action
    153    *
    154    * @param sfRequest $request A request object
    155    */
     151 /**
     152  * Executes gallery action
     153  *
     154  * @param sfRequest $request A request object
     155  */
     156  public function executeGallery($request)
     157  {
     158    $criteria = new Criteria();
     159    $criteria->addDescendingOrderByColumn(ApplicationPeer::ID);
     160    $this->pager = new sfPropelPager('Application', 10);
     161    $this->pager->setCriteria($criteria);
     162    $this->pager->setPage($request->getParameter('page',1));
     163    $this->pager->init();
     164
     165    return sfView::SUCCESS;
     166  }
     167
     168 /**
     169  * Executes js action
     170  *
     171  * @param sfRequest $request A request object
     172  */
    156173  public function executeJs($request)
    157174  {
     
    161178  }
    162179
    163   /**
    164    * Executes sort application
    165    *
    166    * @param sfRequest $request A request object
    167    */
     180 /**
     181  * Executes sort application
     182  *
     183  * @param sfRequest $request A request object
     184  */
    168185  public function executeSortApplication($request)
    169186  {
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/apps/pc_frontend/modules/application/actions/components.class.php

    r9507 r9525  
    2323    $culture = $this->getUser()->getCulture();
    2424    $culture = split("_",$culture);
     25    $this->aid       = $app_id;
    2526    $this->height    = $app->getHeight() ? $app->getHeight() : 200;
    2627    $this->scrolling = $app->getScrolling();
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/apps/pc_frontend/modules/application/templates/_gadget.php

    r9511 r9525  
    44if ($isViewer)
    55{
    6   echo link_to("Settings","application/setting?mid=".$mid);
     6  echo link_to(__('Settings'),"application/setting?mid=".$mid);
    77}
    88else
    99{
    10   echo "add this application";
     10  echo link_to(__('Add this application'),"application/add?id=".$aid);
    1111}
    1212?></p>
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/apps/pc_frontend/modules/application/templates/listError.php

    r9070 r9525  
    1 <?php if (isset($form)) : ?>
    2 <?php include_box('form','アプリケーション追加','',array(
    3   'form' => array($form),
    4   'url' => 'application/list',
    5   'button' => 'add'
    6 )) ?>
    7 <?php endif ?>
    8 <?php echo include_box('ApplicationListError','Application List','No application.');
     1<?php echo include_box('ApplicationListError','Application List Error','アプリケーションの追加に失敗しました。');
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/apps/pc_frontend/modules/application/templates/listSuccess.php

    r9471 r9525  
    22<?php use_helper('OpenSocial') ?>
    33<?php if ($isOwner) : ?>
     4<?php echo link_to(__('Application Gallery'), 'application/gallery') ?>
    45<?php include_box('form','アプリケーション追加','',array(
    56  'form' => array($form),
     
    89)) ?>
    910<?php endif ?>
     11<?php if (isset($apps) && count($apps)) : ?>
    1012<div id="order">
    1113<?php foreach ($apps as $app) : ?>
    1214<?php include_application_information_box(
    1315  'item_'.$app->getApplication()->getId(),
     16  $app->getApplication()->getId(),
    1417  $app->getId(),
    1518  $isOwner,
     
    3134));
    3235} ?>
     36<?php else: ?>
     37<?php include_box('ApplicationListError','Application List Error','No application.') ?>
     38<?php endif ?>
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/apps/pc_frontend/templates/_applicationInformationBox.php

    r9471 r9525  
    77
    88<div class="partsHeading">
    9 <h3><?php echo link_to($title, 'application/canvas?mid='.$mid) ?></h3>
     9<h3>
     10<?php if ($mid) : ?>
     11<?php echo link_to($title, 'application/canvas?mid='.$mid) ?>
     12<?php else : ?>
     13<?php echo $title ?>
     14<?php endif ?>
     15</h3>
    1016</div>
    1117
     
    2531<div class="app_author">
    2632<?php if (!empty($author_email)) : ?>
    27 Author: <?php echo mail_to($author_email, $author, array('encode' => true)) ?>
     33<?php echo __('Author') ?>: <?php echo mail_to($author_email, $author, array('encode' => true)) ?>
    2834<?php else : ?>
    29 Author: <?php echo $author ?>
     35<?php echo __('Author') ?>: <?php echo $author ?>
    3036<?php endif; ?>
    3137</div>
     
    3541
    3642<div class="app_option" style="float:right;padding-right:5px;">
    37 Sample
     43<ul>
     44<?php if($is_owner) : ?>
     45<li><?php echo link_to(__('Settings'), 'application/setting?mid='.$mid); ?></li>
     46<li><?php echo link_to(__('Remove'), 'application/remove?mid='.$mid); ?></li>
     47<?php else : ?>
     48<?php echo link_to(__('Add this application'), 'application/add?id='.$aid) ?>
     49<?php endif ?>
    3850</div>
    3951
  • OpenPNE3/plugins/opOpenSocialPlugin/trunk/lib/helper/OpenSocialHelper.php

    r9471 r9525  
    88 */
    99
    10 function include_application_information_box($id, $mid, $is_owner, $title = '', $description = '', $thumbnail = '', $author = '', $author_email = '')
     10function include_application_information_box($id, $aid, $mid = 0, $is_owner = false , $title = '', $description = '', $thumbnail = '', $author = '', $author_email = '')
    1111{
    1212  $params = array(
    1313    'id'          => $id,
     14    'aid'         => $aid,
    1415    'mid'         => $mid,
    1516    'is_owner'    => $is_owner,
Note: See TracChangeset for help on using the changeset viewer.