UX: improves post-event-invitees modal

UX: improves post-event-invitees modal

diff --git a/assets/javascripts/discourse/templates/modal/post-event-invitees.hbs b/assets/javascripts/discourse/templates/modal/post-event-invitees.hbs
index 1942e53..1fb55c8 100644
--- a/assets/javascripts/discourse/templates/modal/post-event-invitees.hbs
+++ b/assets/javascripts/discourse/templates/modal/post-event-invitees.hbs
@@ -1,11 +1,9 @@
-{{#d-modal-body
-  title="event.post-event-invitees-modal.title"
-}}
+{{#d-modal-body}}
   {{input
     value=(readonly filter)
     input=(action "onFilterChanged" value="target.value")
     class="filter"
-    placeholderKey="event.post-event-invitees-modal.filter_placeholder"
+    placeholderKey="event.post_event_invitees_modal.filter_placeholder"
   }}
 
   {{#conditional-loading-spinner condition=isLoading}}
@@ -22,6 +20,10 @@
           <span class="status {{invitee.status}}">
             {{i18n (concat "event.invitee_status." invitee.status)}}
           </span>
+        {{else}}
+          <span class="status">
+            -
+          </span>
         {{/if}}
       </li>
     {{/each}}
diff --git a/assets/javascripts/discourse/widgets/post-event-dates.js.es6 b/assets/javascripts/discourse/widgets/post-event-dates.js.es6
index ccd715b..ec6aa0b 100644
--- a/assets/javascripts/discourse/widgets/post-event-dates.js.es6
+++ b/assets/javascripts/discourse/widgets/post-event-dates.js.es6
@@ -6,6 +6,14 @@ import { createWidget } from "discourse/widgets/widget";
 export default createWidget("post-event-dates", {
   tagName: "section.post-event-dates",
 
+  showAllParticipatingInvitees(postId) {
+    this.sendWidgetAction("showAllInvitees", {
+      postId,
+      title: "title_participated",
+      extraClass: "participated"
+    });
+  },
+
   html(attrs) {
     const content = [
       iconNode("clock"),
@@ -19,7 +27,7 @@ export default createWidget("post-event-dates", {
       });
       if (attrs.postEvent.stats.going > 0) {
         participants = this.attach("link", {
-          action: "showAllInvitees",
+          action: "showAllParticipatingInvitees",
           actionParam: attrs.postEvent.id,
           contents: () => label
         });
diff --git a/assets/javascripts/discourse/widgets/post-event-invitees.js.es6 b/assets/javascripts/discourse/widgets/post-event-invitees.js.es6
index d361feb..70f976b 100644
--- a/assets/javascripts/discourse/widgets/post-event-invitees.js.es6
+++ b/assets/javascripts/discourse/widgets/post-event-invitees.js.es6
@@ -31,7 +31,7 @@ export default createWidget("post-event-invitees", {
             className="show-all btn-small"
             label="event.post_ui.show_all"
             action="showAllInvitees"
-            actionParam=attrs.postEvent.id
+            actionParam=(hash postId=attrs.postEvent.id)
           )
         }}
       {{/if}}
diff --git a/assets/javascripts/discourse/widgets/post-event.js.es6 b/assets/javascripts/discourse/widgets/post-event.js.es6
index 43f38ca..48d5f71 100644
--- a/assets/javascripts/discourse/widgets/post-event.js.es6
+++ b/assets/javascripts/discourse/widgets/post-event.js.es6
@@ -1,3 +1,4 @@
+import { dasherize } from "@ember/string";
 import EmberObject from "@ember/object";
 import showModal from "discourse/lib/show-modal";
 import hbs from "discourse/widgets/hbs-compiler";
@@ -29,10 +30,19 @@ export default createWidget("post-event", {
     });
   },
 
-  showAllInvitees(postId) {
+  showAllInvitees(params) {
+    const postId = params.postId;
+    const title = params.title || "title_invited";
+    const extraClass = params.extraClass || "invited";
+    const name = "post-event-invitees";
+
     this.store.find("post-event", postId).then(postEvent => {
-      showModal("post-event-invitees", {
-        model: postEvent
+      showModal(name, {
+        model: postEvent,
+        title: `event.post_event_invitees_modal.${title}`,
+        modalClass: [`${dasherize(name).toLowerCase()}-modal`, extraClass].join(
+          " "
+        )
       });
     });
   },
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 44eb83c..46613f3 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -38,9 +38,10 @@ en:
         invite: invite
         add_to_calendar: add to calendar
         send_pm_to_creator: contact
-      post-event-invitees-modal:
-        title: "List of invited users"
-        filter_placeholder: "Filter invited users"
+      post_event_invitees_modal:
+        title_invited: "List of invited users"
+        title_participated: "List of users"
+        filter_placeholder: "Filter users"
       ui_builder:
         create_event_title: Create Event
         update_event_title: Update Event

GitHub sha: f563e28f