aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--images/navimg/alaveteli-logo.pngbin0 -> 7366 bytes
-rw-r--r--install.rb16
-rw-r--r--lib/views/general/custom_css.rhtml7
-rw-r--r--uninstall.rb7
4 files changed, 30 insertions, 0 deletions
diff --git a/images/navimg/alaveteli-logo.png b/images/navimg/alaveteli-logo.png
new file mode 100644
index 0000000..fb15fad
--- /dev/null
+++ b/images/navimg/alaveteli-logo.png
Binary files differ
diff --git a/install.rb b/install.rb
index f7732d3..d99bc70 100644
--- a/install.rb
+++ b/install.rb
@@ -1 +1,17 @@
# Install hook code here
+
+plugin_path = File.expand_path(File.join(File.dirname(__FILE__), "public"))
+main_app_path = File.join(RAILS_ROOT, 'public', 'alavetelitheme')
+
+# If the symlink to be created exists, warn the user and do nothing
+if File.exists?(main_app_path)
+ puts "WARNING: #{main_app_path} already exists, the symbolic link won't be created"
+else # Create symlink
+ begin
+ print "Creating symbolink link from #{main_app_path} to #{plugin_path}... "
+ File.symlink(plugin_path, main_app_path)
+ puts "done"
+ rescue NotImplemented
+ puts "failed: symbolic links not supported"
+ end
+end \ No newline at end of file
diff --git a/lib/views/general/custom_css.rhtml b/lib/views/general/custom_css.rhtml
index 53fc399..8c08899 100644
--- a/lib/views/general/custom_css.rhtml
+++ b/lib/views/general/custom_css.rhtml
@@ -6,3 +6,10 @@
h1 {
color: blue ! important;
}
+
+#header h1 a {
+ background-image: url("../alavetelitheme/images/navimg/new-alaveteli-logo.png");
+ width: 212px;
+ height: 87px;
+ margin-left: 5px;
+} \ No newline at end of file
diff --git a/uninstall.rb b/uninstall.rb
index 9738333..8598d7e 100644
--- a/uninstall.rb
+++ b/uninstall.rb
@@ -1 +1,8 @@
# Uninstall hook code here
+
+main_app_path = File.join(RAILS_ROOT, 'public', 'alavetelitheme')
+if File.exists?(main_app_path) && File.symlink?(main_app_path)
+ print "Deleting symbolink link at #{main_app_path}... "
+ File.delete(main_app_path)
+ puts "done"
+end \ No newline at end of file