Changeset d1a4706


Ignore:
Timestamp:
Mar 31, 2012, 4:42:11 AM (14 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, space-access, stable, stage
Children:
8708a86
Parents:
2ca19cb
git-author:
Alex Dehnert <adehnert@…> (03/31/12 04:42:11)
git-committer:
Alex Dehnert <adehnert@…> (03/31/12 04:42:11)
Message:

Make single result search go straight to DB entry

Resolves ASA Trac #85.

Location:
asadb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • asadb/groups/views.py

    r58a5c6a rd1a4706  
    764764        dest = reverse('groups:signatories')
    765765        print dest
    766     elif 'group-info' in request.GET:
     766    elif 'group-goto' in request.GET:
     767        if len(groups_filterset.qs) == 1:
     768            group = groups_filterset.qs[0]
     769            return redirect(reverse('groups:group-detail', kwargs={'pk':group.pk}))
     770        else:
     771            dest = reverse('groups:list')
     772    elif 'group-list' in request.GET:
    767773        dest = reverse('groups:list')
    768774
  • asadb/template/groups/group_search.html

    r6a646ce rd1a4706  
    1010    {{ filter.form.as_table }}
    1111    </table>
    12     <input type="submit" name="group-info" value="Show Group Information" />
     12    <input type="submit" name="group-goto" value="Show Group Information" title="If exactly one group matches, go directly to that group's database entry. Otherwise, show the group list." />
     13    <input type="submit" name="group-list" value="Show Group List" />
    1314    {% if perms.groups.view_signatories %}
    1415    <input type="submit" name="signatories" value="Show Signatories" />
Note: See TracChangeset for help on using the changeset viewer.