From: skodak Date: Wed, 13 Dec 2006 21:02:01 +0000 (+0000) Subject: xhtml and accessibility cleanup in data mod MDL-7813 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bb828644baa9909f9277295996a83d5f2739c921;p=moodle.git xhtml and accessibility cleanup in data mod MDL-7813 * buttons reorganized - now displayed only with templates where usable --- diff --git a/mod/data/lib.php b/mod/data/lib.php index fa308e9606..105d601960 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -358,8 +358,10 @@ function data_generate_default_template(&$data, $template, $recordid=0, $form=fa $str .= ''; } - if ($template != 'addtemplate' and $template != 'rsstemplate') { //if not adding, we put tags in there + if ($template == 'listtemplate') { $str .= '##edit## ##more## ##delete## ##approve##'; + } else if ($template == 'singletemplate') { + $str .= '##edit## ##delete## ##approve##'; } $str .= ''; diff --git a/mod/data/preset/imagegallery/listtemplate.html b/mod/data/preset/imagegallery/listtemplate.html index 73737e1b1f..8684de7403 100644 --- a/mod/data/preset/imagegallery/listtemplate.html +++ b/mod/data/preset/imagegallery/listtemplate.html @@ -2,7 +2,7 @@
- +
[[image]]
##edit## ##delete## ##approve##
##more## ##edit## ##delete## ##approve##
diff --git a/mod/data/preset/imagegallery/singletemplate.html b/mod/data/preset/imagegallery/singletemplate.html index 539ec5a01f..fd682c76d2 100644 --- a/mod/data/preset/imagegallery/singletemplate.html +++ b/mod/data/preset/imagegallery/singletemplate.html @@ -3,6 +3,6 @@

[[title]]

[[image]]
[[caption]] -##edit## ##more## ##delete## ##approve## +##edit## ##delete## ##approve## \ No newline at end of file diff --git a/mod/data/templates.php b/mod/data/templates.php index d87be18732..37bccb3b6c 100755 --- a/mod/data/templates.php +++ b/mod/data/templates.php @@ -220,12 +220,15 @@ if ($mode != 'addtemplate') { echo ''; echo ''; - echo ''; - echo ''; echo ''; echo ''; - echo ''; echo ''; + if ($mode != 'singletemplate') { + // more points to single template - not useable there + echo ''; + echo ''; + echo ''; + } echo ''; } echo '';