diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-25 19:52:51 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-25 19:52:51 +0100 |
commit | c24a0a07cd0fd93f716d88ce783e1c3499bfe175 (patch) | |
tree | 40f360b29cac54012604319fb92d06c72d882254 | |
parent | dd6562f05368466d3e4753c023b391d3a4d91175 (diff) |
help page added
-rwxr-xr-x | access_control.rb | 3 | ||||
-rwxr-xr-x | edit_columns.rb | 2 | ||||
-rwxr-xr-x | help.rb | 62 | ||||
-rw-r--r-- | html.rb | 1 | ||||
-rwxr-xr-x | index.cgi | 2 |
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> @@ -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 + + @@ -86,6 +86,7 @@ module Dudle ["",""], ["Poll","."], ["History","history.cgi"], + ["Help","help.cgi"], ["",""], ["Edit Columns","edit_columns.cgi"], ["Invite Participants","invite_participants.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") } |