Skip to content

Commit

Permalink
Added fax field to locations (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
mak001 authored May 9, 2018
1 parent 68e10b5 commit 84d21d6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion client/infowindow-description.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
<div>{{address2}}</div>
<div>{{city}}, {{state}} {{postal}}</div>
{{#if phone}}<div>{{phone}}</div>{{/if}}
{{#if fax}}<div>{{fax}}</div>{{/if}}
{{#if web}}<div><a href="http://{{web}}" target="_blank">Website</a></div>{{/if}}
{{/location}}
{{/location}}
3 changes: 2 additions & 1 deletion client/location-list-description.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{{#if address2}}<div class="loc-addr2">{{address2}}</div>{{/if}}
<div class="loc-addr3">{{city}}, {{state}} {{postal}}</div>
{{#if phone}}<div class="loc-phone">{{phone}}</div>{{/if}}
{{#if fax}}<div class="loc-fax">{{fax}}</div>{{/if}}
{{#if web}}<div class="loc-web"><a href="http://{{web}}" target="_blank">Website</a></div>{{/if}}
{{#if email}}<div class="loc-email"><a href="mailto:{{email}}">Email</a></div>{{/if}}
<div class="loc-dist">
Expand All @@ -17,4 +18,4 @@
</div>
</div>
</li>
{{/location}}
{{/location}}
2 changes: 2 additions & 0 deletions src/objects/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* @property string $Phone
* @property string $Email
* @property string $EmailAddress
* @property string $Fax
* @property int $Import_ID
*
* @method ManyManyList Categories
Expand Down Expand Up @@ -49,6 +50,7 @@ class Location extends DataObject implements PermissionProvider
'Website' => 'Varchar(255)',
'Phone' => 'Varchar(40)',
'Email' => 'Varchar(255)',
'Fax' => 'Varchar(45)',
'Import_ID' => 'Int',
);

Expand Down
1 change: 1 addition & 0 deletions templates/Dynamic/Locator/Data/JSON.ss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"Featured": $Featured,
"Website": "$Website",
"Phone": "$Phone",
"Fax": "$Fax",
"Email": "$Email",
"Address": "$Address",
"Address2": "$Address2",
Expand Down
2 changes: 1 addition & 1 deletion templates/Dynamic/Locator/Data/XML.ss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<markers>
<% loop $Locations %><marker name="$Title.XML" lat="$Lat.XML" lng="$Lng.XML" category="$Category.Name.XML" address="$Address.XML" address2="$Address2.XML" city="$City.XML" state="$State.XML" postal="$PostalCode.XML" country="$Country.XML" phone="$Phone.XML" web="$Website.XML" email="$Email.XML" featured="$Featured.NiceAsBoolean.XML" <% if $distance %>distance="$Distance"<% end_if %>/>
<% loop $Locations %><marker name="$Title.XML" lat="$Lat.XML" lng="$Lng.XML" category="$Category.Name.XML" address="$Address.XML" address2="$Address2.XML" city="$City.XML" state="$State.XML" postal="$PostalCode.XML" country="$Country.XML" phone="$Phone.XML" fax="$Fax.XML" web="$Website.XML" email="$Email.XML" featured="$Featured.NiceAsBoolean.XML" <% if $distance %>distance="$Distance"<% end_if %>/>
<% end_loop %>
</markers>
1 change: 1 addition & 0 deletions tests/objects/LocationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function testFieldLabels()
'Website' => 'Website',
'Phone' => 'Phone',
'Email' => 'Email',
'Fax' => 'Fax',
'Address' => 'Address',
'City' => 'City',
'State' => 'State',
Expand Down

0 comments on commit 84d21d6

Please sign in to comment.