Changeset:
2460a8438b54
https://sourceforge.net/p/mrbs/hg-code/ci/2460a8438b54aef3f5184f83fa89a05452b88775
Author:
Campbell Morrison <[email protected]>
Date:
Thu Jul 07 16:01:54 2016 +0100
Log message:
Removed type from view_entry if there are fewer than two booking types.
diffstat:
web/functions_view.inc | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r ccbec44d3779 -r 2460a8438b54 web/functions_view.inc
--- a/web/functions_view.inc Thu Jul 07 15:57:02 2016 +0100
+++ b/web/functions_view.inc Thu Jul 07 16:01:54 2016 +0100
@@ -40,7 +40,7 @@
global $is_private_field, $standard_fields;
global $strftime_format;
global $tbl_entry;
- global $select_options;
+ global $select_options, $booking_types;
// Get the duration if we haven't got it already
if (!isset($data['duration']))
@@ -142,9 +142,12 @@
}
$tbody .= create_details_row(get_vocab("end_date"), $end_date, $as_html);
// Type
- $type = get_type_vocab($data['type']);
- $value = (empty($type)) ? "?${data['type']}?" : $type;
- $tbody .= create_details_row(get_vocab("type"), $value, $as_html);
+ if (count($booking_types) > 1)
+ {
+ $type = get_type_vocab($data['type']);
+ $value = (empty($type)) ? "?${data['type']}?" : $type;
+ $tbody .= create_details_row(get_vocab("type"), $value, $as_html);
+ }
// Created by
$class = ($keep_private && !empty($is_private_field['entry.create_by'])) ?
"private" : "";
$tbody .= create_details_row(get_vocab("createdby"), $data['create_by'],
$as_html, $class);
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits