Django

Code

Ticket #1390 (new)

Opened 2 years ago

Last modified 5 months ago

Add app name to title and navigation-bar in admin interface

Reported by: rfroger[at]estrate[dot]nl Assigned to: ext
Component: Admin interface Version: newforms-admin
Keywords: nfa-someday Cc:
Triage Stage: Accepted Has patch: 1
Needs documentation: 0 Needs tests: 0
Patch needs improvement: 0

Description

I've got a suggestion/feature request which I'll explain by providing an example: An app named 'book' with the models 'books' and 'categories' and an app named 'magazine' with the models 'magazines' and 'categories'. When I use the admin interface and I add or change a category for 'book' then the only way to know you are in the 'book' app is by looking at the URL. The title of the page tells me 'Add category' and the navigation bar tells me 'Home > Categories', which is exactly the same for magazine categories. I think it would be more user friendly if you can see (by just looking at the page) in which app you are. Maybe a title like 'Add category (books)' or 'Add book category' and the navigation bar with 'Home > Categories (book)' or 'Home > Book categories'.

The navigation bar could even show 'Home > Book > Categories', that introduces a new admin view which shows all models for one app.

By the way I'm using the trunk version. I'm new to Django so I can't provide you with a patch to add my suggestion (yet!).

Attachments

app-name-in-admin-breadcrumbs.diff (10.5 kB) - added by ext on 09/14/07 07:21:16.
Extended breadcrums in admin (newforms-admin branch)
app-name-in-admin-breadcrumbs2.diff (10.5 kB) - added by eXt on 12/10/07 13:43:39.
Updated patch against 6930

Change History

03/08/06 20:57:43 changed by jacob

  • reporter changed from rfroger@estrate.nl to rfroger[at]estrate[dot]nl.

02/22/07 01:07:26 changed by Simon G. <dev@simon.net.nz>

  • stage changed from Unreviewed to Design decision needed.

03/10/07 04:42:30 changed by mtredinnick

This isn't a bad suggestion. Not worth worrying about in existing admin, but should be looked at for newforms-admin, once that's completed. Still needs design work to decide how to display the titles, since there are a few variations, but the concept seems sound.

Note that anybody thinking about this should focus on how the title as a whole looks, not how it looks in tabs, since difference browsers abbreviate tab titles in different ways (chopping at either the front or the back). So now arguments along the lines of "it should be this way because my browser's tabs show the first few characters", please.

04/25/07 06:01:58 changed by mtredinnick

  • stage changed from Design decision needed to Accepted.

Let's call this "accepted" so that somebody might be interested in writing a patch. It'll be easier to debate the final look with a patch to work against.

09/14/07 02:26:24 changed by ext

  • owner changed from nobody to ext.

09/14/07 07:21:16 changed by ext

  • attachment app-name-in-admin-breadcrumbs.diff added.

Extended breadcrums in admin (newforms-admin branch)

09/14/07 07:43:42 changed by ext

  • has_patch set to 1.
  • version changed from SVN to newforms-admin.

The patch I attached extends admin's (newforms-admin) breadcrumbs placing app_label between Home and model name. It now looks as suggested by reporter:

'Home > Book > Categories'

I also introduced a new admin view which shows all models for one app so the app_label (Book in above example) is clickable.

The solution makes it easy to get to know what application a specific model belongs to, but I think that there are some design decisions needed to choose whether: 1. Should app_label be clickable? Is it really useful to have a view on application specific models only? 2. Should app_label visibility be configurable? Are there any situations when one doesn't want to see an application name? Maybe app_label should have also something like model's verbose_name? 3. Does it still makes sense to add an application name to title? I think no, so I discontinued my work on it.

12/07/07 17:31:20 changed by brosner

  • keywords set to nfa-someday.
  • needs_better_patch set to 1.

Assuming this patch still applies cleanly I think it should go in. Marking patch needs improvement so that it can be unchecked once verified or has been updated.

12/07/07 17:38:11 changed by brosner

Marked #2292 as a duplicate of this.

12/10/07 13:43:39 changed by eXt

  • attachment app-name-in-admin-breadcrumbs2.diff added.

Updated patch against 6930

12/10/07 13:50:26 changed by ext

  • needs_better_patch deleted.

I've updated the patch so it applies cleanly to rev. 6930 (latest one at the moment). I've unchecked path-needs-improvement tick.


Add/Change #1390 (Add app name to title and navigation-bar in admin interface)




Change Properties
Action