Skip to content

Commit

Permalink
[#2242] Rename text and pdf view plugins for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jan 27, 2015
1 parent d741ecd commit a6e897e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions ckan/migration/versions/076_rename_view_plugins_2.py
@@ -0,0 +1,14 @@
def upgrade(migrate_engine):
migrate_engine.execute(
'''
BEGIN;
UPDATE resource_view
SET view_type = 'text_view' WHERE view_type = 'text';
UPDATE resource_view
SET view_type = 'pdf_view' WHERE view_type = 'pdf';
COMMIT;
'''
)
2 changes: 1 addition & 1 deletion ckanext/pdfview/plugin.py
Expand Up @@ -16,7 +16,7 @@ class PdfView(p.SingletonPlugin):
proxy_is_enabled = False

def info(self):
return {'name': 'pdf',
return {'name': 'pdf_view',
'title': 'PDF',
'icon': 'file-text',
'default_title': 'PDF',
Expand Down
2 changes: 1 addition & 1 deletion ckanext/textview/plugin.py
Expand Up @@ -49,7 +49,7 @@ def update_config(self, config):
p.toolkit.add_resource('theme/public', 'ckanext-textview')

def info(self):
return {'name': 'text',
return {'name': 'text_view',
'title': p.toolkit._('Text'),
'icon': 'file-text-alt',
'default_title': p.toolkit._('Text'),
Expand Down

0 comments on commit a6e897e

Please sign in to comment.