FossilRepo

fossilrepo / templates / organization / user_detail.html
Source Blame History 146 lines
c588255… ragelink 1 {% extends "base.html" %}
c588255… ragelink 2 {% block title %}{{ target_user.username }} — Fossilrepo{% endblock %}
c588255… ragelink 3
c588255… ragelink 4 {% block content %}
c588255… ragelink 5 <div class="mb-6">
c588255… ragelink 6 <a href="{% url 'organization:members' %}" class="text-sm text-brand-light hover:text-brand">&larr; Back to Members</a>
c588255… ragelink 7 </div>
c588255… ragelink 8
c588255… ragelink 9 <div class="overflow-hidden rounded-lg bg-gray-800 shadow border border-gray-700">
c588255… ragelink 10 <div class="px-6 py-5 sm:flex sm:items-center sm:justify-between">
c588255… ragelink 11 <div>
c588255… ragelink 12 <h1 class="text-2xl font-bold text-gray-100">{{ target_user.username }}</h1>
c588255… ragelink 13 <p class="mt-1 text-sm text-gray-400">{{ target_user.get_full_name|default:"No name set" }}</p>
c588255… ragelink 14 </div>
c588255… ragelink 15 <div class="mt-4 flex gap-3 sm:mt-0">
c588255… ragelink 16 {% if can_manage %}
c588255… ragelink 17 <a href="{% url 'organization:user_edit' username=target_user.username %}"
c588255… ragelink 18 class="rounded-md bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600">
c588255… ragelink 19 Edit
c588255… ragelink 20 </a>
c588255… ragelink 21 <a href="{% url 'organization:user_password' username=target_user.username %}"
c588255… ragelink 22 class="rounded-md bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600">
c588255… ragelink 23 Change Password
c588255… ragelink 24 </a>
c588255… ragelink 25 {% elif request.user.pk == target_user.pk %}
c588255… ragelink 26 <a href="{% url 'organization:user_password' username=target_user.username %}"
c588255… ragelink 27 class="rounded-md bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600">
c588255… ragelink 28 Change Password
c588255… ragelink 29 </a>
c588255… ragelink 30 {% endif %}
c588255… ragelink 31 </div>
c588255… ragelink 32 </div>
c588255… ragelink 33
c588255… ragelink 34 <div class="border-t border-gray-700 px-6 py-5">
c588255… ragelink 35 <dl class="grid grid-cols-1 gap-x-4 gap-y-6 sm:grid-cols-2">
c588255… ragelink 36 <div>
c588255… ragelink 37 <dt class="text-sm font-medium text-gray-400">Email</dt>
c588255… ragelink 38 <dd class="mt-1 text-sm text-gray-100">{{ target_user.email|default:"--" }}</dd>
c588255… ragelink 39 </div>
c588255… ragelink 40 <div>
c588255… ragelink 41 <dt class="text-sm font-medium text-gray-400">Full Name</dt>
c588255… ragelink 42 <dd class="mt-1 text-sm text-gray-100">{{ target_user.get_full_name|default:"--" }}</dd>
c588255… ragelink 43 </div>
c588255… ragelink 44 <div>
c588255… ragelink 45 <dt class="text-sm font-medium text-gray-400">Status</dt>
c588255… ragelink 46 <dd class="mt-1">
c588255… ragelink 47 {% if target_user.is_active %}
c588255… ragelink 48 <span class="inline-flex rounded-full bg-green-900/50 px-2 text-xs font-semibold leading-5 text-green-300">Active</span>
c588255… ragelink 49 {% else %}
c588255… ragelink 50 <span class="inline-flex rounded-full bg-gray-700 px-2 text-xs font-semibold leading-5 text-gray-300">Inactive</span>
c588255… ragelink 51 {% endif %}
c588255… ragelink 52 {% if target_user.is_staff %}
c588255… ragelink 53 <span class="ml-1 inline-flex rounded-full bg-purple-900/50 px-2 text-xs font-semibold leading-5 text-purple-300">Staff</span>
c588255… ragelink 54 {% endif %}
c588255… ragelink 55 {% if target_user.is_superuser %}
c588255… ragelink 56 <span class="ml-1 inline-flex rounded-full bg-yellow-900/50 px-2 text-xs font-semibold leading-5 text-yellow-300">Superuser</span>
c588255… ragelink 57 {% endif %}
c588255… ragelink 58 </dd>
c588255… ragelink 59 </div>
c588255… ragelink 60 <div>
c588255… ragelink 61 <dt class="text-sm font-medium text-gray-400">Date Joined</dt>
c588255… ragelink 62 <dd class="mt-1 text-sm text-gray-400">{{ target_user.date_joined|date:"N j, Y g:i a" }}</dd>
c588255… ragelink 63 </div>
c588255… ragelink 64 <div>
c588255… ragelink 65 <dt class="text-sm font-medium text-gray-400">Last Login</dt>
c588255… ragelink 66 <dd class="mt-1 text-sm text-gray-400">{{ target_user.last_login|date:"N j, Y g:i a"|default:"Never" }}</dd>
c588255… ragelink 67 </div>
c588255… ragelink 68 {% if membership %}
c588255… ragelink 69 <div>
c588255… ragelink 70 <dt class="text-sm font-medium text-gray-400">Member Since</dt>
c588255… ragelink 71 <dd class="mt-1 text-sm text-gray-400">{{ membership.created_at|date:"N j, Y g:i a" }}</dd>
c588255… ragelink 72 </div>
c588255… ragelink 73 <div>
c588255… ragelink 74 <dt class="text-sm font-medium text-gray-400">Role</dt>
c588255… ragelink 75 <dd class="mt-1">
c588255… ragelink 76 {% if membership.role %}
c588255… ragelink 77 <a href="{% url 'organization:role_detail' slug=membership.role.slug %}" class="inline-flex rounded-full bg-purple-900/50 px-2 text-xs font-semibold leading-5 text-purple-300 hover:text-purple-200">{{ membership.role.name }}</a>
c588255… ragelink 78 <p class="mt-1 text-xs text-gray-500">{{ membership.role.description }}</p>
c588255… ragelink 79 {% else %}
c588255… ragelink 80 <span class="text-sm text-gray-500">No role assigned</span>
c588255… ragelink 81 {% endif %}
c588255… ragelink 82 </dd>
c588255… ragelink 83 </div>
c588255… ragelink 84 {% endif %}
c588255… ragelink 85 </dl>
c588255… ragelink 86 </div>
c588255… ragelink 87 </div>
c588255… ragelink 88
c588255… ragelink 89 <div class="mt-8">
c588255… ragelink 90 <h2 class="text-lg font-semibold text-gray-100 mb-4">Team Memberships</h2>
7d099f3… ragelink 91 <div class="overflow-x-auto rounded-lg border border-gray-700 bg-gray-800 shadow-sm">
c588255… ragelink 92 <table class="min-w-full divide-y divide-gray-700">
c588255… ragelink 93 <thead class="bg-gray-900">
c588255… ragelink 94 <tr>
c588255… ragelink 95 <th class="px-6 py-3 text-left text-xs font-medium uppercase text-gray-400">Team</th>
c588255… ragelink 96 <th class="px-6 py-3 text-left text-xs font-medium uppercase text-gray-400">Description</th>
c588255… ragelink 97 </tr>
c588255… ragelink 98 </thead>
c588255… ragelink 99 <tbody class="divide-y divide-gray-700 bg-gray-800">
c588255… ragelink 100 {% for team in user_teams %}
c588255… ragelink 101 <tr class="hover:bg-gray-700/50">
c588255… ragelink 102 <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
c588255… ragelink 103 <a href="{% url 'organization:team_detail' slug=team.slug %}" class="text-brand-light hover:text-brand">{{ team.name }}</a>
c588255… ragelink 104 </td>
c588255… ragelink 105 <td class="px-6 py-4 text-sm text-gray-400">{{ team.description|default:"--"|truncatewords:15 }}</td>
c588255… ragelink 106 </tr>
c588255… ragelink 107 {% empty %}
c588255… ragelink 108 <tr>
c588255… ragelink 109 <td colspan="2" class="px-6 py-8 text-center text-sm text-gray-400">Not a member of any teams.</td>
c588255… ragelink 110 </tr>
c588255… ragelink 111 {% endfor %}
c588255… ragelink 112 </tbody>
c588255… ragelink 113 </table>
c588255… ragelink 114 </div>
c588255… ragelink 115 </div>
c588255… ragelink 116
c588255… ragelink 117 <div class="mt-8">
c588255… ragelink 118 <h2 class="text-lg font-semibold text-gray-100 mb-4">SSH Keys</h2>
7d099f3… ragelink 119 <div class="overflow-x-auto rounded-lg border border-gray-700 bg-gray-800 shadow-sm">
c588255… ragelink 120 <table class="min-w-full divide-y divide-gray-700">
c588255… ragelink 121 <thead class="bg-gray-900">
c588255… ragelink 122 <tr>
c588255… ragelink 123 <th class="px-6 py-3 text-left text-xs font-medium uppercase text-gray-400">Title</th>
c588255… ragelink 124 <th class="px-6 py-3 text-left text-xs font-medium uppercase text-gray-400">Type</th>
c588255… ragelink 125 <th class="px-6 py-3 text-left text-xs font-medium uppercase text-gray-400">Fingerprint</th>
c588255… ragelink 126 <th class="px-6 py-3 text-left text-xs font-medium uppercase text-gray-400">Added</th>
c588255… ragelink 127 </tr>
c588255… ragelink 128 </thead>
c588255… ragelink 129 <tbody class="divide-y divide-gray-700 bg-gray-800">
c588255… ragelink 130 {% for key in ssh_keys %}
c588255… ragelink 131 <tr class="hover:bg-gray-700/50">
c588255… ragelink 132 <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-100">{{ key.title }}</td>
c588255… ragelink 133 <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-400">{{ key.key_type|default:"--" }}</td>
c588255… ragelink 134 <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-400 font-mono">{{ key.fingerprint|default:"--"|truncatechars:30 }}</td>
c588255… ragelink 135 <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-400">{{ key.created_at|date:"N j, Y" }}</td>
c588255… ragelink 136 </tr>
c588255… ragelink 137 {% empty %}
c588255… ragelink 138 <tr>
c588255… ragelink 139 <td colspan="4" class="px-6 py-8 text-center text-sm text-gray-400">No SSH keys.</td>
c588255… ragelink 140 </tr>
c588255… ragelink 141 {% endfor %}
c588255… ragelink 142 </tbody>
c588255… ragelink 143 </table>
c588255… ragelink 144 </div>
c588255… ragelink 145 </div>
c588255… ragelink 146 {% endblock %}

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button