Skip to content

Commit

Permalink
commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
zarakkhan209 committed Jan 8, 2024
1 parent 2ca6667 commit f8b69f2
Show file tree
Hide file tree
Showing 9 changed files with 612 additions and 159 deletions.
2 changes: 1 addition & 1 deletion baseTemplate/templates/baseTemplate/newBase.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
</div>
<ul id="dropdown-example" class="hidden py-2 space-y-2">
<li>
<a href="#"
<a href="{% url 'viewProfileV2' %}"
class="flex items-center w-full text-base font-normal text-white transition duration-75 rounded-lg group hover:bg-cyan-400 dark:text-white dark:hover:bg-gray-700 pl-11">
View
Profile</a>
Expand Down
72 changes: 72 additions & 0 deletions userManagment/templates/userManagment/userProfileV2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{% extends "baseTemplate/newBase.html" %}
{% load i18n %}
{% block titleNew %}{% trans "Home - CyberPanel" %}{% endblock %}
{% block newContent %}

{% load static %}

<div ng-controller="createPackage" class="p-8">
<div>
<p class="text-4xl font-bold">Account Details</p>
<p class="text-xs text-gray-600 py-2 font-semibold">List the account details for the currently logged in
user.</p>
</div>
<div>
<div class="py-4">
<p class="text-xl font-bold">General Information</p>
</div>
<hr>
<div>
<div class="flex mt-4 py-2 px-6">
<div>
<p class="font-semibold w-60">First Name</p>
</div>
<div>
<p class="w-80 bg-gray-100 rounded px-2 py-1">{{ firstName }}</p>
</div>
</div>
<div class="flex py-2 px-6">
<div>
<p class="font-semibold w-60">Last Name</p>
</div>
<div>
<p class="w-80 bg-gray-100 rounded px-2 py-1">{{ lastName }}</p>
</div>
</div>
<div class="flex py-2 px-6">
<div>
<p class="font-semibold w-60">Username</p>
</div>
<div>
<p class="w-80 bg-gray-100 rounded px-2 py-1">{{ userName }}</p>
</div>
</div>
<div class="flex py-2 px-6">
<div>
<p class="font-semibold w-60">Email</p>
</div>
<div>
<p class="w-80 bg-gray-100 rounded px-2 py-1">{{ email }}</p>
</div>
</div>
<div class="flex py-2 px-6">
<div>
<p class="font-semibold w-60">Account ACL</p>
</div>
<div>
<p class="w-80 bg-gray-100 rounded px-2 py-1">{{ accountACL }}</p>
</div>
</div>
<div class="flex py-2 px-6">
<div>
<p class="font-semibold w-60">Website Limit</p>
</div>
<div>
<p class="w-80 bg-gray-100 rounded px-2 py-1">{{ websitesLimit }} {% trans "( 0 = Unlimited )" %}</p>
</div>
</div>

</div>
</div>
</div>
{% endblock %}
1 change: 1 addition & 0 deletions userManagment/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

url(r'^$', views.loadUserHome, name='loadUsersHome'),
url(r'^viewProfile', views.viewProfile, name='viewProfile'),
url(r'^viewProfileV2', views.viewProfileV2, name='viewProfileV2'),
url(r'^createUser', views.createUser, name='createUser'),


Expand Down
16 changes: 16 additions & 0 deletions userManagment/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@ def viewProfile(request):
AdminData)
return proc.render()

def viewProfileV2(request):
userID = request.session['userID']
admin = Administrator.objects.get(pk=userID)

AdminData = {}

AdminData['userName'] = admin.userName
AdminData['firstName'] = admin.firstName
AdminData['lastName'] = admin.lastName
AdminData['websitesLimit'] = admin.initWebsitesLimit
AdminData['email'] = admin.email
AdminData['accountACL'] = admin.acl.name

proc = httpProc(request, 'userManagment/userProfileV2.html',
AdminData)
return proc.render()

def createUser(request):
userID = request.session['userID']
Expand Down
Loading

0 comments on commit f8b69f2

Please sign in to comment.