Skip to content

Commit

Permalink
[#2344] Capital letter for flash message. Improved docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Mar 18, 2015
1 parent 8ce8acc commit ca31e63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion ckan/controllers/group.py
Expand Up @@ -622,7 +622,8 @@ def delete(self, id):
try:
if request.method == 'POST':
self._action('group_delete')(context, {'id': id})
h.flash_notice(_('%s has been deleted.') % group_type)
h.flash_notice(_('%s has been deleted.')
% group_type.capitalize())
self._redirect_to__this_controller(action='index')
c.group_dict = self._action('group_show')(context, {'id': id})
except NotAuthorized:
Expand Down
16 changes: 8 additions & 8 deletions ckan/controllers/organization.py
Expand Up @@ -4,15 +4,15 @@


class OrganizationController(group.GroupController):
''' The organization controller is pretty much just the group
controller. It has a few templates defined that are different and sets
the group_type to organization so that the group controller knows that
it is in fact the organization controller. All the main logical
differences are therefore in the group controller.
''' The organization controller is for Groups of type 'organization'. It
works the same as the group controller apart from:
* templates and logic action/auth functions are sometimes customized
(switched using _replace_group_org)
* 'bulk_process' action only works for organizations
* 'follow' functionality only works for groups
The main differences the group controller provides for organizations are
a few wrapper functions that swap organization for group when rendering
templates, redirecting or calling logic actions '''
Nearly all the code for both is in the GroupController (for simplicity?).
'''

group_types = ['organization']

Expand Down

0 comments on commit ca31e63

Please sign in to comment.