Skip to content

Commit

Permalink
landing page integrated fully and friday meeting changes done
Browse files Browse the repository at this point in the history
  • Loading branch information
amaravindhan committed Nov 15, 2020
1 parent bb9c3f0 commit 56203de
Show file tree
Hide file tree
Showing 32 changed files with 422 additions and 87 deletions.
113 changes: 113 additions & 0 deletions checkout/templates/checkout/myrequest.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{% include "layout/header.html" %}

{% load static %}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style>
#requestpills > li > a { border-radius:50px !important; }
#requestpills > li.active > a { background-color: #00297a !important; }

.requests_table > thead > tr > th { background-color: #00297a; color:#fff; padding:20px; }
.addressp { padding-left:40px; }
.reqtableimg { border-radius:50px; width:30px; height:30px; }
td > .fa-eye { border-radius:100px; }
</style>
<br>
<br>
<br>
<div class="container"><br>
<ul class="nav nav-pills nav-justified" id="requestpills">
<li class="active"><a data-toggle="pill" href="#home">Rent Requests</a></li>
<li><a data-toggle="pill" href="#menu1">Tour Requests</a></li>
</ul>

<div class="tab-content">
<div id="home" class="tab-pane fade in active">
<br><br>
<table class="table table-striped requests_table">
<thead>
<tr>
<th style="border-top-left-radius:10px !important;">Name & Address</th>
<th>Date & Time</th>
<th style="border-top-right-radius:10px !important;">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img class="reqtableimg" src="https://i.pinimg.com/736x/5c/24/69/5c24695df36eee73abfbdd8274085ecd--cute-anime-guys-anime-boys.jpg" /> &nbsp;
<b>Ashwin Jey</b><br>
<p class="addressp"> 12, Test Address Line, Coimbatore, TN</p>
</td>
<td><br>15-November-2020 06:00 PM</td>
<td><br><i class="fa fa-eye btn btn-success btn-sm"> View</i></td>
</tr>
<tr>
<td>
<img class="reqtableimg" src="https://i.pinimg.com/736x/5c/24/69/5c24695df36eee73abfbdd8274085ecd--cute-anime-guys-anime-boys.jpg" /> &nbsp;
<b>Aravindan Sundaram</b><br>
<p class="addressp">23, Test Address Line, Coimbatore, TN</p>
</td>
<td><br>14-November-2020 08:30 AM</td>
<td><br><i class="fa fa-eye btn btn-success btn-sm"> view</i></td>
</tr>
<tr>
<td>
<img class="reqtableimg" src="https://i.pinimg.com/736x/5c/24/69/5c24695df36eee73abfbdd8274085ecd--cute-anime-guys-anime-boys.jpg"/> &nbsp;
<b>Arun Prakash</b><br>
<p class="addressp">34, Test Address Line, Coimbatore, TN</p>
</td>
<td><br>13-November-2020 10:30 AM</td>
<td><br><i class="fa fa-eye btn btn-success btn-sm"> View</i></td>
</tr>
</tbody>
</table>
</div>
<div id="menu1" class="tab-pane fade">
<br><br>
<table class="table table-striped requests_table">
<thead>
<tr>
<th style="border-top-left-radius:10px !important;">Name & Address</th>
<th>Date | Time</th>
<th style="border-top-right-radius:10px !important;">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<img class="reqtableimg" src="https://i.pinimg.com/736x/5c/24/69/5c24695df36eee73abfbdd8274085ecd--cute-anime-guys-anime-boys.jpg" /> &nbsp;
<b>Ashwin Jey</b><br>
<p class="addressp"> 12, Test Address Line, Coimbatore, TN</p>
</td>
<td><br>15-November-2020 06:00 PM</td>
<td><br><i class="fa fa-eye btn btn-success btn-sm"> View</i></td>
</tr>
<tr>
<td>
<img class="reqtableimg" src="https://i.pinimg.com/736x/5c/24/69/5c24695df36eee73abfbdd8274085ecd--cute-anime-guys-anime-boys.jpg" /> &nbsp;
<b>Aravindan Sundaram</b><br>
<p class="addressp">23, Test Address Line, Coimbatore, TN</p>
</td>
<td><br>14-November-2020 08:30 AM</td>
<td><br><i class="fa fa-eye btn btn-success btn-sm"> view</i></td>
</tr>
<tr>
<td>
<img class="reqtableimg" src="https://i.pinimg.com/736x/5c/24/69/5c24695df36eee73abfbdd8274085ecd--cute-anime-guys-anime-boys.jpg"/> &nbsp;
<b>Arun Prakash</b><br>
<p class="addressp">34, Test Address Line, Coimbatore, TN</p>
</td>
<td><br>13-November-2020 10:30 AM</td>
<td><br><i class="fa fa-eye btn btn-success btn-sm"> View</i></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>



{% include "layout/footer.html" %}
1 change: 1 addition & 0 deletions checkout/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
path('property/<slug:slug>/request-to-rent/', RequestToRentPropertyCreateView, name="requestRent"),
path('property/<slug:slug>/request-to-tour/', RequestToTourPropertyCreateView, name="requestTour"),
path('services/<int:pk>/request-to-rent/', RequestToRentServiceCreateView, name="requestService"),
path('myrequests/', myrequest, name="myrequest"),
]
5 changes: 4 additions & 1 deletion checkout/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,7 @@ def RequestToRentServiceCreateView(request, pk):
messages.add_message(request, messages.SUCCESS, 'Request Sent Successfully.')
else:
messages.add_message(request, messages.ERROR, form.errors)
return redirect('services:servicesDetail', pk=pk)
return redirect('services:servicesDetail', pk=pk)

