~ubuntu-branches/debian/stretch/alpine/stretch

« back to all changes in this revision

Viewing changes to web/cgi/alpine/querynewfldr.tcl

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2010-10-03 15:31:55 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20101003153155-2exypc96j1e8tw0p
Tags: 2.02-1
* New upstream release, based on re-alpine project
* Updated debian/copyright to reflect this fact
* re-alpine removed the non-free from the tarball, so now
  we do not repack the upstream tarball. (Yay!)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!./tclsh
2
 
# $Id: querynewfldr.tcl 391 2007-01-25 03:53:59Z mikes@u.washington.edu $
3
 
# ========================================================================
4
 
# Copyright 2006 University of Washington
5
 
#
6
 
# Licensed under the Apache License, Version 2.0 (the "License");
7
 
# you may not use this file except in compliance with the License.
8
 
# You may obtain a copy of the License at
9
 
#
10
 
#     http://www.apache.org/licenses/LICENSE-2.0
11
 
#
12
 
# ========================================================================
13
 
 
14
 
#  querynewfldr.tcl
15
 
#
16
 
#  Purpose:  CGI script to generate html form used to confirm 
17
 
#            folder creation
18
 
 
19
 
#  Input:
20
 
set fldr_vars {
21
 
  {fid  "No Collection Specified"}
22
 
}
23
 
 
24
 
#  Output:
25
 
#
26
 
#       HTML/CSS data representing the message specified
27
 
#       by the 'uid' argument
28
 
 
29
 
# inherit global config
30
 
source ./alpine.tcl
31
 
source cmdfunc.tcl
32
 
 
33
 
set query_menu {
34
 
  {
35
 
    {}
36
 
    {
37
 
      {
38
 
        # * * * * HELP * * * *
39
 
        cgi_put [cgi_url "Get Help" wp.tcl?page=help&oncancel=folders class=navbar target=_top]
40
 
      }
41
 
    }
42
 
  }
43
 
}
44
 
 
45
 
WPEval $fldr_vars {
46
 
  if {[catch {WPCmd PEFolder collections} collections]} {
47
 
    error [list _action "Collection list" $collections]
48
 
  }
49
 
 
50
 
  cgi_http_head {
51
 
    WPStdHttpHdrs
52
 
  }
53
 
 
54
 
  cgi_html {
55
 
    cgi_head {
56
 
      WPStdHtmlHdr "Folder Creation"
57
 
      WPStyleSheets
58
 
    }
59
 
 
60
 
    cgi_body BGCOLOR="$_wp(bordercolor)" {
61
 
 
62
 
      catch {WPCmd PEInfo set help_context foldadd}
63
 
 
64
 
      cgi_form $_wp(appdir)/wp method=get name=confirm target=_top {
65
 
        cgi_text "page=folders" type=hidden notab
66
 
        cgi_text "fid=$fid" type=hidden
67
 
        cgi_text "cid=[WPCmd PEInfo key]" type=hidden
68
 
        cgi_text "frestore=1" type=hidden
69
 
 
70
 
        cgi_table border=0 cellspacing=0 cellpadding=2 width="100%" height="100%" {
71
 
          cgi_table_row {
72
 
            eval {
73
 
              cgi_table_data $_wp(menuargs) {
74
 
                WPTFCommandMenu query_menu {}
75
 
              }
76
 
            }
77
 
            
78
 
            cgi_table_data valign=top align=center class=dialog {
79
 
              cgi_table border=0 cellspacing=0 cellpadding=2 width="70%" {
80
 
                cgi_table_row {
81
 
                  cgi_table_data align=center {
82
 
                    cgi_puts [cgi_nl][cgi_nl][cgi_nl][cgi_nl]
83
 
                    cgi_puts "Please enter the name of the folder you would like to add"
84
 
                    if {[llength $fid] > 1} {
85
 
                      cgi_put " to the directory '[join [lrange $fid 1 end] /]'"
86
 
                    }
87
 
                    if {[llength $collections] > 1} {
88
 
                      cgi_put " in the collection '[lindex [lindex $collections [lindex $fid 0]] 1]'."
89
 
                    } else {
90
 
                      cgi_put "."
91
 
                    }
92
 
                    cgi_br
93
 
                    cgi_br
94
 
                    cgi_put "New folder name: "
95
 
                    cgi_text folder= maxlength=64 size=25%
96
 
                    cgi_br
97
 
                    cgi_br
98
 
                    cgi_puts "Click 'Create' to add a new folder by that name, or 'Cancel' to return to the Folder List."
99
 
                    cgi_br
100
 
                    cgi_br
101
 
                    cgi_submit_button newfolder=Create
102
 
                    cgi_submit_button newfolder=Cancel
103
 
                  }
104
 
                }
105
 
              }
106
 
            }
107
 
          }
108
 
        }
109
 
      }
110
 
    }
111
 
  }
112
 
}