project/src/main/webapp/event-details.js
/**
 * Adds appropriate buttons available to hosts
 * @param {string} editContainer id of container to be appended to
 * @param {string} eventId id of relevant event
 */
Adds appropriate buttons available to hosts
@param {string} editContainer id of container to be appended to
@param {string} eventId id of relevant event
Adds appropriate buttons available to hosts @param { string } editContainer id of container to be appended to @param { string } eventId id of relevant event
function addHostButtons(editContainer, eventId) {
  $(editContainer)
      .append(
          `<a href="/create-volunteering-opportunity.html?eventId=${eventId}"
                  type="button" class="btn btn-primary" id="volopp-button"
                  >Add a volunteering opportunity</a>`);
  $(editContainer).append('<br /><br />');
  $(editContainer)
      .append(`<a id="edit-link" href="/event-edit.html?eventId=${eventId}" 
                type="button" class="btn btn-primary" id="edit-button"> Edit event </a>`);
}
function addHostButtons ( editContainer , eventId ) { $ ( editContainer ) . append ( ` ${ eventId } ` ) ; $ ( editContainer ) . append ( '<br /><br />' ) ; $ ( editContainer ) . append ( ` ${ eventId } ` ) ; }
Adds appropriate buttons available to hosts
 @param {string} editContainer id of container to be appended to
 @param {string} eventId id of relevant event
Adds appropriate buttons available to hosts @param { string } editContainer id of container to be appended to @param { string } eventId id of relevant event