def myrequest(request):
return render(request, 'checkout/myrequest.html')
Binary file modified property/__pycache__/admin.cpython-36.pyc
Binary file not shown.
Binary file modified property/__pycache__/forms.cpython-36.pyc
Binary file not shown.
Binary file modified property/__pycache__/models.cpython-36.pyc
Binary file not shown.
Binary file modified property/__pycache__/views.cpython-36.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions property/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class PropertyNearbyInline(admin.TabularInline):
@admin.register(Property)
class PropertyAdmin(OSMGeoAdmin):
list_display = ['landlord', 'title', 'city']
readonly_fields = ['urlSlug', 'locationType', 'placeId', 'averageDistance', 'totalLikes', 'totalDislikes', 'updatedDate', 'createdDate']
readonly_fields = ['likes', 'dislikes', 'urlSlug', 'locationType', 'placeId', 'averageDistance', 'totalLikes', 'totalDislikes', 'updatedDate', 'createdDate']
fieldsets = [
(None, {'fields': ['landlord', 'title', 'urlSlug']}),
('Location Information', {'fields': ['city', 'zipcode', 'address', 'locationType',
Expand All @@ -47,7 +47,7 @@ class PropertyAdmin(OSMGeoAdmin):
'securityDeposit', 'amount', 'rentPerPerson', 'description']}),
('Extra Information', {'fields': ['utilities', 'garage', 'parkingSpace', 'amenities']}),
('Availability Dates', {'fields': ['fromDate', 'toDate']}),
('Likes & Dislikes', {'fields': ['totalLikes', 'totalDislikes']}),
('Likes & Dislikes', {'fields': ['likes', 'totalLikes', 'dislikes', 'totalDislikes']}),
('Important Date Information', {'fields': ['updatedDate', 'createdDate']}),
]
inlines = [PropertyImageInline, PropertyVideoInline, PropertyNearbyInline]
Expand Down
38 changes: 19 additions & 19 deletions property/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,53 +15,53 @@ class PropertyForm(forms.ModelForm):
amenity1 = forms.CharField(max_length=100,
widget=forms.TextInput(attrs={
'class': 'form-control',
'placeholder': 'Eg Pool'
'placeholder': 'Ex Pool'
}),
help_text="Add Minimum 4 Amenities."
)
amenity2 = forms.CharField(max_length=100,
widget=forms.TextInput(attrs={
'class': 'form-control',
'placeholder': 'Eg Gym'
'placeholder': 'Ex Gym'
}),
)
amenity3 = forms.CharField(max_length=100,
widget=forms.TextInput(attrs={
'class': 'form-control',
'placeholder': 'Eg Furnished'
'placeholder': 'Ex Furnished'
}),
)
amenity4 = forms.CharField(max_length=100,
widget=forms.TextInput(attrs={
'class': 'form-control',
'placeholder': 'Eg Unfurnished'
'placeholder': 'Ex Unfurnished'
}),
)
amenity5 = forms.CharField(max_length=100,
widget=forms.TextInput(attrs={
'class': 'form-control',
'placeholder': 'Eg Wifi'
'placeholder': 'Ex Wifi'
}),
required=False,
)
amenity6 = forms.CharField(max_length=100,
widget=forms.TextInput(attrs={
'class': 'form-control',
'placeholder': 'Eg Air Condition'
'placeholder': 'Ex Air Condition'
}),
required=False,
)

