summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlwin18472072019-10-17 20:41:26 +0530
committerAlwin18472072019-10-17 20:41:26 +0530
commit29c4eac52785d409d27d949527836dff0f855cdc (patch)
treec3ef4d3fa65d4424800fbd0347e2330df4fefe78
parente52409e43fffb75dfc31a0d3ad2d8bedac912694 (diff)
downloadFOSSEE_animations-29c4eac52785d409d27d949527836dff0f855cdc.tar.gz
FOSSEE_animations-29c4eac52785d409d27d949527836dff0f855cdc.tar.bz2
FOSSEE_animations-29c4eac52785d409d27d949527836dff0f855cdc.zip
Formatting chages for delete and segegrate proposal PR's
-rw-r--r--.gitignore1
-rw-r--r--fossee_manim/templates/fossee_manim/delete_proposal.html38
-rw-r--r--fossee_manim/templates/fossee_manim/proposal_status.html9
-rw-r--r--fossee_manim/views.py34
4 files changed, 60 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore
index 7461676..5f6e127 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,7 @@ migrations/
#VS code
.vscode/
+.idea/
index_clutter.html
base_clutter.html
diff --git a/fossee_manim/templates/fossee_manim/delete_proposal.html b/fossee_manim/templates/fossee_manim/delete_proposal.html
index 4c0db5e..6b870a2 100644
--- a/fossee_manim/templates/fossee_manim/delete_proposal.html
+++ b/fossee_manim/templates/fossee_manim/delete_proposal.html
@@ -1,24 +1,27 @@
{% extends 'fossee_manim/base.html' %}
{% block title %}
- Delete Proposal
+Delete Proposal
{% endblock %}
{% block content %}
- <br>
- <div class="container">
- <center>
- <h2>Delete Proposal : {{ proposal.title }}</h2>
- </center>
- <table class="table table-hover" style="font-family: 'Lato', sans-serif;">
- <tbody>
+<br>
+<div class="container">
+ <!--
+ This page shows the basic details of the proposal that the user choose to delete
+ -->
+ <center>
+ <h2>Delete Proposal : {{ proposal.title }}</h2>
+ </center>
+ <table class="table table-hover" style="font-family: 'Lato', sans-serif;">
+ <tbody>
<tr>
<td>Proposal Name :</td>
<td>{{ proposal.title }}</td>
</tr>
<tr>
<td>Proposal category :</td>
- <td>{{ proposal.categorye }}</td>
+ <td>{{ proposal.category }}</td>
</tr>
<tr>
<td>Sub Category :</td>
@@ -33,14 +36,15 @@
<td>{{ proposal.created }}</td>
</tr>
<tr>
-<td colspan="2">
- <center>
- <a href="{% url 'delete_proposal_info' proposal.id %}"><button type="button" class="btn btn-info" id="btnred">Delete {{ proposal.title }}</button></a>
- </center>
-</td>
+ <td colspan="2">
+ <center>
+ <a href="{% url 'delete_proposal_info' proposal.id %}"><button type="button"
+ class="btn btn-info" id="btnred">Delete {{ proposal.title }}</button></a>
+ </center>
+ </td>
</tr>
- </tbody>
- </table>
- </div>
+ </tbody>
+ </table>
+</div>
{% endblock %} \ No newline at end of file
diff --git a/fossee_manim/templates/fossee_manim/proposal_status.html b/fossee_manim/templates/fossee_manim/proposal_status.html
index 2b5387f..81af9ec 100644
--- a/fossee_manim/templates/fossee_manim/proposal_status.html
+++ b/fossee_manim/templates/fossee_manim/proposal_status.html
@@ -11,6 +11,14 @@
<h2> Proposal Status </h2>
<hr>
<div class="row">
+ <!--
+ This filtering section contains
+ 1. Search option for the submitted proposal
+ 2. Select the proposals who ahve the status Rejected
+ 3. Select the proposals who ahve the status Released
+ 4. Select the proposals who ahve the status Changes
+ 5. Select the proposals who ahve the status Pending
+ -->
<div class="col-md-4">
<form class="form-inline" method="POST" action="/search_proposal/">
{% csrf_token %}
@@ -45,6 +53,7 @@
<button type="button" class="btn btn-info" id="btnred">Pending</button>
</a>
</div>
+ <!-- end of filtering section -->
</div>
<hr>
<table class="table table-hover" style="font-family: 'Lato', sans-serif;">
diff --git a/fossee_manim/views.py b/fossee_manim/views.py
index 59eac34..314b83f 100644
--- a/fossee_manim/views.py
+++ b/fossee_manim/views.py
@@ -2,7 +2,7 @@ from os import listdir, path, sep, makedirs, remove
from .forms import (
UserRegistrationForm, UserLoginForm,
ProfileForm, AnimationProposal,
- CommentForm, UploadAnimationForm,AnimationProposal_edit
+ CommentForm, UploadAnimationForm, AnimationProposal_edit
)
from .models import (
Profile, User, AnimationStats,
@@ -334,6 +334,8 @@ def proposal_status(request):
else:
return redirect('/login/')
+
+# this method return the proposal in the status of released
@login_required
def sortproposal_released(request):
user = request.user
@@ -341,8 +343,11 @@ def sortproposal_released(request):
profile = Profile.objects.get(user_id=user)
categories = Category.objects.all()
if profile.position == 'contributor':
- animations = Animation.objects.filter(contributor_id=user,status='released').order_by('-created')
+ # filtering with the proposal status
+ animations = Animation.objects.filter(contributor_id=user,
+ status='released').order_by('-created')
else:
+ # filtering with the proposal status
animations = Animation.objects.filter(status='released').order_by('-created')
# print(animations)
@@ -365,6 +370,8 @@ def sortproposal_released(request):
else:
return redirect('/login/')
+
+# this method return the proposal in the status of rejected
@login_required
def sortproposal_rejected(request):
user = request.user
@@ -372,8 +379,11 @@ def sortproposal_rejected(request):
profile = Profile.objects.get(user_id=user)
categories = Category.objects.all()
if profile.position == 'contributor':
- animations = Animation.objects.filter(contributor_id=user,status='rejected').order_by('-created')
+ # filtering with the proposal status
+ animations = Animation.objects.filter(contributor_id=user,
+ status='rejected').order_by('-created')
else:
+ # filtering with the proposal status
animations = Animation.objects.filter(status='rejected').order_by('-created')
# print(animations)
@@ -396,6 +406,8 @@ def sortproposal_rejected(request):
else:
return redirect('/login/')
+
+# this method return the proposal in the status of changes
@login_required
def sortproposal_changes(request):
user = request.user
@@ -403,8 +415,11 @@ def sortproposal_changes(request):
profile = Profile.objects.get(user_id=user)
categories = Category.objects.all()
if profile.position == 'contributor':
- animations = Animation.objects.filter(contributor_id=user,status='changes').order_by('-created')
+ # filtering with the proposal status
+ animations = Animation.objects.filter(contributor_id=user,
+ status='changes').order_by('-created')
else:
+ # filtering with the proposal status
animations = Animation.objects.filter(status='changes').order_by('-created')
# print(animations)
@@ -427,6 +442,8 @@ def sortproposal_changes(request):
else:
return redirect('/login/')
+
+# this method return the proposal in the status of pending
@login_required
def sortproposal_pending(request):
user = request.user
@@ -434,8 +451,11 @@ def sortproposal_pending(request):
profile = Profile.objects.get(user_id=user)
categories = Category.objects.all()
if profile.position == 'contributor':
- animations = Animation.objects.filter(contributor_id=user,status='pending').order_by('-created')
+ # filtering with the proposal status
+ animations = Animation.objects.filter(contributor_id=user,
+ status='pending').order_by('-created')
else:
+ # filtering with the proposal status
animations = Animation.objects.filter(status='pending').order_by('-created')
# print(animations)
@@ -551,6 +571,7 @@ def edit_proposal(request, proposal_id=None):
'msg': msg})
+# this method is used to return the details the proposal selected to delete
@login_required
def delete_proposal(request, proposal_id=None):
user = request.user
@@ -562,12 +583,15 @@ def delete_proposal(request, proposal_id=None):
return redirect('/register/')
+# this method is used to delete the selected proposal by the reviever
@login_required
def delete_proposal_info(request, proposal_id=None):
user = request.user
if is_email_checked(user) and user.is_authenticated():
+ # delete the selected proposal
proposal = Animation.objects.get(id=proposal_id)
proposal.delete()
+ # loading the proposal page to redirect after deleting one proposal
profile = Profile.objects.get(user_id=user)
categories = Category.objects.all()
if profile.position == 'contributor':