Facilities Short Report js

Can someone help me short this report by making room list comma separate vs. 1 room per line? Feel free to email me. jo@southcliff.com Currently E100 E108 E119 Would prefer; E100, E108, E119

Preview

Report Preview


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
<!-- Set to "true" if you want each day on it's own page -->
{% assign day_page_break = true %}

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Basic {{ report.kind | capitalize }} Report by Date</title>
    <link rel="stylesheet" type="text/css" media="all" href="{{ report.stylesheet_href }}">
    <meta charset="utf-8">
    <style>
      li {
        list-style-type: none;
      }
    </style>
  </head>
  <body>
    {% if report.org_twenty_four_hour_time? %}
      {% assign time_format = "%H:%M" %}
    {% else %}
      {% assign time_format = "%-I:%M%P" %}
    {% endif %}

    {% if report.org_day_month_dates? %}
      {% assign date_format = "%d/%m/%Y" %}
    {% else %}
      {% assign date_format = "%m/%d/%Y" %}
    {% endif %}

    {% for day in days_with_instances %}
        {% if forloop.first or day_page_break %}
          <div>
            <h1 class="header-large txt-center gutter-bottom-small">Basic {{ report.kind | capitalize }} Report by Date</h1>
            <h2 class="header-medium txt-center soft gutter-bottom-large">{{ report.scope }}: {{ report.start_date }} through {{ report.end_date }}</h2>
          </div>
        {% endif %}
        <div class="table-container{% if day_page_break and forloop.index < forloop.length  %} page-break{% endif %}">
          <div class="gutter-bottom-large">
            <h3 class="header-medium">{{ day.date | date: '%A, %B %-d, %Y'}} </h3>
            <table>
              <thead>
                <tr>
                  <th width="20%">Event Name</th>
                  <th width="15%">Start Time</th>
                  
                  <th width="60%">Room(s)</th>
                  
                </tr>
              </thead>
              <tbody>
                {% for instance in day.instances | sort: "starts_at" %}
                  <tr>
                    <td>
                      <div>
                        <div>
                          <span class="status {{ instance.approval_status_class }}">
                            {{ instance.approval_status | replace: "Approved", "A" | replace: "Pending Conflicts", "PC"| replace: "Pending", "P" | replace: "Rejected", "R" }}
                          </span>
                        </div>
                        <div class="status-text {{ instance.approval_status_class }}">{{ instance.event.name }}</div>
                      </div>
                    </td>
                    {% capture start_date %} {{ instance.starts_at | date: "%m/%d/%Y" }} {% endcapture %} {% capture end_date %} {{ instance.ends_at | date: "%m/%d/%Y" }} {% endcapture %} {% capture today %} {{ day.date | date: "%m/%d/%Y" }} {% endcapture %}
                    <td>
                      {% if instance.reservation.all_day_event? %}
                        All-day
                      {% elsif start_date == today and start_date != end_date %}
                        Today, {{ instance.starts_at | date: time_format }}
                      {% elsif start_date == end_date %}
                        {{ instance.starts_at | date: time_format | downcase }}
                      {% else %}
                        {{instance.starts_at | date: date_format }} ({{ instance.starts_at | date: time_format | downcase }})
                      {% endif %}
                    </td>

                    
                    
                   <td>
                      {% for room_request in instance.reservation.room_requests %}
                        <li {% if forloop.last == false %}style="padding-bottom: 5px;"{% endif %}>
                          - {{ room_request.room.name }}
                          {% if room_request.room_setup %}
                            <span style="color: grey;">( {{ room_request.room_setup.name }} )</span>
                          {% endif %}
                        </li>
                      {% endfor %}
                    </td>
                   
                  </tr>
                {% endfor %}
              </tbody>
            </table>
          </div>
      </div>
    {% else %}
      <div>
        <h1 class="header-large txt-center gutter-bottom-small">Basic {{ report.kind | capitalize }} Report by Date</h1>
        <h2 class="header-medium txt-center soft gutter-bottom-large">{{ report.scope }}: {{ report.start_date }} through {{ report.end_date }}</h2>
        <h1 class="header-large txt-center gutter-bottom-small">There are no events which fit the filters in the selected date range.</h1>
      </div>
    {% endfor %}
  </body>
</html>