Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footer and our team models #59

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions src/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -11358,6 +11358,7 @@ a:focus {
.sidebar {
width: 6.5rem;
min-height: 100vh;
z-index: 100;
}

.sidebar .nav-item {
Expand Down
1 change: 1 addition & 0 deletions src/static/css/styles.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/static/scss/navs/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.sidebar {
width: $sidebar-collapsed-width;
min-height: 100vh;
z-index: 100;
.nav-item {
position: relative;
&:last-child {
Expand Down
25 changes: 7 additions & 18 deletions src/templates/components/pages/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,14 @@ <h3>Digital Logbook</h3>
A perfect initiative to avoid the paper work and a complete record of all
you important projects.
</p>
<ul class="socials">
<li>
<a href="#"><i class="fa fa-facebook"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-twitter"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-google-plus"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-youtube"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-linkedin-square"></i></a>
</li>
</ul>
</div>
<p class="text-center">
<a href="mailto:logbook@thapar.edu" class="text-decoration-none text-white">
<i class="fa fa-envelope" aria-hidden="true"></i>
Contact us
</a>
</p>
<div class="footer-bottom">
<p>copyright &copy;2021 LogBook. designed by <span class="text-dark">thapar</span></p>
<p class="m-0">copyright &copy;2021 LogBook. <br><br> designed by <a href="{% url 'ourteam' %}" class="text-dark font-weight-bold">Team</a> at Thapar Institue of Engineering and Technology</p>
</div>
</footer>
6 changes: 3 additions & 3 deletions src/user_management/admin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from django.contrib import admin

from .models import FieldStudy, TechSkill, Profile, Link, Team, TeamMember
from .models import FieldStudy, TechSkill, Profile, Link, Phase, Member


@admin.register(FieldStudy)
Expand Down Expand Up @@ -72,13 +72,13 @@ class LinkAdmin(admin.ModelAdmin):
search_fields = ('name',)


@admin.register(Team)
@admin.register(Phase)
class LinkAdmin(admin.ModelAdmin):
list_display = ('name',)
search_fields = ('name',)


@admin.register(TeamMember)
@admin.register(Member)
class LinkAdmin(admin.ModelAdmin):
list_display = ('name', "order", 'designation')
list_per_page = 15
Expand Down
21 changes: 21 additions & 0 deletions src/user_management/migrations/0006_auto_20210318_1445.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 3.0.7 on 2021-03-18 09:15

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('user_management', '0005_auto_20210311_1325'),
]

operations = [
migrations.RenameModel(
old_name='TeamMember',
new_name='Member',
),
migrations.RenameModel(
old_name='Team',
new_name='Phase',
),
]
17 changes: 17 additions & 0 deletions src/user_management/migrations/0007_auto_20210318_1448.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.0.7 on 2021-03-18 09:18

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('user_management', '0006_auto_20210318_1445'),
]

operations = [
migrations.AlterModelOptions(
name='phase',
options={'ordering': ('-order',)},
),
]
8 changes: 4 additions & 4 deletions src/user_management/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,25 @@ def validate_image(image):
raise ValidationError("Max size of file is 2 MB")


class Team(models.Model):
class Phase(models.Model):
name = models.CharField(max_length=255)
order = models.IntegerField(blank=True, null=True)

class Meta:
ordering = ("order",)
ordering = ("-order",)

def __str__(self):
return self.name


class TeamMember(models.Model):
class Member(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
name = models.CharField(max_length=255)
designation = models.CharField(max_length=255)
image = models.ImageField(upload_to='team_member',
validators=[validate_image])
linkdinURL = models.URLField()
team = models.ManyToManyField(Team, blank=True)
team = models.ManyToManyField(Phase, blank=True)
order = models.IntegerField(blank=True, null=True)

class Meta:
Expand Down
6 changes: 3 additions & 3 deletions src/user_management/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
DeleteView
)

from .models import Team, TeamMember
from .models import Phase, Member


class RedirectingLoginView(LoginView):
Expand Down Expand Up @@ -107,8 +107,8 @@ def landing_page_view(request):


def ourteam(request):
teams = Team.objects.all()
members = TeamMember.objects.all()
teams = Phase.objects.all()
members = Member.objects.all()

context = {
"teams": teams,
Expand Down