You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by al...@apache.org on 2015/08/24 13:42:06 UTC

[40/50] [abbrv] incubator-taverna-databundle-viewer git commit: Update makeup for data_bundles. Fix error with data_bundle destroy link

Update makeup for data_bundles. Fix error with data_bundle destroy link


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/commit/088c825b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/tree/088c825b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/diff/088c825b

Branch: refs/heads/master
Commit: 088c825b750d62ae203898ec354fb14ccad52397
Parents: dc1a968
Author: Denis Karyakin <sa...@gmail.com>
Authored: Wed Aug 19 02:48:18 2015 +0300
Committer: Denis Karyakin <sa...@gmail.com>
Committed: Wed Aug 19 02:48:18 2015 +0300

----------------------------------------------------------------------
 app/assets/javascripts/application.coffee |  1 +
 app/views/data_bundles/_form.html.slim    | 25 +++++++++++--------------
 app/views/data_bundles/edit.html.slim     | 12 ++++++++----
 app/views/data_bundles/index.html.slim    | 15 ++++++++++-----
 4 files changed, 30 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/088c825b/app/assets/javascripts/application.coffee
----------------------------------------------------------------------
diff --git a/app/assets/javascripts/application.coffee b/app/assets/javascripts/application.coffee
index aabe895..529d3f7 100644
--- a/app/assets/javascripts/application.coffee
+++ b/app/assets/javascripts/application.coffee
@@ -29,6 +29,7 @@
 # about supported directives.
 #
 #= require jquery2.min.js
+#= require jquery_ujs
 #= require bootstrap_theme/bootstrap/js/bootstrap.min
 #= require d3/d3.min
 #= require data_bundle

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/088c825b/app/views/data_bundles/_form.html.slim
----------------------------------------------------------------------
diff --git a/app/views/data_bundles/_form.html.slim b/app/views/data_bundles/_form.html.slim
index 1a81cdf..113469a 100644
--- a/app/views/data_bundles/_form.html.slim
+++ b/app/views/data_bundles/_form.html.slim
@@ -1,14 +1,11 @@
-.box.box-primary
-  .box-header.with-border
-    h3.box-title New Databundle
-  = form_for @data_bundle, multipart: true, html: {role: 'form'} do |f|
-    .box-body
-      .form-group
-        label for="data_bundle_name" DataBundle name
-        = f.text_field :name, class: 'form-control'
-      .form-group
-        label for="data_bundle_file"  File input
-        = f.file_field :file
-        /= f.remote_file_url
-    .box-footer
-      = f.submit 'Save', id: 'save_data_bundle', class: 'btn btn-primary'
+= form_for @data_bundle, multipart: true, html: {role: 'form'} do |f|
+  .box-body
+    .form-group
+      label for="data_bundle_name" DataBundle name
+      = f.text_field :name, class: 'form-control'
+    .form-group
+      label for="data_bundle_file"  File input
+      = f.file_field :file
+  /= f.remote_file_url
+  .box-footer
+    = f.submit 'Save', id: 'save_data_bundle', class: 'btn btn-primary'

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/088c825b/app/views/data_bundles/edit.html.slim
----------------------------------------------------------------------
diff --git a/app/views/data_bundles/edit.html.slim b/app/views/data_bundles/edit.html.slim
index 6c13f0a..4b38688 100644
--- a/app/views/data_bundles/edit.html.slim
+++ b/app/views/data_bundles/edit.html.slim
@@ -1,8 +1,12 @@
-h1 Editing data_bundle
-
-== render 'form'
+section.content-header
+  h1
+    | Editing DataBundle
+section.content
+  .row
+    .col-xs-12
+      .box.box-primary
+        = render partial: 'form'
 
 = link_to 'Show', @data_bundle
 '|
 = link_to 'Back', data_bundles_path
-

http://git-wip-us.apache.org/repos/asf/incubator-taverna-databundle-viewer/blob/088c825b/app/views/data_bundles/index.html.slim
----------------------------------------------------------------------
diff --git a/app/views/data_bundles/index.html.slim b/app/views/data_bundles/index.html.slim
index a0c831d..88c00bf 100644
--- a/app/views/data_bundles/index.html.slim
+++ b/app/views/data_bundles/index.html.slim
@@ -4,7 +4,7 @@ section.content-header
 section.content
   .row
     - if user_signed_in?
-      .col-xs-6
+      .col-xs-7
         .box
           .box-body.table-responsive.no-padding
             table.table.table-hover
@@ -23,12 +23,17 @@ section.content
                     td
                       = link_to data_bundle.file_identifier, data_bundle.file.url
                     td
-                      = link_to 'Show', data_bundle
-                      = link_to 'Edit', edit_data_bundle_path(data_bundle)
-                      = link_to 'Destroy', data_bundle, data: {confirm: 'Are you sure?'}, method: :delete
+                      = link_to 'Show', data_bundle, id: "to_show_#{data_bundle.id}"
+                    td
+                      = link_to 'Edit', edit_data_bundle_path(data_bundle), id: "to_edit_#{data_bundle.id}"
+                    td
+                      = link_to 'Destroy', data_bundle_path(data_bundle), method: :delete, data: {confirm: 'Are you sure?'}, id: "to_delete_#{data_bundle.id}"
             = paginate @data_bundles
       .col-xs-5
-        = render partial: 'form'
+        .box.box-primary
+          .box-header.with-border
+            h3.box-title New Databundle
+          = render partial: 'form'
     - else
       .col-xs-6
         .box