Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-csv-import
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-csv-import
Commits
8fb1efa2
Commit
8fb1efa2
authored
Nov 23, 2015
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Gustaf changes
parent
b948789f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
23 deletions
+23
-23
intranet-csv-import-procs.tcl
tcl/intranet-csv-import-procs.tcl
+2
-2
import-2.adp
www/import-2.adp
+5
-5
import-2.tcl
www/import-2.tcl
+3
-3
import-im_company.tcl
www/import-im_company.tcl
+1
-1
import-im_conf_item.tcl
www/import-im_conf_item.tcl
+2
-2
import-im_project.tcl
www/import-im_project.tcl
+2
-2
import-im_risk.tcl
www/import-im_risk.tcl
+1
-1
index.adp
www/index.adp
+6
-6
index.tcl
www/index.tcl
+1
-1
No files found.
tcl/intranet-csv-import-procs.tcl
View file @
8fb1efa2
...
...
@@ -205,7 +205,7 @@ ad_proc -public im_csv_import_object_fields {
set super_types
[
im_object_super_types -object_type
$object
_type
]
set s
[
list
]
foreach t
$super
_types
{
if
{
$t
==
"acs_object"
}
{
continue
}
if
{
$t
eq
"acs_object"
}
{
continue
}
lappend s
$t
}
set super_types
$s
...
...
@@ -377,7 +377,7 @@ ad_proc -public im_csv_import_guess_parser {
set super_types
[
im_object_super_types -object_type
$object
_type
]
set s
[
list
]
foreach t
$super
_types
{
if
{
$t
==
"acs_object"
}
{
continue
}
if
{
$t
eq
"acs_object"
}
{
continue
}
lappend s
$t
}
set super_types
$s
...
...
www/import-2.adp
View file @
8fb1efa2
<master>
<property name="
title">@page_title
@</property>
<property name="context">@context_bar@</property>
<property name="main_navbar_label">@main_navbar_label@</property>
<property name="
doc(title)">@page_title;literal
@</property>
<property name="context">@context_bar
;literal
@</property>
<property name="main_navbar_label">@main_navbar_label
;literal
@</property>
<form enctype="multipart/form-data" method=POST action="import-@redirect_object_type@.tcl">
<%= [export_vars -form {object_type return_url import_filename}] %>
...
...
@@ -39,12 +39,12 @@
<!--
<tr>
<td>Save Mapping as:</td>
<td><input type=
text name=mapping_name
></td>
<td><input type=
"text" name="mapping_name"
></td>
</tr>
-->
<tr>
<td></td>
<td><input type=
submit
value="<%= [lang::message::lookup "" intranet-csv-import.Import_CSV "Import CSV"] %>"></td>
<td><input type=
"submit"
value="<%= [lang::message::lookup "" intranet-csv-import.Import_CSV "Import CSV"] %>"></td>
</tr>
</table>
...
...
www/import-2.tcl
View file @
8fb1efa2
...
...
@@ -15,7 +15,7 @@ ad_page_contract {
# Default & Security
# ---------------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-cvs-import.Upload_Objects
"Upload Objects"
]
set
context_bar
[
im_context_bar
""
$page
_title
]
set
admin_p
[
im_is_user_site_wide_or_intranet_admin
$current
_user_id
]
...
...
@@ -50,14 +50,14 @@ if {"" == $return_url} {
}
# strip off the C:\directories... crud and just get the file name
if
!
[
regexp
{([
^//
\\
]
+
)
$
}
$upload
_file match filename
]
{
if
{
!
[
regexp
{([
^//
\\
]
+
)
$
}
$upload
_file match filename
]}
{
# couldn't find a match
set filename
$upload
_file
}
if
{[
regexp
{
\.\.
}
$filename
]}
{
set error
"Filename contains forbidden characters"
ad_returnredirect
"/error.tcl?
[
export_vars -url
{
error
}]
"
ad_returnredirect
[
export_vars -base /error.tcl
{
error
}]
}
if
{
!
[
file
readable
$tmp
_filename
]}
{
...
...
www/import-im_company.tcl
View file @
8fb1efa2
...
...
@@ -24,7 +24,7 @@ ad_page_contract {
# Default & Security
# ---------------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-cvs-import.Upload_Objects
"Upload Objects"
]
set
context_bar
[
im_context_bar
""
$page
_title
]
...
...
www/import-im_conf_item.tcl
View file @
8fb1efa2
...
...
@@ -25,7 +25,7 @@ ad_page_contract {
# Default & Security
# ---------------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-cvs-import.Upload_Objects
"Upload Objects"
]
set
context_bar
[
im_context_bar
""
$page
_title
]
set
admin_p
[
im_is_user_site_wide_or_intranet_admin
$current
_user_id
]
...
...
@@ -168,7 +168,7 @@ foreach csv_line_fields $values_list_of_lists {
set var_value
[
string
trim
[
lindex
$csv
_line_fields
$j
]]
set var_value
[
string
map -nocase
{
"
\"
"
"'"
"
\[
"
"("
"
\{
"
"("
"
\}
"
")"
"
\]
"
")"
}
$var
_value
]
if
{
[
string
equal
"NULL"
$var
_value
]
}
{
set var_value
""
}
if
{
"NULL"
eq
$var
_value
}
{
set var_value
""
}
# replace unicode characters by non-accented characters
# Watch out! Does not work with Latin-1 characters
...
...
www/import-im_project.tcl
View file @
8fb1efa2
...
...
@@ -27,7 +27,7 @@ ad_page_contract {
# Default & Security
# ---------------------------------------------------------------------
set current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set current_user_id
[
a
uth::require_logi
n
]
set page_title
[
lang::message::lookup
""
intranet-cvs-import.Upload_Objects
"Upload Objects"
]
set context_bar
[
im_context_bar
""
$page
_title
]
set admin_p
[
im_is_user_site_wide_or_intranet_admin
$current
_user_id
]
...
...
@@ -193,7 +193,7 @@ foreach csv_line_fields $values_list_of_lists {
set var_value
[
string
trim
[
lindex
$csv
_line_fields
$j
]]
set var_value
[
string
map -nocase
{
"
\"
"
"'"
"
\[
"
"("
"
\{
"
"("
"
\}
"
")"
"
\]
"
")"
}
$var
_value
]
if {
[
string
equal
"NULL"
$var
_value
]
} { set var_value ""}
if {
"
NULL
" eq
$var
_value
} { set var_value ""}
# replace unicode characters by non-accented characters
# Watch out! Does not work with Latin-1 characters
...
...
www/import-im_risk.tcl
View file @
8fb1efa2
...
...
@@ -25,7 +25,7 @@ ad_page_contract {
# Default & Security
# ---------------------------------------------------------------------
set
current_user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
current_user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-cvs-import.Upload_Objects
"Upload Objects"
]
set
context_bar
[
im_context_bar
""
$page
_title
]
...
...
www/index.adp
View file @
8fb1efa2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<master>
<property
name=
"
title"
>
@page_title
@
</property>
<property
name=
"context"
>
@context_bar@
</property>
<property
name=
"main_navbar_label"
>
@main_navbar_label@
</property>
<property
name=
"
doc(title)"
>
@page_title;literal
@
</property>
<property
name=
"context"
>
@context_bar
;literal
@
</property>
<property
name=
"main_navbar_label"
>
@main_navbar_label
;literal
@
</property>
<form
enctype=
"multipart/form-data"
method=
POST
action=
"import-2.tcl"
>
<
%=
[
export_vars
-form
{
return_url
main_navbar_label
}]
%
>
<table
border=
0
>
<table
border=
"0"
>
<tr>
<td>
#intranet-csv-import.Object_Type#
</td>
<td>
...
...
@@ -26,7 +26,7 @@
<tr>
<td><
%=
[
lang::message::lookup
""
intranet-csv-import
.
Filename
]
%
></td>
<td>
<input
type=
file
name=
upload_file
size=
30
>
<input
type=
"file"
name=
"upload_file"
size=
"30"
>
<
%=
[
im_gif
help
"
Use
the
&
quot
;
Browse
...&
quot
;
button
to
locate
your
file
,
then
click
&
quot
;
Open
&
quot
;."]
%
>
</td>
</tr>
...
...
@@ -34,7 +34,7 @@
<tr>
<td></td>
<td>
<input
type=
submit
>
<input
type=
"submit"
>
</td>
</tr>
...
...
www/index.tcl
View file @
8fb1efa2
...
...
@@ -22,7 +22,7 @@ ad_page_contract {
{
object_type
""
}
}
set
user_id
[
a
d_maybe_redirect_for_registratio
n
]
set
user_id
[
a
uth::require_logi
n
]
set
page_title
[
lang::message::lookup
""
intranet-csv-import.Upload_file
"Upload File"
]
set
context_bar
[
im_context_bar
""
$page
_title
]
set
main_navbar_label
[
im_csv_import_label_from_object_type -object_type
$object
_type
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment