aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xaccess_control.rb3
-rwxr-xr-xedit_columns.rb2
-rwxr-xr-xhelp.rb62
-rw-r--r--html.rb1
-rwxr-xr-xindex.cgi2
5 files changed, 66 insertions, 4 deletions
diff --git a/access_control.rb b/access_control.rb
index c1aea8a..6080452 100755
--- a/access_control.rb
+++ b/access_control.rb
@@ -24,7 +24,6 @@ require "cgi"
if __FILE__ == $0
$cgi = CGI.new
-
olddir = File.expand_path(".")
Dir.chdir("..")
load "html.rb"
@@ -34,7 +33,7 @@ require "yaml"
Dir.chdir(olddir)
POLL = YAML::load_file("data.yaml").name
-$html = HTML.new("dudle - #{POLL} - Access Control Settings")
+$html = HTML.new("dudle - #{POLL} - Help")
$html.header["Cache-Control"] = "no-cache"
acusers = {}
diff --git a/edit_columns.rb b/edit_columns.rb
index c791df5..9841bc2 100755
--- a/edit_columns.rb
+++ b/edit_columns.rb
@@ -141,7 +141,7 @@ TD
}
$html << <<READY
<td>
- <form method='get' action='.'>
+ <form method='get' action='help.cgi'>
<div>
<input type='submit' value='Done' />
</div>
diff --git a/help.rb b/help.rb
new file mode 100755
index 0000000..923476d
--- /dev/null
+++ b/help.rb
@@ -0,0 +1,62 @@
+#!/usr/bin/env ruby
+
+############################################################################
+# Copyright 2009 Benjamin Kellermann #
+# #
+# This file is part of dudle. #
+# #
+# Dudle is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Affero General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# Dudle is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or #
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public #
+# License for more details. #
+# #
+# You should have received a copy of the GNU Affero General Public License #
+# along with dudle. If not, see <http://www.gnu.org/licenses/>. #
+############################################################################
+
+require "cgi"
+
+if __FILE__ == $0
+
+$cgi = CGI.new
+olddir = File.expand_path(".")
+Dir.chdir("..")
+load "html.rb"
+load "config.rb"
+require "poll"
+require "yaml"
+Dir.chdir(olddir)
+
+POLL = YAML::load_file("data.yaml").name
+$html = HTML.new("dudle - #{POLL} - Access Control Settings")
+$html.header["Cache-Control"] = "no-cache"
+
+$html.add_css("../dudle.css")
+
+$html << <<END
+<body>
+#{Dudle::tabs("Help")}
+<div id='main'>
+<h1>#{POLL}</h1>
+The link to your poll is:
+<pre>#{SITEURL}</pre>
+<a href='mailto:?subject=dudle%20link&body=#{SITEURL}'>Send this link via email...</a>
+<form method='get' action='.'>
+ <div>
+ <input type='submit' value='To the Vote interface' />
+ </div>
+</form>
+END
+
+$html << "</div>"
+$html << "</body>"
+
+$html.out($cgi)
+end
+
+
diff --git a/html.rb b/html.rb
index f7c9c5f..7347908 100644
--- a/html.rb
+++ b/html.rb
@@ -86,6 +86,7 @@ module Dudle
["",""],
["Poll","."],
["History","history.cgi"],
+ ["Help","help.cgi"],
["",""],
["Edit Columns","edit_columns.cgi"],
["Invite Participants","invite_participants.cgi"],
diff --git a/index.cgi b/index.cgi
index f7ffd20..dbd8cce 100755
--- a/index.cgi
+++ b/index.cgi
@@ -61,7 +61,7 @@ if $cgi.include?("create_poll") && $cgi.include?("poll_url")
VCS.init
File.symlink("../participate.rb","index.cgi")
VCS.add("index.cgi")
- ["atom","customize", "history", "edit_columns","access_control", "delete_poll", "invite_participants"].each{|f|
+ ["atom","customize", "history", "help", "edit_columns","access_control", "delete_poll", "invite_participants"].each{|f|
File.symlink("../#{f}.rb","#{f}.cgi")
VCS.add("#{f}.cgi")
}