diff --git a/app/assets/stylesheets/characters.css b/app/assets/stylesheets/characters.css
new file mode 100644
index 0000000..146a709
--- /dev/null
+++ b/app/assets/stylesheets/characters.css
@@ -0,0 +1,31 @@
+.character {
+ background-color: var(--inset-bg-color);
+ border-radius: var(--border-radius);
+ padding: 1em;
+
+ h5 {
+ font-size: 1.1em;
+ margin: 0;
+ }
+
+ h5 a:link, h5 a:visited {
+ color: inherit;
+ text-decoration: none;
+ }
+
+ > ul {
+ padding: 0;
+ li {
+ list-style-type: none;
+ display: inline;
+ color: var(--secondary-text-color);
+ font-size: .8em;
+ &:after {
+ content: " • ";
+ }
+ &:last-child:after {
+ content: "";
+ }
+ }
+ }
+}
diff --git a/app/assets/stylesheets/colors.css b/app/assets/stylesheets/colors.css
index 48c1727..786241a 100644
--- a/app/assets/stylesheets/colors.css
+++ b/app/assets/stylesheets/colors.css
@@ -5,6 +5,8 @@
--header-text-color: #fff;
--header-height: 200px;
+ --secondary-text-color: #777;
+
--inset-bg-color: #eee;
--border-radius: .5em;
diff --git a/app/views/characters/_character.html.erb b/app/views/characters/_character.html.erb
index ad913dc..62f0560 100644
--- a/app/views/characters/_character.html.erb
+++ b/app/views/characters/_character.html.erb
@@ -1,4 +1,7 @@
-
>
-
<%= link_to character.name, character %>
-
<%= character.game_system.name %>
+
class="character">
+
<%= link_to character.name, character %>
+
+ - <%= character.game_system.name %>
+ - <%= character.user.username %>
+
diff --git a/app/views/tables/show.html.erb b/app/views/tables/show.html.erb
index 6b188c8..6e57ce7 100644
--- a/app/views/tables/show.html.erb
+++ b/app/views/tables/show.html.erb
@@ -12,6 +12,24 @@
<%= @table.owner.username %>
+
<%= t(".characters") %>
+<% if @table.characters.any? %>
+
<%= render @table.characters %>
+<% else %>
+
<%= t(".no_characters") %>
+<% end %>
+
+
<%= t(".users") %>
+<% if @table.users.any? %>
+
+ <% @table.users.each do |user| %>
+ - <%= link_to user.username, user %>
+ <% end %>
+
+<% else %>
+
<%= t(".no_users") %>
+<% end %>
+
<% if @table_invites.any? %>
Pending invites
diff --git a/config/brakeman.ignore b/config/brakeman.ignore
new file mode 100644
index 0000000..5d799c5
--- /dev/null
+++ b/config/brakeman.ignore
@@ -0,0 +1,40 @@
+{
+ "ignored_warnings": [
+ {
+ "warning_type": "Dynamic Render Path",
+ "warning_code": 15,
+ "fingerprint": "42478896b621fa561e9866e0bc1339d9864fea72109e83c02b194967272202cc",
+ "check_name": "Render",
+ "message": "Render path contains parameter value",
+ "file": "app/views/tables/show.html.erb",
+ "line": 17,
+ "link": "https://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
+ "code": "render(action => Current.user.tables.find(params[:id]).characters, {})",
+ "render_path": [
+ {
+ "type": "controller",
+ "class": "TablesController",
+ "method": "show",
+ "line": 12,
+ "file": "app/controllers/tables_controller.rb",
+ "rendered": {
+ "name": "tables/show",
+ "file": "app/views/tables/show.html.erb"
+ }
+ }
+ ],
+ "location": {
+ "type": "template",
+ "template": "tables/show"
+ },
+ "user_input": "params[:id]",
+ "confidence": "Weak",
+ "cwe_id": [
+ 22
+ ],
+ "note": ""
+ }
+ ],
+ "updated": "2024-06-05 18:49:27 +0100",
+ "brakeman_version": "6.1.2"
+}
diff --git a/config/locales/en.yml b/config/locales/en.yml
index ede7ccb..cb9b20a 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -161,6 +161,10 @@ en:
game_system: Game system
owner: Owner
invite_user: Invite a new player
+ no_characters: This table doesn’t have any characters yet
+ no_users: This table doesn’t have any players yet
+ users: Players
+ characters: Characters
new:
new_table: New table
create_table: Create table