Skip to content

Commit

Permalink
Merge pull request #17 from radius314/helpline-volunteers-beta
Browse files Browse the repository at this point in the history
passing in service body ids
  • Loading branch information
dgershman authored Feb 10, 2018
2 parents 7859e19 + 1fb551a commit 52cd9ba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ You can also supply a list of volunteers in a BMLT server.
Some additional details on this:

- If you specify only one day of a volunteer shift, it will be assumed re-occuring
- You can visualize the shift schedule by going to http://example.com/yap/schedule.html (for example)
- You can visualize the shift schedule by going to http://example.com/yap/schedule.html?service_body_id= (pass in the service body id)

## Contribute

Expand Down
13 changes: 12 additions & 1 deletion schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
<script src='http://code.jquery.com/jquery-1.11.3.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.1/moment.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.0/fullcalendar.min.js'></script>
<script type="text/javascript">
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
</script>
</head>
<body>
<div id='calendar'></div>
Expand All @@ -12,7 +23,7 @@
$('#calendar').fullCalendar({
allDaySlot: false,
defaultView: 'agendaWeek',
events : "helpline-schedule.php?service_body_id=2"
events : "helpline-schedule.php?service_body_id=" + parseInt(getParameterByName("service_body_id"))
});
});
</script>
Expand Down

0 comments on commit 52cd9ba

Please sign in to comment.