Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Settings plus some visual tweaks.

  • Loading branch information...
commit dcc3f3a21847c4984718ad6a53ec60b132591e64 1 parent d190dee
Davi Ferreira authored September 16, 2011
14  features/import_settings.feature
... ...
@@ -0,0 +1,14 @@
  1
+Feature: Import settings 
  2
+  In order to import my bookmarks
  3
+  As a gimmebar user
  4
+  I want to configure my import settings 
  5
+  
  6
+  Scenario: Configure import settings 
  7
+    Given I am on the home page
  8
+    When I upload a file with valid data
  9
+    And I click "Upload!"
  10
+    Then I should see "Options"
  11
+    And I should see a field named "settings"
  12
+    And I should see "Import everything to a Delicious collection" 
  13
+    And I should see "Import everything to collections based on tags"
  14
+    And I should see "Import everything to an existing collection"
4  features/upload_bookmarks.feature
@@ -7,5 +7,5 @@ Feature: Upload delicious xml files
7 7
     Given I am on the home page
8 8
     When I upload a file with valid data
9 9
     And I click "Upload!"
10  
-    Then I should see "You have 8 bookmarks under 10 tags"
11  
-    
  10
+    Then I should see "File successfully loaded"
  11
+    And I should see "You have 8 bookmarks under 10 tags"
6  gimmelicious.rb
@@ -39,11 +39,7 @@ def list_tags(doc)
39 39
       tags = []
40 40
       doc.xpath("//post").each do |post|
41 41
         tag = post.attributes["tag"].value.split(' ')
42  
-        unless tag.nil? or tag.empty?
43  
-          tag.each do |t|
44  
-            tags.push(t) unless tags.include?(t)
45  
-          end
46  
-        end
  42
+        tag.each{ |t| tags.push(t) unless tags.include?(t) }
47 43
       end
48 44
       tags
49 45
     end
30  views/index.haml
@@ -11,17 +11,14 @@
11 11
 %div.well  
12 12
   %h2 2) Load your delicious bookmarks:
13 13
   
14  
-  %div.alert-message.block-message.success{:style => "margin-top:12px;"}
  14
+  %div.alert-message.block-message.notice{:style => "margin-top:12px;"}
15 15
     %p Don't know how to backup your delicious bookmarks?
16 16
     %a{:href => "http://lifehacker.com/5136845/backup-delicious-bookmarks-from-the-shell", :target => "_blank"} Backup Delicious Bookmarks from the Shell
17 17
 
18 18
   -unless @unique_id.nil?
19  
-    %p
20  
-      %strong UUID:
21  
-      =@unique_id
22  
-    %div.alert-message.info
  19
+    %div.alert-message.block-message.success
23 20
       %p
24  
-        You have
  21
+        File successfully loaded. You have
25 22
         %strong
26 23
           =@total_bookmarks
27 24
         bookmarks under
@@ -39,6 +36,25 @@
39 36
 
40 37
 %div.well
41 38
   %h2 3) Select your import settings:
42  
-  %form.form-stacked
  39
+  %form
  40
+    %div.clearfix
  41
+      %label Options:
  42
+      %div.input
  43
+        %ul.inputs-list
  44
+          %li
  45
+            %label
  46
+              %input{:type => "radio", :name => "settings", :value => 1}
  47
+                %span 
  48
+                  Import everything to a 
  49
+                  %strong Delicious collection
  50
+          %li
  51
+            %label
  52
+              %input{:type => "radio", :name => "settings", :value => 1}
  53
+              %span Import everything to collections based on tags 
  54
+          %li
  55
+            %label
  56
+              %input{:type => "radio", :name => "settings", :value => 1}
  57
+              %span Import everything to an existing collection 
  58
+
43 59
     %div.actions
44 60
       %input{:type => "submit", :class => "btn primary large disabled", :value => "Import!"}

0 notes on commit dcc3f3a

Please sign in to comment.
Something went wrong with that request. Please try again.