Changeset 848 for trunk


Ignore:
Timestamp:
Aug 21, 2005, 11:23:17 PM (19 years ago)
Author:
plg
Message:
  • modification : adaptation of template variables and blocks in comments page to display comment by comment instead of picture by picture.
  • [template cclear] comments.tpl copied and adapted from template default. Return to home new icon. As asked by chrisaga, special id #commentsPage in comments.tpl to set the #content margin-left to 0 (since no #menubar to display).
  • [template cclear] FORM.filter rules taken from template default (these rules have been written some time ago by yoDan.
  • [template cclear] bug fixed on #theImage : display:block must be used only on IMG and not on the P>A (yes, in BSF you can have HTML in picture and categories descriptions)
Location:
trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/comments.php

    r801 r848  
    426426   
    427427    $template->assign_block_vars(
    428       'picture.comment',
     428      'comment',
    429429      array(
    430         'COMMENT_AUTHOR' => $author,
    431         'COMMENT_DATE'=>format_date($comment['date'],'mysql_datetime',true),
    432         'COMMENT'=>parse_comment_content($comment['content']),
     430        'U_PICTURE' => add_session_id($url),
     431        'TN_SRC' => $thumbnail_src,
     432        'AUTHOR' => $author,
     433        'DATE'=>format_date($comment['date'],'mysql_datetime',true),
     434        'CONTENT'=>parse_comment_content($comment['content']),
    433435        ));
    434436  }
  • trunk/doc/ChangeLog

    r839 r848  
     12005-08-21 Pierrick LE GALL
     2
     3        * modification : adaptation of template variables and blocks in
     4        comments page to display comment by comment instead of picture by
     5        picture.
     6
    172005-08-20 Pierrick LE GALL
    28
  • trunk/template/cclear/admin/comments.tpl

    r842 r848  
    11<h2>{lang:User comments validation}</h2>
    22
    3 <form method="post" action="{F_ACTION}" id="comment">
     3<form method="post" action="{F_ACTION}">
    44
    55  <input type="hidden" name="list" value="{LIST}" />
  • trunk/template/cclear/comments.tpl

    r820 r848  
    1 <!-- BEGIN title -->
    2 <h2>{L_COMMENT_TITLE}</h2>
    3 <!-- END title -->
    4 <!-- TODO -->
    5 <div class="admin">
    6       [
    7       <!-- BEGIN last_day_option -->
    8       <a class="admin" href="{last_day_option.U_OPTION}" style="{last_day_option.T_STYLE}">{last_day_option.OPTION}</a>{T_SEPARATION}
    9       <!-- END last_day_option -->
    10       {L_COMMENT_STATS}
    11       ]
    12           <!-- BEGIN title -->
    13       [ <a class="admin" href="{U_HOME}" title="{L_COMMENT_RETURN_HINT}">{L_COMMENT_RETURN}</a> ]
    14           <!-- END title -->
    15 </div>
    16 <!-- BEGIN validation -->
    17 <form action="{F_ACTION}" method="post">
    18 <!-- END validation -->
     1<div id="commentsPage">
    192
    20 <!-- BEGIN picture -->
    21 <div class="commentTitle">{picture.TITLE_IMG}</div>
     3<div id="content">
    224
    23 <div style="margin-left:auto;margin-right:auto;text-align:center;">
    24   <a href="{picture.U_THUMB}" title="{picture.TITLE_IMG}"><img src="{picture.I_THUMB}" class="thumbLink" alt="{picture.THUMB_ALT_IMG}"/></a>
     5  <div class="titrePage">
     6    <ul class="categoryActions">
     7      <li><a href="{U_HOME}" title="{lang:return to homepage}"><img src="./template/cclear/theme/home.png" alt="{lang:home}"/></a></li>
     8    </ul>
     9    <h2>{lang:User comments}</h2>
     10  </div>
     11
     12<form class="filter" action="{F_ACTION}" method="get">
     13
     14  <fieldset>
     15    <legend>{lang:Filter}</legend>
     16
     17    <label>{lang:Keyword}<input type="text" name="keyword" value="{F_KEYWORD}" /></label>
     18
     19    <label>{lang:Author}<input type="text" name="author" value="{F_AUTHOR}" /></label>
     20
     21    <label>
     22      {lang:Category}
     23      <select name="cat">
     24        <!-- BEGIN category -->
     25        <option class="{category.CLASS}" {category.SELECTED} value="{category.VALUE}">{category.OPTION}</option>
     26        <!-- END category -->
     27      </select>
     28    </label>
     29
     30    <label>
     31      {lang:Since}
     32      <select name="since">
     33        <!-- BEGIN since_option -->
     34        <option {since_option.SELECTED} value="{since_option.VALUE}">{since_option.CONTENT}</option>
     35        <!-- END since_option -->
     36      </select>
     37    </label>
     38
     39  </fieldset>
     40
     41  <fieldset>
     42
     43    <legend>{lang:Display}</legend>
     44
     45    <label>
     46      {lang:Sort by}
     47      <select name="sort_by">
     48        <!-- BEGIN sort_by_option -->
     49        <option value="{sort_by_option.VALUE}" {sort_by_option.SELECTED} >{sort_by_option.CONTENT}</option>
     50        <!-- END sort_by_option -->
     51      </select>
     52    </label>
     53
     54    <label>
     55      {lang:Sort order}
     56      <select name="sort_order">
     57        <!-- BEGIN sort_order_option -->
     58        <option value="{sort_order_option.VALUE}" {sort_order_option.SELECTED} >{sort_order_option.CONTENT}</option>
     59        <!-- END sort_order_option -->
     60      </select>
     61    </label>
     62
     63    <label>
     64      {lang:Number of items}
     65      <select name="items_number">
     66        <!-- BEGIN items_number_option -->
     67        <option value="{items_number_option.VALUE}" {items_number_option.SELECTED} >{items_number_option.CONTENT}</option>
     68        <!-- END items_option -->
     69      </select>
     70    </label>
     71
     72  </fieldset>
     73
     74  <input type="submit" name="submit" value="{lang:Filter and display}" />
     75
     76</form>
     77
     78<div class="navigationBar">{NAVBAR}</div>
     79
     80<div id="comments">
     81
     82  <!-- BEGIN comment -->
     83  <div class="comment">
     84    <a class="illustration" href="{comment.U_PICTURE}"><img src="{comment.TN_SRC}" /></a>
     85    <p class="commentHeader"><span class="author">{comment.AUTHOR}</span> - <span class="date">{comment.DATE}</span></p>
     86    <blockquote>{comment.CONTENT}</blockquote>
     87    <hr class="separation">
     88  </div>
     89
     90  <!-- END comment -->
     91
    2592</div>
    2693
    27 <!-- BEGIN comment -->
    28 <div class="userCommentHeader">
    29   <!-- BEGIN validation -->
    30   <p class="userCommentDelete">
    31     <input type="checkbox" name="comment_id[]" value="{picture.comment.validation.ID}" {picture.comment.validation.CHECKED} />
    32   </p>
    33   <!-- END validation -->
    34   <strong>{picture.comment.COMMENT_AUTHOR}</strong> - {picture.comment.COMMENT_DATE}
    35 </div>
     94</div> <!-- content -->
    3695
    37 <blockquote>{picture.comment.COMMENT}</blockquote>
    38 <!-- END comment -->
    39 <!-- END picture -->
    40 
    41 <!-- BEGIN validation -->
    42 <div align="center">
    43 <input type="submit" name="validate" class="bouton" value="{L_VALIDATE}" />
    44 <input type="submit" name="delete" class="bouton" value="{L_DELETE}" />
    45 </div>
    46 </form>
    47 <!-- END validation -->
     96</div> <!-- commentsPage -->
  • trunk/template/cclear/content.css

    r845 r848  
    44    margin-right: 1em;
    55    margin-bottom: 1em; /* when it's longer than menu bar */
     6}
     7
     8#commentsPage #content {
     9  margin: 1em;
    610}
    711
     
    97101ul.categoryActions {
    98102  text-align: center;
    99   margin: 0;
     103  margin: 1px 1px 0 0;
    100104  padding: 0;
    101105  text-indent: 0;
     
    114118}
    115119
     120/* User comments */
     121
     122#content DIV.comment {
     123  margin: 5px;
     124  border: 1px solid gray;
     125}
     126
     127#content DIV.comment > A.illustration {
     128  display: block;
     129  float: left;
     130  margin: 5px;
     131}
     132
     133#content DIV.comment > A.illustration IMG {
     134  border: 1px solid gray;
     135}
     136
     137#content DIV.comment P.commentHeader {
     138  text-align: right;
     139  margin: 0.5em 0.5em 0 0;
     140}
     141
     142#content DIV.comment UL.actions {
     143  text-align: center;
     144  margin: 0.2em;
     145  clear: left;
     146}
     147
     148#content DIV.comment > UL.actions > LI {
     149  display: inline;
     150}
     151
     152#content DIV.comment BLOCKQUOTE {
     153  margin: 1em 1em 1em 150px; /* margin-left corresponds to maximum thumbnail width */
     154  border: 1px solid #d3d3d3;
     155  border-left: 2px solid gray;
     156  padding: 0.5em;
     157}
  • trunk/template/cclear/default-layout.css

    r847 r848  
    177177
    178178form#cat_modify table { width: auto; }
     179
     180/**
     181 * Filter forms are displayed label by label with the input (or select...)
     182 * below the label
     183 */
     184FORM.filter FIELDSET {
     185  padding: 10px;
     186}
     187
     188FORM.filter FIELDSET LABEL {
     189  display: block;
     190  float: left;
     191  width: auto;
     192  margin-right: 10px;
     193  padding: 0;
     194}
     195
     196FORM.filter>FIELDSET>LABEL>INPUT, FORM.filter>FIELDSET>LABEL>SELECT {
     197  display: block;
     198}
     199
     200FORM.filter FIELDSET P, FORM.filter FIELDSET>INPUT {
     201  clear: left;
     202  display: block;
     203}
     204
     205FORM.filter FIELDSET {
     206  border: 1px solid gray;
     207}
     208
     209FORM.filter FIELDSET + INPUT {
     210  margin-top: 10px;
     211}
  • trunk/template/cclear/image.css

    r847 r848  
    5959}
    6060
    61 #theImage * {
     61#theImage>IMG {
    6262    display: block;
    6363    margin: 0 auto;
Note: See TracChangeset for help on using the changeset viewer.