Skip to content

Commit

Permalink
Merge pull request #3133 from AndrewKvalheim/thead-tr
Browse files Browse the repository at this point in the history
Correct invalid table markup
  • Loading branch information
hennevogel committed Apr 19, 2023
2 parents 4cb0147 + 1f31c1c commit 3aaf860
Show file tree
Hide file tree
Showing 37 changed files with 330 additions and 291 deletions.
78 changes: 40 additions & 38 deletions app/views/admin/booths/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -56,46 +56,48 @@
- if @booths.any?
%table.datatable
%thead
%th
%b ID
%th
%b Logo
%th
%b Title
%th
%b Submitter
%th
%b Responsibles
%th
%b State
%th
%b Actions
- @booths.each do |booth|
%tr
%td
= booth.id
%td
- if booth.logo_link
= image_tag(booth.picture.thumb.url, width: '20%')
%td
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
%td
= link_to booth.submitter.name, admin_user_path(booth.submitter) if booth.submitter
%td
.responsibles
- booth.responsibles.each_with_index do |responsible, i|
= link_to responsible.name, admin_user_path(responsible)
= ", " unless i == booth.responsibles.length - 1
%td
.btn-group
%button{ type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown' }
= booth.state.humanize
%span.caret
%ul.dropdown-menu{ role: 'menu' }
= render 'change_state_dropdown', booth: booth
%th
%b ID
%th
%b Logo
%th
%b Title
%th
%b Submitter
%th
%b Responsibles
%th
%b State
%th
%b Actions
%tbody
- @booths.each do |booth|
%tr
%td
= booth.id
%td
- if booth.logo_link
= image_tag(booth.picture.thumb.url, width: '20%')
%td
= link_to booth.title, admin_conference_booth_path(@conference.short_title, booth)
%td
= link_to booth.submitter.name, admin_user_path(booth.submitter) if booth.submitter
%td
.responsibles
- booth.responsibles.each_with_index do |responsible, i|
= link_to responsible.name, admin_user_path(responsible)
= ", " unless i == booth.responsibles.length - 1
%td
= link_to 'Edit', edit_admin_conference_booth_path(@conference.short_title, booth.id),
class: 'btn btn-primary'
.btn-group
%button{ type: 'button', class: 'btn btn-link dropdown-toggle', 'data-toggle' => 'dropdown' }
= booth.state.humanize
%span.caret
%ul.dropdown-menu{ role: 'menu' }
= render 'change_state_dropdown', booth: booth
%td
= link_to 'Edit', edit_admin_conference_booth_path(@conference.short_title, booth.id),
class: 'btn btn-primary'
.row
.col-md-12.text-right
- if can? :create, Booth
Expand Down
13 changes: 7 additions & 6 deletions app/views/admin/cfps/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
.col-md-12
%table.table.table-hover#tickets
%thead
%th Type
%th Start Date
%th End Date
%th Description
%th Days Left
%th Actions
%tr
%th Type
%th Start Date
%th End Date
%th Description
%th Days Left
%th Actions
%tbody
- @program.cfps.each do |cfp|
%tr
Expand Down
9 changes: 5 additions & 4 deletions app/views/admin/difficulty_levels/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
.col-md-12
%table.table.table-hover#difficulty_levels
%thead
%th Title
%th Description
%th Color
%th Actions
%tr
%th Title
%th Description
%th Color
%th Actions
%tbody
- @conference.program.difficulty_levels.each do |difficulty_level|
%tr
Expand Down
13 changes: 7 additions & 6 deletions app/views/admin/event_types/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
.col-md-12
%table.table.table-hover#event_types
%thead
%th Title
%th Description
%th Length
%th Abstract Length
%th Color
%th Actions
%tr
%th Title
%th Description
%th Length
%th Abstract Length
%th Color
%th Actions
%tbody
- @conference.program.event_types.each do |event_type|
%tr
Expand Down
80 changes: 41 additions & 39 deletions app/views/admin/events/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -58,44 +58,46 @@
.margin-event-table
%table.datatable
%thead
%th
%b ID
%th
%b Title
- if @program.rating_enabled?
%tr
%th
%b Rating
%th
%b Submitter
%th
%b Speakers
- if @program.languages.present?
%b ID
%th
%b Language
%th
%b Requires Registration
%th
%b Highlight
%th
%b Type
%th
%b Track
%th
%b Difficulty
%th
%b State
%th
.fa-solid.fa-comment
%th Add Survey
- @events.each do |event|
= render 'datatable_row',
event: event,
conference_id: @conference.short_title,
program: @program,
rating_enabled: @program.rating_enabled?,
show_votes: @program.show_voting?,
max_rating: @program.rating,
event_types: @event_types,
tracks: @tracks,
difficulty_levels: @difficulty_levels,
email_settings: @conference.email_settings
%b Title
- if @program.rating_enabled?
%th
%b Rating
%th
%b Submitter
%th
%b Speakers
- if @program.languages.present?
%th
%b Language
%th
%b Requires Registration
%th
%b Highlight
%th
%b Type
%th
%b Track
%th
%b Difficulty
%th
%b State
%th
.fa-solid.fa-comment
%th Add Survey
%tbody
- @events.each do |event|
= render 'datatable_row',
event: event,
conference_id: @conference.short_title,
program: @program,
rating_enabled: @program.rating_enabled?,
show_votes: @program.show_voting?,
max_rating: @program.rating,
event_types: @event_types,
tracks: @tracks,
difficulty_levels: @difficulty_levels,
email_settings: @conference.email_settings
13 changes: 7 additions & 6 deletions app/views/admin/events/registrations.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
.well
%table.datatable#registrations
%thead
%th
%th Name
%th Email
%th Created At
%th Attended
%th Attended Conference
%tr
%th
%th Name
%th Email
%th Created At
%th Attended
%th Attended Conference
%tbody
- @event_registrations.each.with_index(1) do |event_registration, index|
%tr
Expand Down
7 changes: 4 additions & 3 deletions app/views/admin/events/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
.col-md-12
%table.datatable
%thead
%th ID
%th Description
%th Actions
%tr
%th ID
%th Description
%th Actions
%tbody
- @versions.each do |version|
%tr
Expand Down
11 changes: 6 additions & 5 deletions app/views/admin/organizations/_users_with_org_admin_role.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
- if users.present?
%table.datatable#users
%thead
%th Name
%th Email
- if ( can? :unassign_org_admins, organization )
%th
Actions
%tr
%th Name
%th Email
- if ( can? :unassign_org_admins, organization )
%th
Actions
%tbody
- users.each do |user|
%tr
Expand Down
11 changes: 6 additions & 5 deletions app/views/admin/organizations/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@
.col-md-12
%table.datatable
%thead
%th Name
%th Upcoming Conferences
%th Past Conferences
%th Code of Conduct?
%th Actions
%tr
%th Name
%th Upcoming Conferences
%th Past Conferences
%th Code of Conduct?
%th Actions
%tbody
- @organizations.each do |organization|
%tr{ id: "organization-#{organization.id}" }
Expand Down
11 changes: 6 additions & 5 deletions app/views/admin/physical_tickets/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
.col-md-12
%table.datatable#tickets
%thead
%th ID
%th Type
%th User
%th Paid
%th Actions
%tr
%th ID
%th Type
%th User
%th Paid
%th Actions
%tbody
- @physical_tickets.each do |physical_ticket|
= render "physical_ticket", physical_ticket: physical_ticket,
Expand Down
9 changes: 5 additions & 4 deletions app/views/admin/questions/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

%table.datatable#question_users
%thead
%th Name
%th Username
%th Email
%th Answer
%tr
%th Name
%th Username
%th Email
%th Answer
%tbody
- @registrations.each do |registration|
%tr
Expand Down
19 changes: 10 additions & 9 deletions app/views/admin/reports/_all_events.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
.col-md-12
%table.datatable
%thead
%th ID
%th Title
%th Speakers Registered
%th Speakers Biographies
%th Commercial
%th Subtitle
%th Difficulty Level
- if @program.tracks.any?
%th Track
%tr
%th ID
%th Title
%th Speakers Registered
%th Speakers Biographies
%th Commercial
%th Subtitle
%th Difficulty Level
- if @program.tracks.any?
%th Track
%tbody
- @events.each do |event|
%tr
Expand Down
15 changes: 8 additions & 7 deletions app/views/admin/reports/_events_with_requirements.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
.col-md-12
%table.datatable
%thead
%th ID
%th Title
%th Speaker(s)
%th Requirements
%th Room
%th Date
%th Time
%tr
%th ID
%th Title
%th Speaker(s)
%th Requirements
%th Room
%th Date
%th Time
%tbody
- @events_with_requirements.each do |event|
%tr
Expand Down
7 changes: 4 additions & 3 deletions app/views/admin/reports/_events_without_commercials.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
.col-md-12
%table.datatable
%thead
%th ID
%th Title
%th Speaker(s)
%tr
%th ID
%th Title
%th Speaker(s)
%tbody
- @events_missing_commercial.each do |event|
%tr
Expand Down

0 comments on commit 3aaf860

Please sign in to comment.