Opened 13 years ago

Closed 6 years ago

#11 closed enhancement (duplicate)

Edit page category/locale selection

Reported by: Dominic Hargreaves Owned by:
Priority: high Milestone:
Component: openguides Version:
Severity: normal Keywords: check migrated
Cc: crschmidt@…

Description

Sun Jan 9 09:46:19 2005 DOM - Ticket 9555 RefersTo? ticket 8203.

Sun Jan 9 09:46:19 2005 DOM - Ticket created [Reply] [Comment]

Subject: Edit page category/locale selection

In the edit node page, have the categories and locales be optionally selectable from a drop-down box of existing nodes, to reduce the number of mispellings/duplicates. Probably could use javascript to streamline this.

http://openguides.org/mail/openguides-dev/2005-January/000844.html

Download (untitled) 285b

Tue Oct 11 23:23:47 2005 EMARTIN - Correspondence added [Reply] [Comment]

Probably could use javascript to streamline this.

In discussions recently the idea of doing this via AJAX was raised.

I.e. Type: "c" and you get a dropdown with

Caribbean Food Chinese Food Chip Shops Churches Clothes

then type "h" and the list is reduced to

Chinese Food Chip Shops Churches

then type "i" and the list is reduced to

Chinese Food Chip Shops

and so on. And at any point you can click a category name to select it.

This is beyond my JavaScript? skills at present, but seems a realistic prospect: for a working example of this idea, see Google Suggest at http://www.google.com/webhp?complete=1

Change History (7)

comment:1 Changed 13 years ago by ChristopherSchmidt

Another (easier) option for this would be to create a "tag map" style listing - just " * " seperating a list of entries, and each has onclick-javascript to modify the Categories or Locales box.

This is within the realm of my javascript, but outside the realm of my openguides knowledge. I suppose the best way to do it would probably be to provide a complete list of categories as local template data, and then use the template to create the appropriate javascript.

comment:2 Changed 13 years ago by ChristopherSchmidt

Cc: crschmidt@… added

Okay, so I've tossed something for this together on the Boston OpenGuides site.

    my $summariser = CGI::Wiki::Plugin::Summariser->new;
    $wiki->register_plugin( plugin => $summariser );
    my @categories = $summariser->metadata_list( type => 'Category' );
    my @locales = $summariser->metadata_list( type => 'Locale' );
    my %tt_vars = ( global_categories => \@categories,
                    global_locales => \@locales,
                    ...
  • Added some code to edit_form.tt:
[% FOREACH category = global_categories %]
   <a href='#' onclick="javascript:d=document.getElementById('categories');d.value = d.value + '[% category %]\n'; return false;">
   [% category %]
   </a> * 
[% END %]

and the same for locales.

It's not a *clean* solution by any means, but it works, and should get anyone else who's interested in attacking the problem a running start.

comment:3 Changed 13 years ago by Dominic Hargreaves

Component: openguides

comment:4 Changed 12 years ago by Dominic Hargreaves

Keywords: check added

comment:5 Changed 12 years ago by Dominic Hargreaves

Nick has hacked together a rough "common categories and locales" thing for the benefit of Torchbox's design work; it's possible that these two things can be combined somehow.

comment:6 Changed 7 years ago by bob

Priority: normalhigh

comment:7 Changed 6 years ago by bob

Keywords: migrated added
Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.