class Meta:
model = Property
exclude = ['landlord', 'likes', 'dislikes', 'amenities', 'averageDistance', 'location',
exclude = ['title', 'landlord', 'likes', 'dislikes', 'amenities', 'averageDistance', 'location',
'locationType', 'placeId']

widgets = {
'title': forms.TextInput(attrs={
'class': 'form-control',
'placeholder': "Enter property title",
}),
# 'title': forms.TextInput(attrs={
# 'class': 'form-control',
# 'placeholder': "Enter property title",
# }),
'description': forms.Textarea(attrs={
'class': 'form-control',
'placeholder': "Describe the property...",
Expand All @@ -74,9 +74,9 @@ class Meta:
'class': 'form-control',
'placeholder': "Enter Zipcode",
}),
'address': forms.Textarea(attrs={
'address': forms.TextInput(attrs={
'class': 'form-control',
'rows': '2'
'placeholder': 'Ex 1380, stonybrook'
}),
'parkingSpace': forms.NumberInput(attrs={
'class': 'utiltiesExpand',
Expand Down Expand Up @@ -146,7 +146,7 @@ class Meta:
widgets = {
'imageDescription': forms.TextInput(attrs = {
'class':'form-control imageDescriptionBox',
'placeholder': 'Eg Bedroom Image'
'placeholder': 'Ex Bedroom Image'
}),
'imagePath':forms.ClearableFileInput(attrs = {'class':'form-control', 'style': 'display: none'}),
}
Expand All @@ -164,7 +164,7 @@ class Meta:
widgets = {
'videoDescription': forms.TextInput(attrs = {
'class':'form-control videoDescriptionBox',
'placeholder': 'Eg Bedroom Video'
'placeholder': 'Ex Bedroom Video'
}),
'videoPath':forms.ClearableFileInput(attrs = {
'class': 'form-control',
Expand Down Expand Up @@ -210,10 +210,10 @@ class PropertyFilterSortForm(forms.Form):
maxPri = forms.IntegerField(required=False)
disPro = forms.FloatField(required=False)
disAmen = forms.FloatField(required=False)
amenities = forms.ModelMultipleChoiceField(widget=forms.CheckboxSelectMultiple(attrs={
'style': 'display:none; margin-top:10px;'
}),
queryset=Amenities.objects.all(), required=False)
# amenities = forms.ModelMultipleChoiceField(widget=forms.CheckboxSelectMultiple(attrs={
# 'style': 'display:none; margin-top:10px;'
# }),
# queryset=Amenities.objects.all(), required=False)
sort = forms.ChoiceField(widget=forms.Select(attrs={'class': 'custom-select'}),
choices=sortChoices, required=False)

Expand Down
1 change: 1 addition & 0 deletions property/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ def auto_add_unique_slug_field(sender, instance, **kwargs):
"""
Automatically add unique slug field to the Property models
"""
instance.title = '{}, {} {}'.format(instance.address, instance.city, instance.zipcode)
if instance.urlSlug:
prop = Property.objects.get(pk=instance.pk)
if instance.title != prop.title:
Expand Down
4 changes: 2 additions & 2 deletions property/templates/property/manage-properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h2 style="margin-bottom: 30px">
</div>
<div class="pxp-results-card-1-gradient"></div>
<div class="pxp-results-card-1-details">
<div class="pxp-results-card-1-details-title">{{object.title|title}}</div>
<div class="pxp-results-card-1-details-title">{{object.title}}</div>
<div class="pxp-results-card-1-details-price">${{object.rentPerPerson|intcomma}}</div>
</div>
<div class="pxp-results-card-1-features">
Expand All @@ -55,7 +55,7 @@ <h2 style="margin-bottom: 30px">
<span class="fa fa-times"></span>
</div> {% endcomment %}
</a>
<div class="container-fluid" style="color:#f2f2f2;margin-top:-30px; padding-bottom: 10px">
<div class="container-fluid" style="color:#f2f2f2;margin-top:-30px;">
<form method="POST" action="">
<div class="row">
<div class="col-md-6 form-control" id="leasedcheckdiv_{{object.id}}" onclick="leasedcheckclick({{object.id}})" style="border:none; border-radius:0px; background-color:#fff;">
Expand Down
11 changes: 6 additions & 5 deletions property/templates/property/properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ <h6>Price Range</h6>
<div class="pxp-content-side-search-form">
<div class="row pxp-content-side-search-form-row">

<div class="col-5 col-sm-5 col-md-2 col-lg-2 pxp-content-side-search-form-col">
<div class="col-5 col-sm-5 col-md-3 col-lg-3 pxp-content-side-search-form-col">
<select class="custom-select" id="pxp-p-search-status">
<option value="stony_brook" selected="selected">Stony Brook</option>
</select>
Expand All @@ -246,7 +246,7 @@ <h6>Price Range</h6>
<input type="text" class="form-control pxp-is-address" placeholder="Search by City, Neighborhood, or Address" id="pxp-p-search-address">
<span class="fa fa-search"></span>
</div-->
<div class="col-2 col-sm-1 col-md-4 col-lg-4 pxp-content-side-search-form-col" style="padding-left:10px;">
<div class="col-2 col-sm-1 col-md-3 col-lg-3 pxp-content-side-search-form-col" style="padding-left:10px;">
<div class="row">
<div class="col-md-12">
<span style="font-size:12px; position:absolute; font-family:Century Gothic;"> &nbsp; &nbsp; &nbsp; &nbsp; Distance from university</span>
Expand All @@ -258,7 +258,7 @@ <h6>Price Range</h6>
</div>
</div>
</div>
<div class="col-2 col-sm-1 col-md-4 col-lg-4 pxp-content-side-search-form-col" style="padding-left:10px;">
<div class="col-2 col-sm-1 col-md-3 col-lg-3 pxp-content-side-search-form-col" style="padding-left:10px;">
<div class="row">
<div class="col-md-12">
<span style="font-size:12px; position:absolute; font-family:Century Gothic;"> &nbsp; &nbsp; &nbsp; &nbsp; Distance to &nbsp; <abbr title="Restaurants"><i class="fa fa-cutlery" style="font-size:15px; color:#005918;"></i></abbr> &nbsp; <abbr title="Shopping"><i class="fa fa-shopping-bag" style="font-size:15px; color:#26006e;"></i></abbr> &nbsp; <abbr title="Beverages"><i class="fa fa-glass" style="font-size:15px; color:#750800;"></i></abbr></span>
Expand All @@ -271,7 +271,7 @@ <h6>Price Range</h6>
</div>
</div>

<div class="col-sm-1 col-md-2 col-lg-2">
<div class="col-sm-1 col-md-3 col-lg-3">
<div class="form-group">
{{filterSortForm.sort}}
{{filterSortForm.sort.errors}}
Expand Down Expand Up @@ -440,7 +440,7 @@ <h2 class="pxp-content-side-h2">{{total_count}} Results</h2>
</div>
<div class="pxp-results-card-1-gradient"></div>
<div class="pxp-results-card-1-details">
<div class="pxp-results-card-1-details-title">{{object.title|title|truncatechars:25}}</div>
<div class="pxp-results-card-1-details-title">{{object.title|truncatechars:25}}</div>
<div class="pxp-results-card-1-details-price">${{object.rentPerPerson|intcomma}}</div>
</div>
<div class="pxp-results-card-1-features">
Expand Down Expand Up @@ -528,6 +528,7 @@ <h2 class="pxp-content-side-h2">{{total_count}} Results</h2>
</div> <!--col-md-9-->
</div> <!--row-->
</div>
<br>

<script>
function toggle_filters()
Expand Down
Loading

0 comments on commit 56203de

Please sign in to comment.