Weekly Multi-Room View.
Brought to you by:
jberanek
I'd like to have the option of generating a weekly view that on the vertical column shows the day of the week and the horizontal row shows the rooms. Similar to how the yearly calendar just lists the times they're scheduled off to the side. I'm likely going to try to get this working myself after I creep through the code a bit more. I was just wondering if this is something you guys had thought about attempting or had an easy way for me to do it?
DO NOT USE - Feature Requests: #275
I created a page like, this, but left off the links to allow editing of meetings. We use it to print a copy of the weekly schedule. The screen shot shows what it looks like.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
Your code is amazing! Thank you. May I ask:
1) How do you get some of the bookings in bold?
2) How you get vertical line between rooms down through the days?
see attached screenshot of our version
Last edit: Anonymous 2017-11-15
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
Hello Woodroffe UC Webmaster,
do you have your code somewhere available?
Thank you
Michal K.
Here is the code for the weekly summary report (week_summary.php).
This page is called from a link I've added to week.php, of course, with appropriate styles added to css/mrbs.css.php:
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
Hello Woodroffe UC Webmaster,
The above is exactly what I've been looking for, so thank you for creating this - and for sharing. I've tried the instructions above, and the link appears on the week view page, but when you click it, it returns a fatal error saying the database is not available at the moment - is there something else I should be changing somewhere? I hope you get to see this as your post is obviously almost two years ago.
Many thanks again.
Rob.
Hi Rob,
The problem will be that I have a custom field
real_start_timein the SQL on line 165 of weekly_summary.php. The SQL error triggers the 'database not available' error message.You will have to remove all references to this field in the code. If that is a problem, let me know and I'll revise the code.
Jamie
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
Hi Jamie,
Thanks for the response. I've just tried to remove the appropriate code, but I'm not a SQL guy, so I still can't get it to work - If you could revise it, I'd be REALLY greatful thanks.
Rob.
Here is the generic version. It will not work for installations that use periods. It also ignores Area and will try to show all rooms (I think).
Jamie
Thank you sir for this amazing extra page. I am on times not periods but my week.php print summary returns a blank page. Any ideas?
http://www.addlestonecommunityassociation.org/mrbs-1.6.1/web/week.php?year=2017&month=06&day=08&area=1&room=1
http://www.addlestonecommunityassociation.org/mrbs-1.6.1/web/week_summary.php?year=2017&month=6&day=8&area=1&room=1
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
That week_summary.php is for an earlier version of MRBS.
This attached version works for me on MRBS 1.6.1
Be sure to change the file name to match your installation.
Last edit: Woodroffe UC Webmaster 2017-06-29
That is very kind of you Sir, I am so grateful. It worked first time. Bless you.
Just one thing - the day and date seem to be 24 hours out. The header shows the correct date but the calendar is shows the following day for the relevant date. Perhaps the calendar is a year ahead?
http://www.addlestonecommunityassociation.org/mrbs-1.6.1/web/week_summary.php?year=2017&month=6&day=30&area=1&room=1
or see attached picture
Last edit: Lance Jones 2017-06-30
Sorry about that. This is not our production version yet. This one fixes the problem.
However, it seems to put some bookings on the wrong day for me. I'll look at it later today.
Last edit: Woodroffe UC Webmaster 2017-06-30
Thank you Sir
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
Thats great. But: Translation of days is not working. How can i change this?
Do you mean that the day names are not in the correct language? The names come from the PHP date function, which follows the default locale for your server. They should be the same names shown elsewhere in MRBS as far as I can see.
Unfortunately date() doesn't respect locales and everything comes out in English. The rest of MRBS uses strftime(), or rather the MRBS function utf8_strfime() which wraps the standard PHP function in a multi-byte safe wrapper.
Thanks. We are spoiled, working in English. I've modified week_summary to use utf8_strftime. I'll plan to stay with the MRBS standard approach for any future modifications.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
Your code is amazing! Thank you. May I ask:
1) How do you get some of the bookings in bold?
2) How you get vertical line between rooms down through the days?
I can't find it in the css
Each booking listing is wrapped in
<span class=sum_x> ... </span>so you can add styles in mrbs.css.php likespan.sum_I {font-weight: bold;}to make all of the entries with type I bold (or any other block styling you want)
Even better would be to put any changes you want to make in a custom CSS file (see systemdefaults.inc.php for how). That way they will survive a release upgrade.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
What additions did you make to mrbs.css.php?
Thank you
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
I am sorry to be annoying but I am really struggling with some code and I would be ever so grateful if one of you fine gentlemen could help me. I am trying to make vertical grey column lines on the weekly Summary and I think I need to insert some code for border-left inside the table. I have tried all sorts of things like:
But that doesn;t really help. I think I should be making an edit to mrbs.css but I don't know.
Can anyone help me?
This is a link to the page:
http://www.addlestonecommunityassociation.org/mrbs-1.6.1/web/week_summary.php?year=2017&month=11&day=17&area=1&room=1
And the weekly summary code is:
You should not add any styling code to the line that displays the cells. The default borders for your MRBS theme are used to show the lines (or not).
In Themes/default/styling.inc, line 29 sets the vertical border colours for the main table. In the default theme, this is provided 'out of the box' as:
$main_table_body_v_border_color = $body_background_color;i.e. the borders are not visible.
I suggest you change this to:
$main_table_body_v_border_color = "#ffffff";Then it will match the horizontal lines.
There were two extra lines in week_summary-1.6.1b.php (that did not cause any problem but may lead to PHP warnings) and I've removed them in this version.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "DO NOT USE - Feature Requests"
Thank you so much for all your help. You guys are truly amazing and incredibly patient with folk such as me.