Wednesday, July 15, 2026 2:55:14 AM
> project show esm_website_v1
The unexpected heart of the ESM ecosystem. What started as a simple Rails dashboard has evolved into the command center for thousands of gaming communities, proving that sometimes the best infrastructure projects are the ones you never planned to build.
Details
> _server_sidebar.html.erb
<div class="uk-width-1-5@xl uk-width-1-4@m uk-width-1-1">
  <%# DESKTOP %>
  <div class="sidebar uk-visible@m" uk-height-viewport="offset-top: true">
    <h2 class="uk-text-center uk-margin-remove-bottom uk-margin-remove-top uk-padding">Server Dashboard</h2>

    <div class="uk-margin-left uk-margin-right">
      <% if @communities.present? %>
        <label>
          <% if @community.present? %>
            Selected Community:
          <% else %>
            Please select a community:
          <% end %>

          <%= select_tag "communities", options_for_communities, class: "uk-select uk-width-1-1 communities-selector" %>

          <small class="esm-text-color-toast-red" uk-tooltip="ESM must be invited to the Discord server and you must be either the owner, an admin, or have a role that is allowed to manage the server dashboard">Not seeing your community?</small>
        </label>

        <% if @community.present? %>
          <h4>Community</h4>
          <hr class="esm-border-color-blue">
          <ul class="uk-list sidebar-items uk-margin-left">
            <%= link_to edit_community_path(@community.public_id) do %>
              <li
                <% if controller_name == "communities" && action_name == "edit" %>
                  class="selected"
                <% end %>
              >
                My Community
              </li>
            <% end %>

            <% if [email protected]_mode_enabled? %>
              <%= link_to new_community_server_path(@community.public_id) do %>
                <li
                  <% if controller_name == "servers" && action_name == "new" && !params.key?(:v2) %>
                    class="selected"
                  <% end %>
                >
                  Register a Server
                </li>
              <% end %>

              <% if @community.allow_v2_servers? %>
                <%= link_to new_community_server_path(@community.public_id, v2: true) do %>
                  <li
                    <% if controller_name == "servers" && action_name == "new" && params[:v2] %>
                      class="selected"
                    <% end %>
                  >
                    Register a Server (<code>@esm v2</code>)
                  </li>
                <% end %>
              <% end %>

              <%= link_to community_servers_path(@community.public_id) do %>
                <li
                  <% if controller_name == "servers" && %w[index edit].include?(action_name) %>
                    class="selected"
                  <% end %>
                >
                  Modify a Server
                </li>
              <% end %>
            <% end %>
          </ul>

          <h4>Configure</h4>
          <hr class="esm-border-color-blue">
          <ul class="uk-list sidebar-items uk-margin-left">
            <% if [email protected]_mode_enabled? %>
              <%= link_to community_commands_path(@community.public_id) do %>
                <li
                  <% if controller_name == "commands" && action_name == "index" %>
                    class="selected"
                  <% end %>
                >
                  Commands
                </li>
              <% end %>

              <%= link_to community_notifications_path(@community.public_id) do %>
                <li
                  <% if controller_name == "notifications" && action_name == "index" %>
                    class="selected"
                  <% end %>
                >
                  Notifications
                </li>
              <% end %>
            <% else %>
              <%= link_to community_notification_routing_index_path(@community.public_id) do %>
                <li
                  <% if controller_name == "user_notification_routes" && action_name == "server_index" %>
                    class="selected"
                  <% end %>
                >
                  XM8 Notification Routing
                </li>
              <% end %>
            <% end %>
          </ul>
        <% end %>
      </div>
    <% else %>
      <h3>We looked far and wide...</h3>
      <p>
        It looks like you don't have access to any communities.
        <br>
        <br>
        <strong>Try refreshing the page</strong> if you expected to see communities here.
        <br>
        <br>
        Otherwise, ESM needs to be invited to your community and you must meet one of the following criteria:
        <div class="uk-margin-left esm-text-subtle">
          - You are the owner of the Discord server
          <br>
          - You are an administrator of the Discord server
          <br>
          - You have a role that allows you to manage the community's server dashboard
        </div>
      </p>
    <% end %>
  </div>

  <%# MOBILE %>
  <div class="uk-hidden@m uk-container uk-margin-top">
    <h3 class="uk-text-center">Server Dashboard</h3>
    <div class="uk-margin-bottom">
      <label class="esm-text-color-red">
        <% if action_name == "show" %>
          Selected Community:
        <% else %>
          Please select a community:
        <% end %>
      </label>

      <%= select_tag "communities", options_for_communities, class: "uk-select uk-form-small communities-selector" %>

      <% if @community.present? %>
        <div class="uk-margin-top">
          <label class="esm-text-color-toast-green">Current Section:</label>
          <select class="uk-select uk-form-small" id="mobile-panel-select">
            <option value="<%= edit_community_path(@community.public_id) %>" <%= "selected" if controller_name == "community" && action_name == "edit"%>>Modify Community</li>
            <option value="<%= community_commands_url(@community.public_id) %>" <%= "selected" if controller_name == "commands" && action_name == "index"%>>Command Configuration</li>
            <option value="<%= community_notifications_path(@community.public_id) %>" <%= "selected" if controller_name == "notifications" && action_name == "index"%>>Notification Configuration</li>
            <option value="<%= new_community_server_path(@community.public_id) %>" <%= "selected" if controller_name == "servers" && action_name == "new"%>>Register a Server</li>
            <option value="<%= community_servers_path(@community.public_id) %>" <%= "selected" if controller_name == "servers" && action_name == "edit"%>>Modify a Server</li>
          </select>
        </div>
      <% end %>
    </div>
            </div>
          </div>
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 43aa0d7