Merge lp:~edb/quam-plures/uncripple_file_manager into lp:quam-plures
- uncripple_file_manager
- Merge into trunk
Status: | Merged |
---|---|
Merged at revision: | 7629 |
Proposed branch: | lp:~edb/quam-plures/uncripple_file_manager |
Merge into: | lp:quam-plures |
Diff against target: |
495 lines (+184/-214) 6 files modified
qp_inc/files/files.ctrl.php (+1/-2) qp_inc/files/views/_file_browse.view.php (+44/-60) qp_inc/files/views/_file_list.inc.php (+134/-147) qp_inc/items/model/_item.funcs.php (+2/-2) qp_inc/items/views/_item_expert.form.php (+2/-2) qp_inc/items/views/_item_links.view.php (+1/-1) |
To merge this branch: | bzr merge lp:~edb/quam-plures/uncripple_file_manager |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kimberly (community) | Approve | ||
Tilman Blumenbach (community) | Approve | ||
Review via email: mp+72223@code.launchpad.net |
Commit message
Description of the change
Kimberly (kimberly-netweb360) wrote : | # |
Each of those items is a different branch. The problem is that nothing going into merge is getting code review or testing or merged, so "solved" issues remain unsolved as far as the core is concerned. Which is why I use "core plus branches".
Kimberly (kimberly-netweb360) wrote : | # |
OK, I have never really understood how the branch thing works. What do I need to do to help? Do we need to merge this branch and then others. I know I have been lax on helping with testing. I tested this branch and the file manager in a pop-up appears to be working, I uploaded a file with it, inserted in in a post, Inserted several images using different floats and caption/title options and so no obvious flaws other than it is adding the center as well as the float to the class, as in "floatleft center"
Just educate me a bit more on what I need to be doing and I will try my best to do more.
I just tried a quick forum post about branching, but basically each branch is all-by-itself until merging happens. So problems fixed in another branch won't be here until that other branch is merged AND this branch author updates this branch.
For purposes of testing a branch do like you did: test the branch according to what IT says it is, and be damned with all other problems that may or may not have branches that address them.
Tilman Blumenbach (tblue) wrote : | # |
This looks fine as well. :)
Kimberly (kimberly-netweb360) wrote : | # |
Function and display works and looks as expected. No problems found.
I am adding core updates AND retesting everything I have in merge just to be sure, but it is taking a long time due to many conflicts this time around. Will send another comment when I got them back up to speed.
Preview Diff
1 | === modified file 'qp_inc/files/files.ctrl.php' |
2 | --- qp_inc/files/files.ctrl.php 2011-01-28 22:33:23 +0000 |
3 | +++ qp_inc/files/files.ctrl.php 2011-09-04 22:26:30 +0000 |
4 | @@ -1475,8 +1475,7 @@ |
5 | } |
6 | |
7 | // Update sub-menu: |
8 | -$popfor = param( 'popfor', 'string', '', true ); |
9 | -if( $current_User->check_perm( 'files', 'add' ) && $popfor == '' ) |
10 | +if( $current_User->check_perm( 'files', 'add' ) ) |
11 | { // Permission to upload and we are not in a popup window (no subtabs needed otherwise) |
12 | $AdminUI->add_menu_entries( |
13 | 'files', |
14 | |
15 | === modified file 'qp_inc/files/views/_file_browse.view.php' |
16 | --- qp_inc/files/views/_file_browse.view.php 2011-03-14 23:04:42 +0000 |
17 | +++ qp_inc/files/views/_file_browse.view.php 2011-09-04 22:26:30 +0000 |
18 | @@ -64,24 +64,11 @@ |
19 | */ |
20 | global $edited_Item; |
21 | |
22 | -$popfor = param( 'popfor', 'string', '', true ); |
23 | - |
24 | ?> |
25 | - |
26 | <!-- FILE BROWSER --> |
27 | - |
28 | <?php |
29 | $Widget = new Widget( 'file_browser' ); |
30 | - |
31 | -if( $popfor == '' ) |
32 | -{ // this is not a popup so offer the upload page |
33 | - $Widget->global_icon( T_('Upload...'), 'upload', regenerate_url( 'ctrl', 'ctrl=upload' ), T_('Upload').' »', 1, 5 ); |
34 | -} |
35 | -else |
36 | -{ // or offer to close the popup |
37 | - $Widget->global_icon( T_('Close file manager'), 'close', 'javascript:window.close();', T_('Close file manager'), 3, 3, array( 'class'=>'action_icon highlight') ); |
38 | -} |
39 | - |
40 | +$Widget->global_icon( T_('Upload...'), 'upload', regenerate_url( 'ctrl', 'ctrl=upload' ), T_('Upload').' »', 1, 5 ); |
41 | $Widget->title = get_manual_link( 'file-browser' ).T_('File browser'); |
42 | $Widget->disp_template_replaced( 'block_start' ); |
43 | ?> |
44 | @@ -291,54 +278,51 @@ |
45 | { // dir or file creation is enabled and we're allowed to add files: |
46 | global $create_type; |
47 | |
48 | - if( $popfor == '' ) |
49 | - { |
50 | - echo '<div class="toolbaritem">'; |
51 | - $Form = new Form( NULL, 'fmbar_create_checkchanges', 'post', 'none' ); |
52 | - $Form->begin_form(); |
53 | - $Form->hidden( 'action', 'createnew' ); |
54 | - $Form->hidden_ctrl(); |
55 | - $Form->hiddens_by_key( get_memorized() ); |
56 | - if( ! $Settings->get( 'fm_enable_create_dir' ) ) |
57 | - { // We can create files only: |
58 | - echo '<label for="fm_createname" class="tooltitle">'.T_('New file:').'</label>'; |
59 | - echo '<input type="hidden" name="create_type" value="file" />'; |
60 | - } |
61 | - elseif( ! $Settings->get( 'fm_enable_create_file' ) ) |
62 | - { // We can create directories only: |
63 | - echo '<label for="fm_createname" class="tooltitle">'.T_('New folder:').'</label>'; |
64 | - echo '<input type="hidden" name="create_type" value="dir" />'; |
65 | - } |
66 | - else |
67 | - { // We can create both files and directories: |
68 | - echo T_('New').': '; |
69 | - echo '<select name="create_type">'; |
70 | - echo '<option value="dir"'; |
71 | - if( isset($create_type) && $create_type == 'dir' ) |
72 | - { |
73 | - echo ' selected="selected"'; |
74 | - } |
75 | - echo '>'.T_('folder').'</option>'; |
76 | + echo '<div class="toolbaritem">'; |
77 | + $Form = new Form( NULL, 'fmbar_create_checkchanges', 'post', 'none' ); |
78 | + $Form->begin_form(); |
79 | + $Form->hidden( 'action', 'createnew' ); |
80 | + $Form->hidden_ctrl(); |
81 | + $Form->hiddens_by_key( get_memorized() ); |
82 | + if( ! $Settings->get( 'fm_enable_create_dir' ) ) |
83 | + { // We can create files only: |
84 | + echo '<label for="fm_createname" class="tooltitle">'.T_('New file:').'</label>'; |
85 | + echo '<input type="hidden" name="create_type" value="file" />'; |
86 | + } |
87 | + elseif( ! $Settings->get( 'fm_enable_create_file' ) ) |
88 | + { // We can create directories only: |
89 | + echo '<label for="fm_createname" class="tooltitle">'.T_('New folder:').'</label>'; |
90 | + echo '<input type="hidden" name="create_type" value="dir" />'; |
91 | + } |
92 | + else |
93 | + { // We can create both files and directories: |
94 | + echo T_('New').': '; |
95 | + echo '<select name="create_type">'; |
96 | + echo '<option value="dir"'; |
97 | + if( isset($create_type) && $create_type == 'dir' ) |
98 | + { |
99 | + echo ' selected="selected"'; |
100 | + } |
101 | + echo '>'.T_('folder').'</option>'; |
102 | |
103 | - echo '<option value="file"'; |
104 | - if( isset($create_type) && $create_type == 'file' ) |
105 | - { |
106 | - echo ' selected="selected"'; |
107 | - } |
108 | - echo '>'.T_('file').'</option>'; |
109 | - echo '</select>:'; |
110 | + echo '<option value="file"'; |
111 | + if( isset($create_type) && $create_type == 'file' ) |
112 | + { |
113 | + echo ' selected="selected"'; |
114 | } |
115 | - ?> |
116 | - <input type="text" name="create_name" id="fm_createname" value="<?php |
117 | - if( isset( $create_name ) ) |
118 | - { |
119 | - echo $create_name; |
120 | - } ?>" size="15" /> |
121 | - <input class="ActionButton" type="submit" value="<?php echo format_to_output( T_('Create!'), 'formvalue' ) ?>" /> |
122 | - <?php |
123 | - $Form->end_form(); |
124 | - echo '</div>'; |
125 | - } |
126 | + echo '>'.T_('file').'</option>'; |
127 | + echo '</select>:'; |
128 | + } |
129 | + ?> |
130 | + <input type="text" name="create_name" id="fm_createname" value="<?php |
131 | + if( isset( $create_name ) ) |
132 | + { |
133 | + echo $create_name; |
134 | + } ?>" size="15" /> |
135 | + <input class="ActionButton" type="submit" value="<?php echo format_to_output( T_('Create!'), 'formvalue' ) ?>" /> |
136 | + <?php |
137 | + $Form->end_form(); |
138 | + echo '</div>'; |
139 | } |
140 | |
141 | // UPLOAD: |
142 | |
143 | === modified file 'qp_inc/files/views/_file_list.inc.php' |
144 | --- qp_inc/files/views/_file_list.inc.php 2011-08-26 19:57:08 +0000 |
145 | +++ qp_inc/files/views/_file_list.inc.php 2011-09-04 22:26:30 +0000 |
146 | @@ -136,27 +136,23 @@ |
147 | echo '<th class="nowrap">'.$fm_Filelist->get_sort_link( 'lastmod', /* TRANS: file's last change / timestamp */ T_('Last change') ).'</th>'; |
148 | } |
149 | |
150 | -$popfor = param( 'popfor', 'string', '', true ); |
151 | - |
152 | -if( $popfor == '' ) |
153 | -{ |
154 | - if( $UserSettings->get('fm_showfsperms') ) |
155 | - { // Show file perms column |
156 | - echo '<th class="nowrap">'.$fm_Filelist->get_sort_link( 'perms', /* TRANS: file's permissions (short) */ T_('Perms') ).'</th>'; |
157 | - } |
158 | - |
159 | - if( $UserSettings->get('fm_showfsowner') ) |
160 | - { // Show file owner column |
161 | - echo '<th class="nowrap">'.$fm_Filelist->get_sort_link( 'fsowner', /* TRANS: file owner */ T_('Owner') ).'</th>'; |
162 | - } |
163 | - |
164 | - if( $UserSettings->get('fm_showfsgroup') ) |
165 | - { // Show file group column |
166 | - echo '<th class="nowrap">'.$fm_Filelist->get_sort_link( 'fsgroup', /* TRANS: file group */ T_('Group') ).'</th>'; |
167 | - } |
168 | - |
169 | - echo '<th class="lastcol nowrap">'. /* TRANS: file actions; edit, rename, copy, .. */ T_('Actions').'</th>'; |
170 | -} |
171 | +if( $UserSettings->get('fm_showfsperms') ) |
172 | +{ // Show file perms column |
173 | + echo '<th class="nowrap">'.$fm_Filelist->get_sort_link( 'perms', /* TRANS: file's permissions (short) */ T_('Perms') ).'</th>'; |
174 | +} |
175 | + |
176 | +if( $UserSettings->get('fm_showfsowner') ) |
177 | +{ // Show file owner column |
178 | + echo '<th class="nowrap">'.$fm_Filelist->get_sort_link( 'fsowner', /* TRANS: file owner */ T_('Owner') ).'</th>'; |
179 | +} |
180 | + |
181 | +if( $UserSettings->get('fm_showfsgroup') ) |
182 | +{ // Show file group column |
183 | + echo '<th class="nowrap">'.$fm_Filelist->get_sort_link( 'fsgroup', /* TRANS: file group */ T_('Group') ).'</th>'; |
184 | +} |
185 | + |
186 | +echo '<th class="lastcol nowrap">'. /* TRANS: file actions; edit, rename, copy, .. */ T_('Actions').'</th>'; |
187 | + |
188 | echo '</tr>'; |
189 | ?> |
190 | </thead> |
191 | @@ -394,64 +390,61 @@ |
192 | } |
193 | |
194 | /**************** File pemissions ***************/ |
195 | - if( $popfor == '' ) |
196 | - { |
197 | - if( $UserSettings->get('fm_showfsperms') ) |
198 | - { // Show file perms |
199 | - echo '<td class="perms">'; |
200 | - $fm_permlikelsl = $UserSettings->param_Request( 'fm_permlikelsl', 'fm_permlikelsl', 'integer', 0 ); |
201 | - if( $current_User->check_perm( 'files', 'edit' ) ) |
202 | - { // User can edit: |
203 | - echo '<a title="'.T_('Edit permissions').'" href="'.regenerate_url( 'fm_selected,action', 'action=edit_perms&fm_selected[]='.rawurlencode($lFile->get_rdfp_rel_path()) ).'">' |
204 | - .$lFile->get_perms( $fm_permlikelsl ? 'lsl' : '' ).'</a>'; |
205 | - } |
206 | - else |
207 | - { |
208 | - echo $lFile->get_perms( $fm_permlikelsl ? 'lsl' : '' ); |
209 | - } |
210 | - echo '</td>'; |
211 | - } |
212 | - |
213 | - /**************** File owner ********************/ |
214 | - if( $UserSettings->get('fm_showfsowner') ) |
215 | - { // Show file owner |
216 | - echo '<td class="fsowner">'; |
217 | - echo $lFile->get_fsowner_name(); |
218 | - echo '</td>'; |
219 | - } |
220 | - |
221 | - /**************** File group *********************/ |
222 | - if( $UserSettings->get('fm_showfsgroup') ) |
223 | - { // Show file owner |
224 | - echo '<td class="fsgroup">'; |
225 | - echo $lFile->get_fsgroup_name(); |
226 | - echo '</td>'; |
227 | - } |
228 | - |
229 | - /***************** Action icons ****************/ |
230 | - echo '<td class="actions lastcol">'; |
231 | - if( $current_User->check_perm( 'files', 'edit' ) ) |
232 | - { // User can edit: |
233 | - if( $lFile->is_editable( $current_User->check_perm( 'files', 'all' ) ) ) |
234 | - { |
235 | - echo action_icon( T_('Edit file...'), 'edit', regenerate_url( 'fm_selected', 'action=edit_file&fm_selected[]='.rawurlencode($lFile->get_rdfp_rel_path()) ) ); |
236 | - } |
237 | - else |
238 | - { |
239 | - echo get_icon( 'edit', 'noimg' ); |
240 | - } |
241 | - } |
242 | - echo action_icon( T_('Edit properties...'), 'properties', regenerate_url( 'fm_selected', 'action=edit_properties&fm_selected[]='.rawurlencode($lFile->get_rdfp_rel_path()) ) ); |
243 | - |
244 | - if( $current_User->check_perm( 'files', 'edit' ) ) |
245 | - { // User can edit: |
246 | - echo action_icon( T_('Rename'), 'rename', regenerate_url( 'fm_selected', 'action=rename&fm_selected[]='.rawurlencode($lFile->get_rdfp_rel_path()) ) ); |
247 | - echo action_icon( T_('Move'), 'move', regenerate_url( 'fm_mode,fm_sources,fm_sources_root', 'fm_mode=file_move&fm_sources[]='.rawurlencode( $lFile->get_rdfp_rel_path() ).'&fm_sources_root='.$fm_Filelist->_FileRoot->ID ) ); |
248 | - echo action_icon( T_('Copy'), 'copy', regenerate_url( 'fm_mode,fm_sources,fm_sources_root', 'fm_mode=file_copy&fm_sources[]='.rawurlencode( $lFile->get_rdfp_rel_path() ).'&fm_sources_root='.$fm_Filelist->_FileRoot->ID ) ); |
249 | - echo action_icon( T_('Delete'), 'delete', regenerate_url( 'fm_selected', 'action=delete&fm_selected[]='.rawurlencode( $lFile->get_rdfp_rel_path() ) ) ); |
250 | - } |
251 | - echo '</td>'; |
252 | - } |
253 | + if( $UserSettings->get('fm_showfsperms') ) |
254 | + { // Show file perms |
255 | + echo '<td class="perms">'; |
256 | + $fm_permlikelsl = $UserSettings->param_Request( 'fm_permlikelsl', 'fm_permlikelsl', 'integer', 0 ); |
257 | + if( $current_User->check_perm( 'files', 'edit' ) ) |
258 | + { // User can edit: |
259 | + echo '<a title="'.T_('Edit permissions').'" href="'.regenerate_url( 'fm_selected,action', 'action=edit_perms&fm_selected[]='.rawurlencode($lFile->get_rdfp_rel_path()) ).'">' |
260 | + .$lFile->get_perms( $fm_permlikelsl ? 'lsl' : '' ).'</a>'; |
261 | + } |
262 | + else |
263 | + { |
264 | + echo $lFile->get_perms( $fm_permlikelsl ? 'lsl' : '' ); |
265 | + } |
266 | + echo '</td>'; |
267 | + } |
268 | + |
269 | + /**************** File owner ********************/ |
270 | + if( $UserSettings->get('fm_showfsowner') ) |
271 | + { // Show file owner |
272 | + echo '<td class="fsowner">'; |
273 | + echo $lFile->get_fsowner_name(); |
274 | + echo '</td>'; |
275 | + } |
276 | + |
277 | + /**************** File group *********************/ |
278 | + if( $UserSettings->get('fm_showfsgroup') ) |
279 | + { // Show file owner |
280 | + echo '<td class="fsgroup">'; |
281 | + echo $lFile->get_fsgroup_name(); |
282 | + echo '</td>'; |
283 | + } |
284 | + |
285 | + /***************** Action icons ****************/ |
286 | + echo '<td class="actions lastcol">'; |
287 | + if( $current_User->check_perm( 'files', 'edit' ) ) |
288 | + { // User can edit: |
289 | + if( $lFile->is_editable( $current_User->check_perm( 'files', 'all' ) ) ) |
290 | + { |
291 | + echo action_icon( T_('Edit file...'), 'edit', regenerate_url( 'fm_selected', 'action=edit_file&fm_selected[]='.rawurlencode($lFile->get_rdfp_rel_path()) ) ); |
292 | + } |
293 | + else |
294 | + { |
295 | + echo get_icon( 'edit', 'noimg' ); |
296 | + } |
297 | + } |
298 | + echo action_icon( T_('Edit properties...'), 'properties', regenerate_url( 'fm_selected', 'action=edit_properties&fm_selected[]='.rawurlencode($lFile->get_rdfp_rel_path()) ) ); |
299 | + |
300 | + if( $current_User->check_perm( 'files', 'edit' ) ) |
301 | + { // User can edit: |
302 | + echo action_icon( T_('Rename'), 'rename', regenerate_url( 'fm_selected', 'action=rename&fm_selected[]='.rawurlencode($lFile->get_rdfp_rel_path()) ) ); |
303 | + echo action_icon( T_('Move'), 'move', regenerate_url( 'fm_mode,fm_sources,fm_sources_root', 'fm_mode=file_move&fm_sources[]='.rawurlencode( $lFile->get_rdfp_rel_path() ).'&fm_sources_root='.$fm_Filelist->_FileRoot->ID ) ); |
304 | + echo action_icon( T_('Copy'), 'copy', regenerate_url( 'fm_mode,fm_sources,fm_sources_root', 'fm_mode=file_copy&fm_sources[]='.rawurlencode( $lFile->get_rdfp_rel_path() ).'&fm_sources_root='.$fm_Filelist->_FileRoot->ID ) ); |
305 | + echo action_icon( T_('Delete'), 'delete', regenerate_url( 'fm_selected', 'action=delete&fm_selected[]='.rawurlencode( $lFile->get_rdfp_rel_path() ) ) ); |
306 | + } |
307 | + echo '</td>'; |
308 | |
309 | echo '</tr>'; |
310 | |
311 | @@ -495,74 +488,68 @@ |
312 | // ------------- |
313 | // Footer with "check all", "with selected: ..": |
314 | // -------------- |
315 | - if( $popfor != 'attach' ) |
316 | - { |
317 | - ?> |
318 | - <tr class="listfooter firstcol lastcol"> |
319 | - <td colspan="<?php echo $filetable_cols ?>"> |
320 | - <?php |
321 | - echo $Form->check_all(); |
322 | - |
323 | - $field_options = array(); |
324 | - $title_options = array(); |
325 | - $caption_options = array(); |
326 | - |
327 | - if( $mode != 'upload' && ($fm_Filelist->get_root_type() == 'collection' || !empty($Blog)) ) |
328 | - { // We are browsing files for a collection: |
329 | - // fp> TODO: use current as default but let user choose into which blog he wants to post |
330 | - $field_options['make_post'] = T_('Make one post (including all images)'); |
331 | - $field_options['make_posts'] = T_('Make multiple posts (1 per image)'); |
332 | - $title_options['default'] = T_('include if provided'); |
333 | - $caption_options['default'] = T_('include if provided'); |
334 | - } |
335 | - |
336 | - if( $mode == 'upload' ) |
337 | - { // we are in a popup opened by the "Files" button |
338 | - $field_options['float_left'] = T_('Float left'); |
339 | - $field_options['float_right'] = T_('Float right'); |
340 | - $field_options['centered'] = T_('Centered'); |
341 | - $field_options['inline'] = T_('In-line'); |
342 | - $title_options['default'] = T_('default'); |
343 | - $title_options['placeholder'] = T_('placeholder'); |
344 | - $title_options['none'] = T_('no title'); |
345 | - $caption_options['default'] = T_('default'); |
346 | - $caption_options['placeholder'] = T_('placeholder'); |
347 | - $caption_options['none'] = T_('no caption'); |
348 | - } |
349 | - |
350 | - if( $popfor == '' ) |
351 | - { |
352 | - if( $current_User->check_perm( 'files', 'edit' ) ) |
353 | - { // current user can edit files |
354 | - $field_options['rename'] = T_('Rename files...'); |
355 | - $field_options['delete'] = T_('Delete files...'); |
356 | - // NOTE: No delete confirmation by javascript, we need to check DB integrity! |
357 | - } |
358 | - // BROKEN ? |
359 | - $field_options['download'] = T_('Download files as ZIP archive...'); |
360 | - |
361 | - /* Not fully functional: |
362 | - $field_options['copy'] = T_('Copy the selected files...'); |
363 | - $field_options['move'] = T_('Move the selected files...'); |
364 | - */ |
365 | - } |
366 | - |
367 | - $Form->switch_layout( 'none' ); |
368 | - $Form->select_input_array( 'group_action', $action, $field_options, ' || <strong>'.T_('With selected files').'</strong>' ); |
369 | - |
370 | - if( $mode == 'upload' ) |
371 | - { // we are in a popup opened by the "Files" button |
372 | - $Form->select_input_array( 'title_action', 'default', $title_options, ' <strong>'.T_('title').'</strong>' ); |
373 | - $Form->select_input_array( 'caption_action', 'default', $caption_options, ' <strong>'.T_('caption').'</strong>' ); |
374 | - } |
375 | - // The "go" button gives us what to do with the file, title, and caption for all files |
376 | - $Form->submit_input( array( 'name'=>'actionArray[group_action][title_action][caption_action]', 'value'=>T_('Go!'), 'onclick'=>'return js_act_on_selected();' ) ); |
377 | - $Form->switch_layout( NULL ); |
378 | - ?> |
379 | - </td> |
380 | - </tr> |
381 | - <?php |
382 | - } |
383 | + ?> |
384 | + <tr class="listfooter firstcol lastcol"> |
385 | + <td colspan="<?php echo $filetable_cols ?>"> |
386 | + <?php |
387 | + echo $Form->check_all(); |
388 | + |
389 | + $field_options = array(); |
390 | + $title_options = array(); |
391 | + $caption_options = array(); |
392 | + |
393 | + if( $mode != 'upload' && ($fm_Filelist->get_root_type() == 'collection' || !empty($Blog)) ) |
394 | + { // We are browsing files for a collection: |
395 | + // fp> TODO: use current as default but let user choose into which blog he wants to post |
396 | + $field_options['make_post'] = T_('Make one post (including all images)'); |
397 | + $field_options['make_posts'] = T_('Make multiple posts (1 per image)'); |
398 | + $title_options['default'] = T_('include if provided'); |
399 | + $caption_options['default'] = T_('include if provided'); |
400 | + } |
401 | + |
402 | + if( $mode == 'upload' ) |
403 | + { // we are in a popup opened by the "Files" button |
404 | + $field_options['float_left'] = T_('Float left'); |
405 | + $field_options['float_right'] = T_('Float right'); |
406 | + $field_options['centered'] = T_('Centered'); |
407 | + $field_options['inline'] = T_('In-line'); |
408 | + $title_options['default'] = T_('default'); |
409 | + $title_options['placeholder'] = T_('placeholder'); |
410 | + $title_options['none'] = T_('no title'); |
411 | + $caption_options['default'] = T_('default'); |
412 | + $caption_options['placeholder'] = T_('placeholder'); |
413 | + $caption_options['none'] = T_('no caption'); |
414 | + } |
415 | + |
416 | + if( $current_User->check_perm( 'files', 'edit' ) ) |
417 | + { // current user can edit files |
418 | + $field_options['rename'] = T_('Rename files...'); |
419 | + $field_options['delete'] = T_('Delete files...'); |
420 | + // NOTE: No delete confirmation by javascript, we need to check DB integrity! |
421 | + } |
422 | + // BROKEN ? |
423 | + $field_options['download'] = T_('Download files as ZIP archive...'); |
424 | + |
425 | + /* Not fully functional: |
426 | + $field_options['copy'] = T_('Copy the selected files...'); |
427 | + $field_options['move'] = T_('Move the selected files...'); |
428 | + */ |
429 | + |
430 | + $Form->switch_layout( 'none' ); |
431 | + $Form->select_input_array( 'group_action', $action, $field_options, ' || <strong>'.T_('With selected files').'</strong>' ); |
432 | + |
433 | + if( $mode == 'upload' ) |
434 | + { // we are in a popup opened by the "Files" button |
435 | + $Form->select_input_array( 'title_action', 'default', $title_options, ' <strong>'.T_('title').'</strong>' ); |
436 | + $Form->select_input_array( 'caption_action', 'default', $caption_options, ' <strong>'.T_('caption').'</strong>' ); |
437 | + } |
438 | + // The "go" button gives us what to do with the file, title, and caption for all files |
439 | + $Form->submit_input( array( 'name'=>'actionArray[group_action][title_action][caption_action]', 'value'=>T_('Go!'), 'onclick'=>'return js_act_on_selected();' ) ); |
440 | + $Form->switch_layout( NULL ); |
441 | + ?> |
442 | + </td> |
443 | + </tr> |
444 | + <?php |
445 | } |
446 | ?> |
447 | </tbody> |
448 | |
449 | === modified file 'qp_inc/items/model/_item.funcs.php' |
450 | --- qp_inc/items/model/_item.funcs.php 2011-03-07 14:26:49 +0000 |
451 | +++ qp_inc/items/model/_item.funcs.php 2011-09-04 22:26:30 +0000 |
452 | @@ -445,8 +445,8 @@ |
453 | { // Check that we have permission to edit item: |
454 | |
455 | $fieldset_title .= ' - <a href="'.$dispatcher.'?ctrl=files&fm_mode=link_item&item_ID='.$edited_Item->ID |
456 | - .'" onclick="return pop_up_window( \''.$dispatcher.'?ctrl=files&mode=upload&popfor=attach&iframe_name=' |
457 | - .$iframe_name.'&fm_mode=link_item&item_ID='.$edited_Item->ID.'\', \'fileman_upload\', 900 )">' |
458 | + .'" onclick="return pop_up_window( \''.$dispatcher.'?ctrl=files&mode=upload&&iframe_name=' |
459 | + .$iframe_name.'&fm_mode=link_item&item_ID='.$edited_Item->ID.'\', \'fileman_upload\', 987 )">' |
460 | .get_icon( 'folder', 'imgtag' ).' '.T_('Link/Attach files').'</a> <span class="note">(popup)</span>'; |
461 | } |
462 | |
463 | |
464 | === modified file 'qp_inc/items/views/_item_expert.form.php' |
465 | --- qp_inc/items/views/_item_expert.form.php 2011-03-07 14:26:49 +0000 |
466 | +++ qp_inc/items/views/_item_expert.form.php 2011-09-04 22:26:30 +0000 |
467 | @@ -180,14 +180,14 @@ |
468 | // fp> TODO: check what happens if blog folders are disabled |
469 | if( $current_User->check_perm( 'files', 'view' ) ) |
470 | { |
471 | - $fm_url_params = 'mode=upload&popfor=files'; |
472 | + $fm_url_params = 'mode=upload'; |
473 | if( !empty($edited_Item->ID) ) |
474 | { |
475 | $fm_url_params .= '&fm_mode=link_item&item_ID='.$edited_Item->ID; |
476 | } |
477 | echo '<input id="itemform_button_files" type="button" value="'.format_to_output(T_('Files...'), 'formvalue') |
478 | .'" class="ActionButton" onclick="pop_up_window( \'' |
479 | - .url_add_param( $Blog->get_filemanager_link(), $fm_url_params ).'\', \'fileman_upload\', 900 )" /> '; |
480 | + .url_add_param( $Blog->get_filemanager_link(), $fm_url_params ).'\', \'fileman_upload\', 987 )" /> '; |
481 | } |
482 | } |
483 | |
484 | |
485 | === modified file 'qp_inc/items/views/_item_links.view.php' |
486 | --- qp_inc/items/views/_item_links.view.php 2010-12-31 12:12:03 +0000 |
487 | +++ qp_inc/items/views/_item_links.view.php 2011-09-04 22:26:30 +0000 |
488 | @@ -147,7 +147,7 @@ |
489 | $title = T_('Locate this file!'); |
490 | $url = $current_File->get_linkedit_url( $edited_Item->ID ); |
491 | $r = '<a href="'.$url.'" onclick="return pop_up_window( \'' |
492 | - .url_add_param( $url, 'mode=upload&iframe_name='.$iframe_name.'' ).'\', \'fileman_upload\', 1000 )" target="_parent" title="'.$title.'">' |
493 | + .url_add_param( $url, 'mode=upload&iframe_name='.$iframe_name.'' ).'\', \'fileman_upload\', 987 )" target="_parent" title="'.$title.'">' |
494 | .get_icon( 'locate', 'imgtag', array( 'title'=>$title ) ).'</a> '; |
495 | } |
496 |
This does take us back. The browse window at the bottom where you choose title shows "no caption".
I noticed the work you did to have the ability to see the title and caption by mousing over is gone. Will that be added back at some time?