| |
119 |
119 |
-filters { |
| |
120 |
120 |
folder_id {hide_p 1} |
| |
121 |
121 |
} \ |
| |
122 |
122 |
-elements $elements |
| |
123 |
123 |
|
| |
124 |
124 |
set orderby [template::list::orderby_clause -orderby -name contents] |
| |
125 |
125 |
|
| |
126 |
126 |
if {[string equal $orderby ""]} { |
| |
127 |
127 |
set orderby " order by fs_objects.sort_key, fs_objects.name asc" |
| |
128 |
128 |
} |
| |
129 |
129 |
|
| |
130 |
130 |
db_multirow -extend { icon last_modified_pretty content_size_pretty properties_link properties_url download_url} contents select_folder_contents {} { |
| |
131 |
131 |
set last_modified_ansi [lc_time_system_to_conn $last_modified_ansi] |
| |
132 |
132 |
|
| |
133 |
133 |
set last_modified_pretty [lc_time_fmt $last_modified_ansi "%x %X"] |
| |
134 |
134 |
if {[string equal $type "folder"]} { |
| |
135 |
135 |
set content_size_pretty [lc_numeric $content_size] |
| |
136 |
136 |
append content_size_pretty " [_ file-storage.items]" |
| |
137 |
137 |
set pretty_type "Folder" |
| |
138 |
138 |
} else { |
| |
139 |
|
set type [string trimleft [file extension $file_upload_name] . ] |
| |
140 |
139 |
if {$content_size < 1024} { |
| |
141 |
140 |
set content_size_pretty "[lc_numeric $content_size] [_ file-storage.bytes]" |
| |
142 |
141 |
} else { |
| |
143 |
142 |
set content_size_pretty "[lc_numeric [expr $content_size / 1024 ]] [_ file-storage.kb]" |
| |
144 |
143 |
} |
| |
145 |
144 |
|
| |
146 |
145 |
} |
| |
147 |
146 |
|
| |
148 |
147 |
set file_upload_name [fs::remove_special_file_system_characters -string $file_upload_name] |
| |
149 |
148 |
|
| |
150 |
149 |
if { ![empty_string_p $content_size] } { |
| |
151 |
150 |
incr content_size_total $content_size |
| |
152 |
151 |
} |
| |
153 |
152 |
|
| |
154 |
153 |
set name [lang::util::localize $name] |
| |
155 |
154 |
|
| |
156 |
155 |
switch -- $type { |
| |
157 |
156 |
folder { |
| |
158 |
157 |
set properties_link "" |
| |
159 |
158 |
set properties_url "" |