]> git.mjollnir.org Git - moodle.git/commitdiff
xhtml and accessibility cleanup in data mod MDL-7813
authorskodak <skodak>
Wed, 13 Dec 2006 21:02:01 +0000 (21:02 +0000)
committerskodak <skodak>
Wed, 13 Dec 2006 21:02:01 +0000 (21:02 +0000)
* buttons reorganized - now displayed only with templates where usable

mod/data/lib.php
mod/data/preset/imagegallery/listtemplate.html
mod/data/preset/imagegallery/singletemplate.html
mod/data/templates.php

index fa308e9606471dbe5deea3e1c478d282e88d824c..105d6019608d9857f6d78cd50c4bf6355468c13b 100755 (executable)
@@ -358,8 +358,10 @@ function data_generate_default_template(&$data, $template, $recordid=0, $form=fa
             $str .= '</td></tr>';
 
         }
-        if ($template != 'addtemplate' and $template != 'rsstemplate') {    //if not adding, we put tags in there
+        if ($template == 'listtemplate') {
             $str .= '<tr><td align="center" colspan="2">##edit##  ##more##  ##delete##  ##approve##</td></tr>';
+        } else if ($template == 'singletemplate') {
+            $str .= '<tr><td align="center" colspan="2">##edit##  ##delete##  ##approve##</td></tr>';
         }
 
         $str .= '</table>';
index 73737e1b1fa4abfdf8afc728da7ec920baa7fee2..8684de74039ecafa49ccb129c9bf47a0940acebb 100644 (file)
@@ -2,7 +2,7 @@
 <table class="pictureframe"><tr><td>
 <table class="picture">
 <tr><td><div class="listimage">[[image]]</div></td></tr>
-<tr><td align="right">##edit## ##delete## ##approve##</td></tr>
+<tr><td align="right">##more## ##edit## ##delete## ##approve##</td></tr>
 </table>
 </td></tr></table>
 </div>
index 539ec5a01f7ee8cba8cac0fbe780e13d9b21ad96..fd682c76d2381356f1d69faff3ea9e14ec56782c 100644 (file)
@@ -3,6 +3,6 @@
 <tr><td align="center"><h3>[[title]]</h3></td></tr>
 <tr><td align="center"><div id="singleimage">[[image]]</div></td></tr>
 <tr><td align="center"><span class="caption">[[caption]]</span></td></tr>
-<tr><td align="center">##edit##  ##more##  ##delete##  ##approve##</td></tr>
+<tr><td align="center">##edit##  ##delete##  ##approve##</td></tr>
 </table>
 </div>
\ No newline at end of file
index d87be18732d75bad645bd21dc7563bd035f2417f..37bccb3b6c7172edc612a30261495f27a007d5c4 100755 (executable)
         if ($mode != 'addtemplate') {
             echo '<optgroup label="'.get_string('buttons', 'data').'">';
             echo '<option value="##edit##">' .get_string('edit', 'data'). ' - ##edit##</option>';
-            echo '<option value="##more##">' .get_string('more', 'data'). ' - ##more##</option>';
-            echo '<option value="##moreurl##">' .get_string('moreurl', 'data'). ' - ##moreurl##</option>';
             echo '<option value="##delete##">' .get_string('delete', 'data'). ' - ##delete##</option>';
             echo '<option value="##approve##">' .get_string('approve', 'data'). ' - ##approve##</option>';
-            echo '<option value="##comments##">' .get_string('comments', 'data'). ' - ##comments##</option>';
             echo '<option value="##user##">' .get_string('user'). ' - ##user##</option>';
+            if ($mode != 'singletemplate') {
+                // more points to single template - not useable there 
+                echo '<option value="##more##">' .get_string('more', 'data'). ' - ##more##</option>';
+                echo '<option value="##moreurl##">' .get_string('moreurl', 'data'). ' - ##moreurl##</option>';
+                echo '<option value="##comments##">' .get_string('comments', 'data'). ' - ##comments##</option>';
+            }
             echo '</optgroup>';
         }
         echo '</select>';