summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholyantony2015-09-24 15:16:50 +0530
committerholyantony2015-09-24 15:16:50 +0530
commitbacee20d83e33674b12cd87ee75d1d14f6810610 (patch)
treeb7a8a58b29f114f76f81fda3b7512ea752127895
parentce96f5b782e37c019ee8f69c8067a96e33e6f1a0 (diff)
downloadFOSSEE-Forum-bacee20d83e33674b12cd87ee75d1d14f6810610.tar.gz
FOSSEE-Forum-bacee20d83e33674b12cd87ee75d1d14f6810610.tar.bz2
FOSSEE-Forum-bacee20d83e33674b12cd87ee75d1d14f6810610.zip
Subject: Fixed error if no profile is present
Description: 1. Removed last question and view previous question from slick-list 2. Removed color for user_name 3. Tooltip removed from all table
-rw-r--r--forums/views.py10
-rw-r--r--static/website/css/main.css5
-rw-r--r--static/website/templates/filter.html8
-rw-r--r--static/website/templates/get-question.html7
-rw-r--r--static/website/templates/index.html8
-rw-r--r--static/website/templates/questions.html6
6 files changed, 25 insertions, 19 deletions
diff --git a/forums/views.py b/forums/views.py
index ebb44ca..ffa4984 100644
--- a/forums/views.py
+++ b/forums/views.py
@@ -133,12 +133,20 @@ def account_profile(request, username):
def account_view_profile(request, username):
user = User.objects.get(username = username)
- profile = Profile.objects.filter(user = user)[0]
+ profile = Profile.objects.filter(user = user)
+ prof = None
+ if profile:
+ prof = profile[0]
+
+ print "profile"
+ print profile
context = {
'profile' : profile,
'media_url' : settings.MEDIA_URL,
}
return render(request, 'forums/templates/view-profile.html', context)
+
+
def send_registration_confirmation(user):
diff --git a/static/website/css/main.css b/static/website/css/main.css
index 4debbbd..19d4136 100644
--- a/static/website/css/main.css
+++ b/static/website/css/main.css
@@ -98,7 +98,6 @@ body {
#content .question {
position: relative;
padding: 30px 0 15px 0;
- border-bottom: 1px solid #f5f5f5;
}
#content .editable {
padding: 15px 5px 15px 5px;
@@ -361,12 +360,12 @@ table .question a{
color: #a26dc8;
}
.carousel, .slick-list {
- height: 245px;
+ height: 178px;
margin-right: -2px;
}
.carousel .thumbnail {
width: 97%;
- height: 245px;
+ height: 178px;
border: 1px solid #cccccc;
}
.carousel .thumbnail img {
diff --git a/static/website/templates/filter.html b/static/website/templates/filter.html
index b51818a..4e589d4 100644
--- a/static/website/templates/filter.html
+++ b/static/website/templates/filter.html
@@ -17,8 +17,6 @@
<h5 style="padding-top: 15px;">
These are the similar questions in:
-
-
{% for category in categories %}
{% if category %}
{{ category }}
@@ -59,14 +57,14 @@
<tr {% if question.id == qid %}class="parent-filter"{% endif %}>
<td></td>
<td>
- <span class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category }}">
+ <span class="category" data-toggle="tooltip" data-placement="top" >
<a class="pull-left" href="{% url 'website:filter' question.category|lower %}?qid={{ question.id }}">
{{ question.category|truncatechars:12 }} </a>
</span>
</td>
<td>
- <span class="question" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
+ <span class="question" data-toggle="tooltip" data-placement="top" >
<a href="{% url 'website:get_question' question.id %}{% prettify question.title %}">{{ question.title|truncatechars:40 }}</a>
</span>
</td>
@@ -88,7 +86,7 @@
</td>
<td>
- <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}">
+ <span class="title" data-toggle="tooltip" data-placement="top" >
{{ question.user|truncatechars:10 }}
</span>
</td>
diff --git a/static/website/templates/get-question.html b/static/website/templates/get-question.html
index 388a8c6..e7b3fe7 100644
--- a/static/website/templates/get-question.html
+++ b/static/website/templates/get-question.html
@@ -161,14 +161,15 @@
{% endif %}
</div> <!-- /.answer -->
- <div class="row">
- <div class="comments pull-right col-lg-11 col-md-11 col-sm-11 col-xs-11">
+ <div class="row" style="padding-left: 40px">
+ <div class="comments pull-right col-lg-11 col-md-11 col-sm-11 col-xs-11" >
<!-- displaying comments -->
{% for comment in answer.answercomment_set.all %}
<div class="comment comment{{ comment.id }}">
<div class="body" id="cbody{{ comment.id }}">
{{ comment.body|safe }}
</div>
+ <br>
<span class="meta_co" style="position: absolute;right: 0px; bottom: 0px;">
<small>
@@ -177,7 +178,7 @@
</i>
</small>
- <span class="user_co" style="padding: 2px 7px">
+ <span style="padding: 2px 7px">
{{ comment.user }}
</span>
</span>
diff --git a/static/website/templates/index.html b/static/website/templates/index.html
index f78d952..5bcec04 100644
--- a/static/website/templates/index.html
+++ b/static/website/templates/index.html
@@ -74,7 +74,7 @@
<small class="category">
{{ category.description }}
</small>
- {% latest_question category %}
+
<a class="btn btn-xs btn-block btn-success" href="{% url 'website:new_question' %}?category={{ category.id|urlencode }}">Ask new question</a>
@@ -130,7 +130,7 @@
<tr>
<td></td>
<td>
- <span class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
+ <span class="category" data-toggle="tooltip" data-placement="top" >
<a class="pull-left" href="{% url 'website:filter' question.category|lower %}?qid={{ question.id }}">
{{ question.category|truncatechars:12 }}
@@ -140,7 +140,7 @@
</td>
<td>
- <span class="question" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
+ <span class="question" data-toggle="tooltip" data-placement="top" >
<a href="{% url 'website:get_question' question.id %}{% prettify question.title %}">{{ question.title|truncatechars:40 }}</a>
</span>
</td>
@@ -162,7 +162,7 @@
</td>
<td>
- <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}">
+ <span class="title" data-toggle="tooltip" data-placement="top" >
{{ question.user|truncatechars:10 }}
</span>
</td>
diff --git a/static/website/templates/questions.html b/static/website/templates/questions.html
index b7c2a45..cbed87a 100644
--- a/static/website/templates/questions.html
+++ b/static/website/templates/questions.html
@@ -38,7 +38,7 @@
<tr>
<td> </td>
<td>
- <span class="category" data-toggle="tooltip" data-placement="top" title="{{ question.category}}">
+ <span class="category" data-toggle="tooltip" data-placement="top" >
<a class="pull-left" href="{% url 'website:filter' question.category|lower %}?qid={{ question.id }}">
{{ question.category|truncatechars:12 }}
@@ -49,7 +49,7 @@
<td>
- <span class="question" data-toggle="tooltip" data-placement="top" title="{{ question.title }}">
+ <span class="question" data-toggle="tooltip" data-placement="top" >
<a href="{% url 'website:get_question' question.id %}">{{ question.title|truncatechars:40 }}</a>
</span>
</td>
@@ -76,7 +76,7 @@
</td>
<td>
- <span class="title" data-toggle="tooltip" data-placement="top" title="{{ question.user }}">
+ <span class="title" data-toggle="tooltip" data-placement="top" >
{{ question.user|truncatechars:10 }}
</span>
</td>