-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made all normal actions for a contact work. Now you can create, updat…
…e, delete and show contacts
- Loading branch information
Showing
10 changed files
with
240 additions
and
17 deletions.
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
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
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,4 +13,12 @@ | |
|
||
.error { | ||
color: red; | ||
} | ||
|
||
.address { | ||
margin-left: 100px; | ||
} | ||
|
||
.address table th { | ||
text-align: left; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
h1 Change Contact Name | ||
- if (error) | ||
div.error | ||
#{error} | ||
div | ||
div | ||
form(method="post") | ||
fieldset | ||
legend change contact name | ||
p | ||
label(for="new_name") Name: | ||
input(type="text", name="new_name", size="50", value="#{contact.name}") | ||
p.buttons | ||
input(type="submit", value="Update") |
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,12 @@ | ||
h1 Delete Contact | ||
- if (error) | ||
div.error | ||
#{error} | ||
div | ||
div | ||
form(method="post") | ||
fieldset | ||
legend change contact name | ||
p Name: #{contact.name} | ||
p.buttons | ||
input(type="submit", value="Delete") |
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,18 @@ | ||
h1 Contact: #{contact.name} | ||
div | ||
- each address in contact.addresses | ||
tr | ||
td(colspan="2") | ||
div.address | ||
h2 #{address.addressType} | ||
table | ||
tr | ||
th street | ||
td #{address.streetAndNumber} | ||
tr | ||
th zip code | ||
td #{address.zipCode} | ||
tr | ||
th city | ||
td #{address.city} | ||
|
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