FossilRepo

Restructure sidebar: group admin items under collapsible Admin section Groups, Teams, Roles, Members, Settings, Audit Log now nested under a collapsible Admin section in the sidebar. Django admin renamed to "Super Admin" and tucked inside as an escape hatch for power users. Cleaner nav — regular users see Projects, KB, Fossil Guide. Admins get the full management menu collapsed by default.

lmata 2026-04-07 15:17 trunk
Commit f45dca44c4b8387ce9e99e0782d7abd47804e5345b38f4738ff0fcc67f7c6d6b
--- templates/includes/sidebar.html
+++ templates/includes/sidebar.html
@@ -76,46 +76,10 @@
7676
{% endif %}
7777
</div>
7878
</div>
7979
{% endif %}
8080
81
- <!-- Groups -->
82
- {% if perms.projects.view_projectgroup %}
83
- <a href="{% url 'projects:group_list' %}"
84
- class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/projects/groups/' in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
85
- :title="collapsed ? 'Groups' : ''">
86
- <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
87
- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 00-1.883 2.542l.857 6a2.25 2.25 0 002.227 1.932H19.05a2.25 2.25 0 002.227-1.932l.857-6a2.25 2.25 0 00-1.883-2.542m-16.5 0V6A2.25 2.25 0 016 3.75h3.879a1.5 1.5 0 011.06.44l2.122 2.12a1.5 1.5 0 001.06.44H18A2.25 2.25 0 0120.25 9v.776" />
88
- </svg>
89
- <span x-show="!collapsed" class="truncate">Groups</span>
90
- </a>
91
- {% endif %}
92
-
93
- <!-- Teams -->
94
- {% if perms.organization.view_team %}
95
- <a href="{% url 'organization:team_list' %}"
96
- class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/settings/teams/' in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
97
- :title="collapsed ? 'Teams' : ''">
98
- <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
99
- <path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z" />
100
- </svg>
101
- <span x-show="!collapsed" class="truncate">Teams</span>
102
- </a>
103
- {% endif %}
104
-
105
- <!-- Roles -->
106
- {% if perms.organization.view_organization %}
107
- <a href="{% url 'organization:role_list' %}"
108
- class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/settings/roles/' in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
109
- :title="collapsed ? 'Roles' : ''">
110
- <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
111
- <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" />
112
- </svg>
113
- <span x-show="!collapsed" class="truncate">Roles</span>
114
- </a>
115
- {% endif %}
116
-
11781
<!-- Knowledge Base section -->
11882
{% if perms.pages.view_page %}
11983
<div>
12084
<button @click="collapsed ? (collapsed = false, docsOpen = true) : (docsOpen = !docsOpen)"
12185
class="flex items-center justify-between w-full rounded-md px-2 py-2 text-sm font-medium {% if '/kb/' in request.path %}text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
@@ -155,44 +119,69 @@
155119
<path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.438 60.438 0 00-.491 6.347A48.62 48.62 0 0112 20.904a48.62 48.62 0 018.232-4.41 60.46 60.46 0 00-.491-6.347m-15.482 0a50.636 50.636 0 00-2.658-.813A59.906 59.906 0 0112 3.493a59.903 59.903 0 0110.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0112 13.489a50.702 50.702 0 017.74-3.342M6.75 15a.75.75 0 100-1.5.75.75 0 000 1.5zm0 0v-3.675A55.378 55.378 0 0112 8.443m-7.007 11.55A5.981 5.981 0 006.75 15.75v-1.5" />
156120
</svg>
157121
<span x-show="!collapsed" class="truncate">Fossil Guide</span>
158122
</a>
159123
160
- <!-- Settings -->
161
- {% if perms.organization.view_organization %}
162
- <a href="{% url 'organization:settings' %}"
163
- class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/settings/' in request.path and '/settings/teams/' not in request.path and '/settings/roles/' not in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
164
- :title="collapsed ? 'Settings' : ''">
165
- <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
166
- <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" />
167
- <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
168
- </svg>
169
- <span x-show="!collapsed" class="truncate">Settings</span>
170
- </a>
171
- {% endif %}
172
-
173
- <!-- Audit Log -->
174
- {% if user.is_superuser or perms.organization.change_organization %}
175
- <a href="{% url 'organization:audit_log' %}"
176
- class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/settings/audit/' in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
177
- :title="collapsed ? 'Audit Log' : ''">
178
- <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
179
- <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" />
180
- </svg>
181
- <span x-show="!collapsed" class="truncate">Audit Log</span>
182
- </a>
183
- {% endif %}
184
-
185
- <!-- Admin -->
186
- {% if user.is_staff %}
187
- <a href="{% url 'admin:index' %}"
188
- class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium text-gray-400 hover:bg-gray-800 hover:text-white"
189
- :title="collapsed ? 'Admin' : ''">
190
- <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
191
- <path stroke-linecap="round" stroke-linejoin="round" d="M11.42 15.17l-5.385 3.171a.75.75 0 01-1.089-.791l1.414-5.816-4.534-3.89a.75.75 0 01.422-1.317l5.953-.493 2.354-5.476a.75.75 0 011.39 0l2.354 5.476 5.953.493a.75.75 0 01.422 1.317l-4.534 3.89 1.414 5.816a.75.75 0 01-1.089.791L12 15.17l-.58.341z" />
192
- </svg>
193
- <span x-show="!collapsed" class="truncate">Admin</span>
194
- </a>
124
+ <!-- Admin section (collapsible) -->
125
+ {% if perms.organization.view_organization or user.is_staff %}
126
+ <div x-data="{ adminOpen: '/settings/' in window.location.pathname || '/projects/groups/' in window.location.pathname }">
127
+ <button @click="collapsed ? (collapsed = false, adminOpen = true) : (adminOpen = !adminOpen)"
128
+ class="flex items-center justify-between w-full rounded-md px-2 py-2 text-sm font-medium {% if '/settings/' in request.path or '/projects/groups/' in request.path %}text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
129
+ :title="collapsed ? 'Admin' : ''">
130
+ <span class="flex items-center gap-2">
131
+ <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
132
+ <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" />
133
+ <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
134
+ </svg>
135
+ <span x-show="!collapsed" class="truncate">Admin</span>
136
+ </span>
137
+ <svg x-show="!collapsed" class="h-4 w-4 transition-transform" :class="adminOpen && 'rotate-90'" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
138
+ <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
139
+ </svg>
140
+ </button>
141
+ <div x-show="adminOpen && !collapsed" x-collapse class="ml-4 mt-1 space-y-0.5 border-l border-gray-700 pl-2">
142
+ {% if perms.projects.view_projectgroup %}
143
+ <a href="{% url 'projects:group_list' %}"
144
+ class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/projects/groups/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
145
+ Groups
146
+ </a>
147
+ {% endif %}
148
+ {% if perms.organization.view_team %}
149
+ <a href="{% url 'organization:team_list' %}"
150
+ class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/settings/teams/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
151
+ Teams
152
+ </a>
153
+ {% endif %}
154
+ {% if perms.organization.view_organization %}
155
+ <a href="{% url 'organization:role_list' %}"
156
+ class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/settings/roles/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
157
+ Roles
158
+ </a>
159
+ {% endif %}
160
+ <a href="{% url 'organization:members' %}"
161
+ class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/settings/members/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
162
+ Members
163
+ </a>
164
+ {% if perms.organization.view_organization %}
165
+ <a href="{% url 'organization:settings' %}"
166
+ class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if request.path == '/settings/' %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
167
+ Settings
168
+ </a>
169
+ {% endif %}
170
+ {% if user.is_superuser or perms.organization.change_organization %}
171
+ <a href="{% url 'organization:audit_log' %}"
172
+ class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/settings/audit/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
173
+ Audit Log
174
+ </a>
175
+ {% endif %}
176
+ {% if user.is_staff %}
177
+ <a href="{% url 'admin:index' %}"
178
+ class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300">
179
+ Super Admin
180
+ </a>
181
+ {% endif %}
182
+ </div>
183
+ </div>
195184
{% endif %}
196185
197186
</nav>
198187
</aside>
199188
--- templates/includes/sidebar.html
+++ templates/includes/sidebar.html
@@ -76,46 +76,10 @@
76 {% endif %}
77 </div>
78 </div>
79 {% endif %}
80
81 <!-- Groups -->
82 {% if perms.projects.view_projectgroup %}
83 <a href="{% url 'projects:group_list' %}"
84 class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/projects/groups/' in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
85 :title="collapsed ? 'Groups' : ''">
86 <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
87 <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 00-1.883 2.542l.857 6a2.25 2.25 0 002.227 1.932H19.05a2.25 2.25 0 002.227-1.932l.857-6a2.25 2.25 0 00-1.883-2.542m-16.5 0V6A2.25 2.25 0 016 3.75h3.879a1.5 1.5 0 011.06.44l2.122 2.12a1.5 1.5 0 001.06.44H18A2.25 2.25 0 0120.25 9v.776" />
88 </svg>
89 <span x-show="!collapsed" class="truncate">Groups</span>
90 </a>
91 {% endif %}
92
93 <!-- Teams -->
94 {% if perms.organization.view_team %}
95 <a href="{% url 'organization:team_list' %}"
96 class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/settings/teams/' in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
97 :title="collapsed ? 'Teams' : ''">
98 <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
99 <path stroke-linecap="round" stroke-linejoin="round" d="M18 18.72a9.094 9.094 0 003.741-.479 3 3 0 00-4.682-2.72m.94 3.198l.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0112 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 016 18.719m12 0a5.971 5.971 0 00-.941-3.197m0 0A5.995 5.995 0 0012 12.75a5.995 5.995 0 00-5.058 2.772m0 0a3 3 0 00-4.681 2.72 8.986 8.986 0 003.74.477m.94-3.197a5.971 5.971 0 00-.94 3.197M15 6.75a3 3 0 11-6 0 3 3 0 016 0zm6 3a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0zm-13.5 0a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z" />
100 </svg>
101 <span x-show="!collapsed" class="truncate">Teams</span>
102 </a>
103 {% endif %}
104
105 <!-- Roles -->
106 {% if perms.organization.view_organization %}
107 <a href="{% url 'organization:role_list' %}"
108 class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/settings/roles/' in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
109 :title="collapsed ? 'Roles' : ''">
110 <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
111 <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" />
112 </svg>
113 <span x-show="!collapsed" class="truncate">Roles</span>
114 </a>
115 {% endif %}
116
117 <!-- Knowledge Base section -->
118 {% if perms.pages.view_page %}
119 <div>
120 <button @click="collapsed ? (collapsed = false, docsOpen = true) : (docsOpen = !docsOpen)"
121 class="flex items-center justify-between w-full rounded-md px-2 py-2 text-sm font-medium {% if '/kb/' in request.path %}text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
@@ -155,44 +119,69 @@
155 <path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.438 60.438 0 00-.491 6.347A48.62 48.62 0 0112 20.904a48.62 48.62 0 018.232-4.41 60.46 60.46 0 00-.491-6.347m-15.482 0a50.636 50.636 0 00-2.658-.813A59.906 59.906 0 0112 3.493a59.903 59.903 0 0110.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0112 13.489a50.702 50.702 0 017.74-3.342M6.75 15a.75.75 0 100-1.5.75.75 0 000 1.5zm0 0v-3.675A55.378 55.378 0 0112 8.443m-7.007 11.55A5.981 5.981 0 006.75 15.75v-1.5" />
156 </svg>
157 <span x-show="!collapsed" class="truncate">Fossil Guide</span>
158 </a>
159
160 <!-- Settings -->
161 {% if perms.organization.view_organization %}
162 <a href="{% url 'organization:settings' %}"
163 class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/settings/' in request.path and '/settings/teams/' not in request.path and '/settings/roles/' not in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
164 :title="collapsed ? 'Settings' : ''">
165 <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
166 <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" />
167 <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
168 </svg>
169 <span x-show="!collapsed" class="truncate">Settings</span>
170 </a>
171 {% endif %}
172
173 <!-- Audit Log -->
174 {% if user.is_superuser or perms.organization.change_organization %}
175 <a href="{% url 'organization:audit_log' %}"
176 class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium {% if '/settings/audit/' in request.path %}bg-gray-800 text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
177 :title="collapsed ? 'Audit Log' : ''">
178 <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
179 <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" />
180 </svg>
181 <span x-show="!collapsed" class="truncate">Audit Log</span>
182 </a>
183 {% endif %}
184
185 <!-- Admin -->
186 {% if user.is_staff %}
187 <a href="{% url 'admin:index' %}"
188 class="flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium text-gray-400 hover:bg-gray-800 hover:text-white"
189 :title="collapsed ? 'Admin' : ''">
190 <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
191 <path stroke-linecap="round" stroke-linejoin="round" d="M11.42 15.17l-5.385 3.171a.75.75 0 01-1.089-.791l1.414-5.816-4.534-3.89a.75.75 0 01.422-1.317l5.953-.493 2.354-5.476a.75.75 0 011.39 0l2.354 5.476 5.953.493a.75.75 0 01.422 1.317l-4.534 3.89 1.414 5.816a.75.75 0 01-1.089.791L12 15.17l-.58.341z" />
192 </svg>
193 <span x-show="!collapsed" class="truncate">Admin</span>
194 </a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195 {% endif %}
196
197 </nav>
198 </aside>
199
--- templates/includes/sidebar.html
+++ templates/includes/sidebar.html
@@ -76,46 +76,10 @@
76 {% endif %}
77 </div>
78 </div>
79 {% endif %}
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81 <!-- Knowledge Base section -->
82 {% if perms.pages.view_page %}
83 <div>
84 <button @click="collapsed ? (collapsed = false, docsOpen = true) : (docsOpen = !docsOpen)"
85 class="flex items-center justify-between w-full rounded-md px-2 py-2 text-sm font-medium {% if '/kb/' in request.path %}text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
@@ -155,44 +119,69 @@
119 <path stroke-linecap="round" stroke-linejoin="round" d="M4.26 10.147a60.438 60.438 0 00-.491 6.347A48.62 48.62 0 0112 20.904a48.62 48.62 0 018.232-4.41 60.46 60.46 0 00-.491-6.347m-15.482 0a50.636 50.636 0 00-2.658-.813A59.906 59.906 0 0112 3.493a59.903 59.903 0 0110.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0112 13.489a50.702 50.702 0 017.74-3.342M6.75 15a.75.75 0 100-1.5.75.75 0 000 1.5zm0 0v-3.675A55.378 55.378 0 0112 8.443m-7.007 11.55A5.981 5.981 0 006.75 15.75v-1.5" />
120 </svg>
121 <span x-show="!collapsed" class="truncate">Fossil Guide</span>
122 </a>
123
124 <!-- Admin section (collapsible) -->
125 {% if perms.organization.view_organization or user.is_staff %}
126 <div x-data="{ adminOpen: '/settings/' in window.location.pathname || '/projects/groups/' in window.location.pathname }">
127 <button @click="collapsed ? (collapsed = false, adminOpen = true) : (adminOpen = !adminOpen)"
128 class="flex items-center justify-between w-full rounded-md px-2 py-2 text-sm font-medium {% if '/settings/' in request.path or '/projects/groups/' in request.path %}text-white{% else %}text-gray-400 hover:bg-gray-800 hover:text-white{% endif %}"
129 :title="collapsed ? 'Admin' : ''">
130 <span class="flex items-center gap-2">
131 <svg class="h-4 w-4 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
132 <path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" />
133 <path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
134 </svg>
135 <span x-show="!collapsed" class="truncate">Admin</span>
136 </span>
137 <svg x-show="!collapsed" class="h-4 w-4 transition-transform" :class="adminOpen && 'rotate-90'" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
138 <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
139 </svg>
140 </button>
141 <div x-show="adminOpen && !collapsed" x-collapse class="ml-4 mt-1 space-y-0.5 border-l border-gray-700 pl-2">
142 {% if perms.projects.view_projectgroup %}
143 <a href="{% url 'projects:group_list' %}"
144 class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/projects/groups/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
145 Groups
146 </a>
147 {% endif %}
148 {% if perms.organization.view_team %}
149 <a href="{% url 'organization:team_list' %}"
150 class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/settings/teams/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
151 Teams
152 </a>
153 {% endif %}
154 {% if perms.organization.view_organization %}
155 <a href="{% url 'organization:role_list' %}"
156 class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/settings/roles/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
157 Roles
158 </a>
159 {% endif %}
160 <a href="{% url 'organization:members' %}"
161 class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/settings/members/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
162 Members
163 </a>
164 {% if perms.organization.view_organization %}
165 <a href="{% url 'organization:settings' %}"
166 class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if request.path == '/settings/' %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
167 Settings
168 </a>
169 {% endif %}
170 {% if user.is_superuser or perms.organization.change_organization %}
171 <a href="{% url 'organization:audit_log' %}"
172 class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs {% if '/settings/audit/' in request.path %}text-brand-light font-medium{% else %}text-gray-500 hover:text-gray-300{% endif %}">
173 Audit Log
174 </a>
175 {% endif %}
176 {% if user.is_staff %}
177 <a href="{% url 'admin:index' %}"
178 class="flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-gray-500 hover:text-gray-300">
179 Super Admin
180 </a>
181 {% endif %}
182 </div>
183 </div>
184 {% endif %}
185
186 </nav>
187 </aside>
188

Keyboard Shortcuts

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