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

Changeset 13013


Ignore:
Timestamp:
Oct 16, 2009, 7:31:19 PM (13 years ago)
Author:
imamura623
Message:

#3236:コードのシンプル化、pc_page_h_album_image_insert_dialogの並び順変更

Location:
OpenPNE/branches/stable-2.14.x/webapp
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/stable-2.14.x/webapp/lib/db/album.php

    r13006 r13013  
    111111 *
    112112 * @param   int   $c_album_id
    113  * @param   bool  $desc
     113 * @param   int   $page
     114 * @param   int   $page_size
     115 * @param   bool  $desc 並び順を投稿日時の降順にするかどうか(0 or 1)
    114116 * @return  array
    115117 */
     
    117119{
    118120    $sql = 'SELECT * FROM c_album_image WHERE c_album_id = ? ORDER BY c_album_image_id';
    119     if ($desc == 1 ) {
     121    if ($desc) {
    120122        $sql .= ' DESC';
    121123    }
  • OpenPNE/branches/stable-2.14.x/webapp/modules/ktai/page/fh_album_image_list.php

    r13006 r13013  
    7272        // メンバー情報
    7373        $this->set('target_member', $target_c_member);
    74        
     74
    7575        // 写真の順番を入れ替える
    7676        $this->set('desc', $desc);
  • OpenPNE/branches/stable-2.14.x/webapp/modules/ktai/templates/fh_album_image_list.tpl

    r13006 r13013  
    2727</form>
    2828
    29 ({if $desc == 0})
    30 <a href="({t_url m=ktai a=page_fh_album_image_list})&amp;target_c_album_id=({$album_info.c_album_id})&amp;page=1&amp;is_thumbnail=({$is_thumbnail})&amp;desc=1&amp;({$tail})">写真を新しい順に並べ替える</a>
    31 ({else $desc == 1})
    32 <a href="({t_url m=ktai a=page_fh_album_image_list})&amp;target_c_album_id=({$album_info.c_album_id})&amp;page=1&amp;is_thumbnail=({$is_thumbnail})&amp;desc=0&amp;({$tail})">写真を古い順に並べ替える</a>
     29({if !$desc})
     30<a href="({t_url m=ktai a=page_fh_album_image_list})&amp;target_c_album_id=({$album_info.c_album_id})&amp;is_thumbnail=({$is_thumbnail})&amp;desc=1&amp;({$tail})">写真を新しい順に並べ替える</a>
     31({else})
     32<a href="({t_url m=ktai a=page_fh_album_image_list})&amp;target_c_album_id=({$album_info.c_album_id})&amp;is_thumbnail=({$is_thumbnail})&amp;desc=0&amp;({$tail})">写真を古い順に並べ替える</a>
    3333({/if})
    3434
  • OpenPNE/branches/stable-2.14.x/webapp/modules/pc/page/fh_album.php

    r13006 r13013  
    7575        //アルバムに登録された写真の順番を切り替える変数
    7676        $this->set('desc', $desc);
    77          
     77
    7878        //アルバムに登録された写真
    7979        list($list, $is_prev, $is_next, $total_num) =
  • OpenPNE/branches/stable-2.14.x/webapp/modules/pc/page/h_album_image_insert_dialog.php

    r6775 r13013  
    1818        $target_c_album_id = $requests['target_c_album_id'];
    1919        $page = $requests['page'];
     20        $desc = $requests['desc'];
    2021        // ----------
    2122
     
    3334        $this->set("target_member", db_member_c_member4c_member_id($target_c_member_id));
    3435
    35         $target_c_album_image = db_album_c_album_image_list4c_album_id($target_c_album_id, $page, $page_size);
     36        $target_c_album_image = db_album_c_album_image_list4c_album_id($target_c_album_id, $page, $page_size, $desc);
    3637        $this->set("target_album_image", $target_c_album_image[0]);
    3738        $this->set('is_prev', $target_c_album_image[1]);
  • OpenPNE/branches/stable-2.14.x/webapp/modules/pc/templates/fh_album.tpl

    r13006 r13013  
    7070<div class="dparts albumImageList"><div class="parts">
    7171<div class="partsHeading"><h3>写真一覧</h3>
    72 ({if $desc == 0})
    73 <p class="link"><a href="({t_url m=pc a=page_fh_album})&amp;page=1&amp;target_c_album_id=({$target_c_album_id})&amp;desc=1">新しい順に並べ替える</a></p>
    74 ({else $desc == 1})
    75 <p class="link"><a href="({t_url m=pc a=page_fh_album})&amp;page=1&amp;target_c_album_id=({$target_c_album_id})&amp;desc=0">古い順に並べ替える</a></p>
     72({if !$desc})
     73<p class="link"><a href="({t_url m=pc a=page_fh_album})&amp;target_c_album_id=({$target_c_album_id})&amp;desc=1">新しい順に並べ替える</a></p>
     74({else})
     75<p class="link"><a href="({t_url m=pc a=page_fh_album})&amp;target_c_album_id=({$target_c_album_id})&amp;desc=0">古い順に並べ替える</a></p>
    7676({/if})
    7777</div>
  • OpenPNE/branches/stable-2.14.x/webapp/modules/pc/validate/page/h_album_image_insert_dialog.ini

    r6774 r13013  
    88default = 1
    99min = 1
     10
     11[desc]
     12type = "bool"
     13default = 1
Note: See TracChangeset for help on using the changeset viewer.