From dc5e05d3349bc493e4c1f33fb2561bb80ddd0c7f Mon Sep 17 00:00:00 2001 From: marijus Date: Sat, 1 Nov 2014 23:55:36 +0100 Subject: even more photos work --- mod/photos.php | 20 ++++----- view/css/mod_photos.css | 62 ++------------------------ view/tpl/album_edit.tpl | 38 ++++++++-------- view/tpl/photo_album.tpl | 19 ++++---- view/tpl/photo_view.tpl | 109 ++++++++++++++++++++++----------------------- view/tpl/photos_upload.tpl | 15 +++---- 6 files changed, 103 insertions(+), 160 deletions(-) diff --git a/mod/photos.php b/mod/photos.php index d1f2b4993..48bc6d1e5 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -439,12 +439,8 @@ function photos_content(&$a) { // URLs: // photos/name - // photos/name/upload - // photos/name/upload/xxxxx (xxxxx is album name) - // photos/name/album/xxxxx - // photos/name/album/xxxxx/edit + // photos/name/album/xxxxx (xxxxx is album name) // photos/name/image/xxxxx - // photos/name/image/xxxxx/edit if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { @@ -518,10 +514,6 @@ function photos_content(&$a) { $_is_owner = (local_user() && (local_user() == $owner_uid)); $o .= profile_tabs($a,$_is_owner, $a->data['channel']['channel_address']); - // - // dispatch request - // - /** * Display upload form */ @@ -590,6 +582,10 @@ function photos_content(&$a) { } + // + // dispatch request + // + /* * Display a single photo album */ @@ -644,7 +640,8 @@ function photos_content(&$a) { $albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer'])); $edit_tpl = get_markup_template('album_edit.tpl'); $album_edit = replace_macros($edit_tpl,array( - '$nametext' => t('New album name: '), + '$nametext' => t('Enter a new album name'), + '$name_placeholder' => t('or select an existing one (doubleclick)'), '$nickname' => $a->data['channel']['channel_address'], '$album' => $album_e, '$albums' => $albums['albums'], @@ -928,7 +925,8 @@ function photos_content(&$a) { 'rotateccw' => t('Rotate CCW (left)'), 'albums' => $albums['albums'], 'album' => $album_e, - 'newalbum' => t('New album name'), + 'newalbum_label' => t('Enter a new album name'), + 'newalbum_placeholder' => t('or select an existing one (doubleclick)'), 'nickname' => $a->data['channel']['channel_address'], 'resource_id' => $ph[0]['resource_id'], 'capt_label' => t('Caption'), diff --git a/view/css/mod_photos.css b/view/css/mod_photos.css index 061f2f40a..c37cc3332 100644 --- a/view/css/mod_photos.css +++ b/view/css/mod_photos.css @@ -13,70 +13,16 @@ margin: 0 auto; } -#photo-photo-end { - clear: both; -} - -#photo-album-end { - clear: both; - margin-bottom: 25px; -} - -#photos-upload-album { - width: 100%; -} - -#photos-upload-new-end, #photos-upload-exist-end { - clear: both; -} -#photos-upload-exist-end { - margin-bottom: 15px; -} - -#photos-upload-select-files-text { - margin-top: 15px; - margin-bottom: 15px; -} - -#photo-edit-caption-label, #photo-edit-tags-label, #photo-edit-albumname-label, #photo-edit-rotate-label { - float: left; - width: 150px; -} - -#photo-edit-perms-end { - margin-bottom: 15px; -} - -#photo-edit-caption, #photo-edit-newtag, #photo-edit-albumname, #photo-edit-rotate { - float: left; - margin-bottom: 25px; -} -#photo-edit-link-wrap { - margin-bottom: 15px; -} - -#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end, #photo-edit-rotate-end, #photos-upload-perms-end, #photos-upload-noshare-end{ - clear: both; - margin-bottom: 10px; -} - -#photo-edit-rotate-end { - margin-bottom: 15px; -} - - -#photo-edit-edit, +#photo-edit, #photo-album-edit-wrapper, #photo-upload-form { display: none; } -#photo-album-edit-submit, #photo-album-edit-drop { - margin-top: 15px; - margin-bottom: 15px; -} - #photos-usage-message { line-height: 22px; } +#photos-upload-choose { + padding: 2px 12px; +} diff --git a/view/tpl/album_edit.tpl b/view/tpl/album_edit.tpl index a6815352a..f5495f149 100755 --- a/view/tpl/album_edit.tpl +++ b/view/tpl/album_edit.tpl @@ -1,22 +1,22 @@
-
- - - - - - {{foreach $albums as $al}} - {{if $al.text}} - - -
+ +
+ + + + {{foreach $albums as $al}} + {{if $al.text}} + +
+
+ + +
+
+
+
- - - - -
diff --git a/view/tpl/photo_album.tpl b/view/tpl/photo_album.tpl index 7b1566a15..7175a62da 100755 --- a/view/tpl/photo_album.tpl +++ b/view/tpl/photo_album.tpl @@ -1,13 +1,16 @@
-
- {{if $album_edit.1}} - - {{/if}} - - {{if $can_post}} - - {{/if}} +
+ +
+ {{if $album_edit.1}} + + {{/if}} + {{if $can_post}} + + {{/if}} +
+

{{$album}}

diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl index d1b077f36..37aab3c96 100755 --- a/view/tpl/photo_view.tpl +++ b/view/tpl/photo_view.tpl @@ -2,28 +2,28 @@
+
-
- {{if $prevlink}} - - {{/if}} - {{if $nextlink}} - - {{/if}} -
-

{{if $desc}}{{$desc}}{{elseif $filename}}{{$filename}}{{else}}{{$unknown}}{{/if}}

@@ -31,55 +31,54 @@
-
+
- - - {{if $edit.albums}} - - {{foreach $edit.albums as $al}} - {{if $al.text}} -