From c24a0a07cd0fd93f716d88ce783e1c3499bfe175 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Wed, 25 Nov 2009 19:52:51 +0100 Subject: help page added --- access_control.rb | 3 +-- edit_columns.rb | 2 +- help.rb | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ html.rb | 1 + index.cgi | 2 +- 5 files changed, 66 insertions(+), 4 deletions(-) create mode 100755 help.rb 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 << < -
+
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 . # +############################################################################ + +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 << < +#{Dudle::tabs("Help")} +
+

#{POLL}

+The link to your poll is: +
#{SITEURL}
+Send this link via email... + +
+ +
+ +END + +$html << "
" +$html << "" + +$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") } -- cgit v1.2.3