Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move 'CSS' and 'JS' tabs under "Design" in Radiant 0.9.0 #2

Open
dkreft opened this issue May 21, 2010 · 1 comment
Open

Move 'CSS' and 'JS' tabs under "Design" in Radiant 0.9.0 #2

dkreft opened this issue May 21, 2010 · 1 comment

Comments

@dkreft
Copy link

dkreft commented May 21, 2010

Would you consider moving the CSS and JS tabs under Radiant 0.9.0's "Design" tab?

@dkreft
Copy link
Author

dkreft commented May 21, 2010

Something like this ought to do it (works for me, anyway):

--- sns_extension.rb~   2010-05-21 12:15:37.000000000 -0700
+++ sns_extension.rb    2010-05-21 13:33:30.000000000 -0700
@@ -22,8 +22,15 @@
 
 
   def activate
-    admin.tabs.add "CSS", "/admin/css", :after => "Layouts", :visibility => [:admin, :developer]
-    admin.tabs.add "JS", "/admin/js", :after => "CSS", :visibility => [:admin, :developer]
+    if respond_to?(:tab)
+      tab('Design') do
+        add_item('CSS', '/admin/css')
+        add_item('JS', '/admin/js')
+      end
+    else
+      admin.tabs.add "CSS", "/admin/css", :after => "Layouts", :visibility => [:admin, :developer]
+      admin.tabs.add "JS", "/admin/js", :after => "CSS", :visibility => [:admin, :developer]
+    end
 
     # Include my mixins (extending PageTags and SiteController)
     Page.send :include, Sns::PageTags
@@ -66,4 +73,4 @@
         text_asset.new = text_asset.edit
       end
     end
-end
\ No newline at end of file
+end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant