Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified FusionIIIT/Fusion/fusion.db
Binary file not shown.
2 changes: 2 additions & 0 deletions FusionIIIT/applications/scholarships/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ class Release(models.Model):
enddate = models.DateField()
award = models.CharField(default='',max_length=25)
remarks = models.TextField(max_length=500,default='')
notif_visible = models.IntegerField(default=1)
award_form_visible = models.IntegerField(default=0)

class Meta:
db_table = 'Release'
Expand Down
17 changes: 16 additions & 1 deletion FusionIIIT/applications/scholarships/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@
@login_required(login_url='/accounts/login')
def spacs(request):
# context = {}
if request.method == 'POST':
if 'studentapprovesubmit' in request.POST:
pk = request.POST.get('studentapprovesubmit')
obj1 = Release.objects.get(pk=pk)
obj1.notif_visible = 0
obj1.award_form_visible = 1
obj1.save()
if 'studentdeclinesubmit' in request.POST:
pk = request.POST.get('studentdeclinesubmit')
obj2 = Release.objects.get(pk=pk)
obj2.notif_visible = 0
obj2.award_form_visible = 0
obj2.save()
convener = Designation.objects.get(name='spacsconvenor')
assistant = Designation.objects.get(name='spacsassistant')
hd = HoldsDesignation.objects.filter(user=request.user,designation=convener)
Expand All @@ -54,7 +67,9 @@ def convener_view(request):
startdate=from_date,
enddate=to_date,
award=award,
remarks=remarks
remarks=remarks,
notif_visible=1,
award_form_visible=0
)
messages.success(request,award+' are invited successfully')
return HttpResponseRedirect('/spacs/convener_view')
Expand Down
152 changes: 79 additions & 73 deletions FusionIIIT/templates/scholarshipsModule/applyNew.html

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions FusionIIIT/templates/scholarshipsModule/browsecatalogue.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
</div>



</div>
<div class="ui vertical segment">
<div class="ui grid row">
<div class="twelve wide column centered"> <label class="ui header" id="content_heading"> </label> </div>
Expand Down Expand Up @@ -84,4 +82,4 @@



{% endblock javascript %}
{% endblock javascript %}
76 changes: 60 additions & 16 deletions FusionIIIT/templates/scholarshipsModule/scholarships_student.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
<i class="right floated chevron right icon"></i>
</a>









<a class="item" data-tab="two">
Spacs Members Details
<i class="right floated chevron right icon"></i>
Expand All @@ -53,7 +53,7 @@
Apply for Awards
<i class="right floated chevron right icon"></i>
</a>

<a class="item" data-tab="four">
View Application Status
<i class="right floated chevron right icon"></i>
Expand All @@ -62,7 +62,7 @@
Browse Award Catalogue
<i class="right floated chevron right icon"></i>
</a>

</div>
{% comment %}The Tab-Menu ends here!{% endcomment %}

Expand All @@ -85,21 +85,21 @@
</div>
{% comment %}The Personal Details end here!{% endcomment %}


{% comment %}The Publications starts here!{% endcomment %}

{% comment %}The Publications notionalprize ends here!{% endcomment %}



{% comment %}The Publications about spacs starts here!{% endcomment %}
<div class="ui tab segment" data-tab="two">
{% block aboutspacs %}
{% include 'scholarshipsModule/aboutspacs.html' with hd=hd hd1=hd1 %}
{% endblock %}
</div>
{% comment %}The Publications about spacs ends here!{% endcomment %}

{% comment %}The Publications awards starts here!{% endcomment %}
<div class="ui tab segment" data-tab="three">
{% block awards %}
Expand All @@ -108,7 +108,7 @@
</div>
{% comment %}The Publications about awards ends here!{% endcomment %}


<div class="ui tab segment" data-tab="four">
{% block viewmcm %}
{% include 'scholarshipsModule/viewstatus.html' with winners=winners mcm=mcm gold=gold silver=silver dandm=dandm %}
Expand All @@ -119,15 +119,15 @@
{% include 'scholarshipsModule/browsecatalogue.html' with winners=winners mcm=mcm gold=gold silver=silver dandm=dandm awards=awards %}
{% endblock %}
</div>

{% comment %}The Publications about view mcm details ends here!{% endcomment %}
</div>
{% comment %}The central-rail segment ends here!{% endcomment %}

{% comment %}The right-rail segment starts here!{% endcomment %}
<div class="three wide column">
<div class="row">

{% if messages %}
<div class="field">
<div class="ui positive message">
Expand All @@ -140,9 +140,53 @@
</div>
</div>
{% endif %}

</div>
</div>


{% if release %}

<div class="ui cards">

{% for m in release %}
{% if m.notif_visible == 1 %}
<div class="ui fluid card">
<div class="content">
<div class="header">
{{ m.award }} Invitation
</div>
<div class="meta">
Last Date: {{ m.enddate }}
</div>

<div class="ui divider"></div>

<div class="description">
<p>{{ m.remarks }} </p>
<p>Do you want to accept the invitation?</p>
</div>
</div>
<div class="extra content">
<div class="ui two buttons">
<form method="post" action="{% url 'spacs:spacs' %}" class="ui form" role="form">
{% csrf_token %}
<button name="studentapprovesubmit" value="{{ m.pk }}" class="ui basic green button" type="submit">Apply</button>
</form>
<form method="post" action="{% url 'spacs:spacs' %}" class="ui form" role="form">
{% csrf_token %}
<button name="studentdeclinesubmit" value="{{ m.pk }}" class="ui basic red button" type="submit">Ignore</button>
</form>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>


{% endif %}
</div>

{% comment %}The right-rail segment ends here!{% endcomment %}

{% comment %}The right-margin segment!{% endcomment %}
Expand All @@ -168,4 +212,4 @@
})
;
</script>
{% endblock %}
{% endblock %}
12 changes: 7 additions & 5 deletions FusionIIIT/templates/scholarshipsModule/winners.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
</tbody>
</table>



<br>

Expand Down Expand Up @@ -145,6 +145,12 @@
console.log(response.result)
}
else{
txt="<tr>";
txt += '<td>' + "" + '</td>' +
'<td>' + "No Data Found!!" + '</td>' +
'<td>' + "" + '</td>';
txt +='</tr>';
element.after(txt);
console.log(response.result);
}

Expand All @@ -157,7 +163,3 @@
</script>

{% endblock javascript %}