Skip to content
This repository has been archived by the owner on Dec 17, 2019. It is now read-only.

Commit

Permalink
Open the refinadora in a new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Angel Gordian committed Nov 4, 2014
1 parent 5dd180e commit 6160a7f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ckanext/openrefine/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ class OpenRefinePlugin(plugins.SingletonPlugin):

def update_config(self, config):
toolkit.add_template_directory(config, 'templates')

toolkit.add_resource('fanstatic', 'openrefine')
25 changes: 23 additions & 2 deletions ckanext/openrefine/templates/package/resource_read.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,29 @@

{% block resource_actions_inner %}
{% if res.url %}
<li>
<a class="btn btn-warning" href="{{openrefine}}?resource={{res.url}}">
<div id="example" class="modal hide fade in" style="display: none; ">
<div class="modal-header">
<a class="close" data-dismiss="modal">x</a>
<h3>Refinadora de datos</h3>
</div>
<div class="modal-body">
<h4></h4>
<p>La refinadora se abrira una nueva pesta&ntilde;a</p>
</div>
<div class="modal-footer">
<a id="openrefine" url="{{openrefine}}?resource={{res.url}}" class="btn btn-success">Ok</a>
<a href="#" class="btn" data-dismiss="modal">Cancelar</a>
</div>
</div>
<style>
.modal-backdrop {
z-index: -1;
}
</style>

{% resource 'openrefine/modal.js' %}
<li>
<a class="btn btn-warning" url="{{openrefine}}?resource={{res.url}}" data-toggle="modal" href="#example">
<i class="icon-edit"></i>Open Refine
</a>
</li>
Expand Down

0 comments on commit 6160a7f

Please sign in to comment.