-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add_person_routes_and_view
- Loading branch information
Showing
6 changed files
with
195 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ | |
*.swp | ||
*~ | ||
dump.rdb | ||
/db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ -z "$DATABASE_URL" ]] && [[ -n "$DATABASE_NAME" ]]; then | ||
export DATABASE_URL="sqlite3:db/dev.sqlite3" | ||
fi | ||
|
||
bundle exec irb -Ilib -r ./app.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<% content_for :breadcrumbs do %> | ||
<nav class="breadcrumb" aria-label="breadcrumbs"> | ||
<ul> | ||
<li><a href="/">Home</a></li> | ||
<li><a href="/db">Database</a></li> | ||
<li><a href="/db/organizations/<%=h @organization_department.organization.id %>"><%=h @organization_department.organization %></a></li> | ||
<% if @organization_department.parent_department %> | ||
<li><a href="/db/organization_departments/<%=h @organization_department.parent_department.id %>"><%=h @organization_department.parent_department %></a></li> | ||
<% end %> | ||
</ul> | ||
</nav> | ||
<% end %> | ||
|
||
<h1>Organization Department: <%=h @organization_department %></h1> | ||
|
||
<table class="table"> | ||
<tbody> | ||
<tr> | ||
<td><strong>Organization:</strong></td> | ||
<td><a href="/db/organizations/<%=h @organization_department.organization.id %>"><%=h @organization_department.organization %></a></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Parent Department:</strong></td> | ||
<td> | ||
<% if @organization_department.parent_department %> | ||
<a href="/db/organization_departments/<%=h @organization_department.parent_department.id %>"><%=h @organization_department.parent_department %></a> | ||
<% end %> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Street Address:</strong></td> | ||
<td> | ||
<% if @organization_department.street_address %> | ||
<a href="/db/street_addresses/<%=h @organization_department.street_address.id %>"><%=h @organization_department.street_address %></a> | ||
<% end %> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Email Address:</strong></td> | ||
<td> | ||
<% if @organization_department.email_address %> | ||
<a href="/db/email_addresses/<%=h @organization_department.email_address.id %>"><%=h @organization_department.email_address %></a> | ||
<% end %> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Phone Number:</strong></td> | ||
<td> | ||
<% if @organization_department.phone_number %> | ||
<a href="/db/phone_numbers/<%=h @organization_department.phone_number.id %>"><%=h @organization_department.phone_number %></a> | ||
<% end %> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Subdepartments:</strong></td> | ||
<td> | ||
<% @organization_department.subdepartments.each do |subdepartment| %> | ||
<p><a href="/db/organization_departments/<%=h subdepartment.id %>"><%=h subdepartment %></a></p> | ||
<% end %> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Members:</strong></td> | ||
<td> | ||
<% @organization_department.members.each do |member| %> | ||
<p><a href="/db/organization_members/<%=h member.id %>"><%=h member %></a></p> | ||
<% end %> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Created:</strong></td> | ||
<td><%=h @organization_department.created_at %></td> | ||
</tr> | ||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<% content_for :breadcrumbs do %> | ||
<nav class="breadcrumb" aria-label="breadcrumbs"> | ||
<ul> | ||
<li><a href="/">Home</a></li> | ||
<li><a href="/db">Database</a></li> | ||
<li><a href="/db/organizations">Organization Member</a></li> | ||
</ul> | ||
</nav> | ||
<% end %> | ||
|
||
<h1>Organization Member: <%=h @organization_member.person %></h1> | ||
|
||
<table class="table"> | ||
<tbody> | ||
<tr> | ||
<td><strong>Active:</strong></td> | ||
<td><%=h @organization_member.active %></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Type:</strong></td> | ||
<td><%=h @organization_member.type %></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Role:</strong></td> | ||
<td><%=h @organization_member.role %></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Title:</strong></td> | ||
<td><%=h @organization_member.title %></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Rank:</strong></td> | ||
<td><%=h @organization_member.rank %></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Person:</strong></td> | ||
<td><a href="/db/people/<%=h @organization_member.person.id %>"><%=h @organization_member.person %></a></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Department:</strong></td> | ||
<td> | ||
<% if @organization_member.department %> | ||
<a href="/db/departments/<%=h @organization_member.department.id %>"><%=h @organization_member.department %></a> | ||
<% end %> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Organization:</strong></td> | ||
<td><a href="/db/organizations/<%=h @organization_member.organization.id %>"><%=h @organization_member.organization %></a></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Email Address:</strong></td> | ||
<td> | ||
<% if @organization_member.email_address %> | ||
<a href="/db/email_addresses/<%=h @organization_member.email_address.id %>"><%=h @organization_member.email_address %></a> | ||
<% end %> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Phone Number:</strong></td> | ||
<td> | ||
<% if @organization_member.phone_number %> | ||
<a href="/db/phone_numbers/<%=h @organization_member.phone_number.id %>"><%=h @organization_member.phone_number %></a> | ||
<% end %> | ||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Created at:</strong></td> | ||
<td><%=h @organization_member.created_at %></td> | ||
</tr> | ||
|
||
<tr> | ||
<td><strong>Updated at:</strong></td> | ||
<td><%=h @organization_member.updated_at %></td> | ||
</tr> | ||
</tbody> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters