docbrown/app/views/admin/organizations/index.html.erb
Ridhwana 7ffda62119
Override specified line break behaviour on the ID column (#12076)
* feat: add a utility class to override the specified line break behaviour on the ID column.

* chore: revert previous change

* Revert "chore: revert previous change"

This reverts commit 5be6f5ff8adb8476e5b90931a8dd6bcb9559fcc8.

* feat: add some more whitespace

* feat: add a max width
2021-01-04 16:17:38 -05:00

47 lines
1.4 KiB
Text

<%= form_tag(admin_organizations_path, method: "get") do %>
<div class="form-row">
<div class="form-group">
<%= text_field_tag(:search, params[:search], aria: { label: "Search" }) %>
<%= submit_tag("Search") %>
</div>
</div>
<% end %>
<%= paginate @organizations %>
<table class="crayons-table" width="100%">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">ID</th>
<th scope="col">Twitter</th>
<th scope="col">GitHub</th>
<th scope="col">URL</th>
</tr>
</thead>
<tbody class="crayons-card">
<% @organizations.each do |organization| %>
<tr>
<td><%= link_to "@#{organization.name}", admin_organization_path(organization.id) %></td>
<td class="whitespace-nowrap"><%= organization.id %></td>
<% if organization.twitter_username %>
<td><%= link_to organization.twitter_username, "https://twitter.com/#{organization.twitter_username}" %></td>
<% else %>
<td>N/A</td>
<% end %>
<% if organization.github_username %>
<td><%= link_to organization.github_username, "https://github.com/#{organization.github_username}" %></td>
<% else %>
<td>N/A</td>
<% end %>
<% if organization.url %>
<td><%= link_to organization.url, organization.url %></td>
<% else %>
<td>N/A</td>
<% end %>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @organizations %>