Merge https://github.com/friendica/red into pending_merge
This commit is contained in:
commit
1eacea4037
@ -134,7 +134,10 @@ function dob($dob) {
|
|||||||
if(! $f)
|
if(! $f)
|
||||||
$f = 'ymd';
|
$f = 'ymd';
|
||||||
|
|
||||||
$o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),mktime(0,0,0,$month,$day,$year),'dob');
|
if ($dob && $dob != '0000-00-00')
|
||||||
|
$o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),mktime(0,0,0,$month,$day,$year),'dob');
|
||||||
|
else
|
||||||
|
$o = datesel($f,mktime(0,0,0,0,0,1900),mktime(),false,'dob');
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
@ -476,11 +476,9 @@ function photos_content(&$a) {
|
|||||||
if(argc() > 3) {
|
if(argc() > 3) {
|
||||||
$datatype = argv(2);
|
$datatype = argv(2);
|
||||||
$datum = argv(3);
|
$datum = argv(3);
|
||||||
}
|
} else {
|
||||||
elseif((argc() > 2) && (argv(2) === 'upload'))
|
|
||||||
$datatype = 'upload';
|
|
||||||
else
|
|
||||||
$datatype = 'summary';
|
$datatype = 'summary';
|
||||||
|
}
|
||||||
|
|
||||||
if(argc() > 4)
|
if(argc() > 4)
|
||||||
$cmd = argv(4);
|
$cmd = argv(4);
|
||||||
@ -528,11 +526,7 @@ function photos_content(&$a) {
|
|||||||
* Display upload form
|
* Display upload form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if($datatype === 'upload') {
|
if( $can_post) {
|
||||||
if(! ($can_post)) {
|
|
||||||
notice( t('Permission denied.'));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$uploader = '';
|
$uploader = '';
|
||||||
|
|
||||||
@ -540,12 +534,8 @@ function photos_content(&$a) {
|
|||||||
'addon_text' => $uploader,
|
'addon_text' => $uploader,
|
||||||
'default_upload' => true);
|
'default_upload' => true);
|
||||||
|
|
||||||
|
|
||||||
call_hooks('photo_upload_form',$ret);
|
call_hooks('photo_upload_form',$ret);
|
||||||
|
|
||||||
$default_upload = '<input id="photos-upload-choose" type="file" name="userfile" /> <div class="photos-upload-submit-wrapper" >
|
|
||||||
<input type="submit" name="submit" value="' . t('Submit') . '" id="photos-upload-submit" /> </div>';
|
|
||||||
|
|
||||||
/* Show space usage */
|
/* Show space usage */
|
||||||
|
|
||||||
$r = q("select sum(size) as total from photo where aid = %d and scale = 0 ",
|
$r = q("select sum(size) as total from photo where aid = %d and scale = 0 ",
|
||||||
@ -579,24 +569,25 @@ function photos_content(&$a) {
|
|||||||
$albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer']));
|
$albums = ((array_key_exists('albums', $a->data)) ? $a->data['albums'] : photos_albums_list($a->data['channel'],$a->data['observer']));
|
||||||
|
|
||||||
$tpl = get_markup_template('photos_upload.tpl');
|
$tpl = get_markup_template('photos_upload.tpl');
|
||||||
$o .= replace_macros($tpl,array(
|
$upload_form = replace_macros($tpl,array(
|
||||||
'$pagename' => t('Upload Photos'),
|
'$pagename' => t('Upload Photos'),
|
||||||
'$sessid' => session_id(),
|
'$sessid' => session_id(),
|
||||||
'$usage' => $usage_message,
|
'$usage' => $usage_message,
|
||||||
'$nickname' => $a->data['channel']['channel_address'],
|
'$nickname' => $a->data['channel']['channel_address'],
|
||||||
'$newalbum' => t('Enter a new album name or select an existing one:'),
|
'$newalbum_label' => t('Enter a new album name'),
|
||||||
|
'$newalbum_placeholder' => t('or select an existing one (doubleclick)'),
|
||||||
'$nosharetext' => t('Do not show a status post for this upload'),
|
'$nosharetext' => t('Do not show a status post for this upload'),
|
||||||
'$albums' => $albums['albums'],
|
'$albums' => $albums['albums'],
|
||||||
'$selname' => $selname,
|
'$selname' => $selname,
|
||||||
'$permissions' => t('Permissions'),
|
'$permissions' => t('Permissions'),
|
||||||
'$aclselect' => $aclselect_e,
|
'$aclselect' => $aclselect_e,
|
||||||
'$uploader' => $ret['addon_text'],
|
'$uploader' => $ret['addon_text'],
|
||||||
'$default' => (($ret['default_upload']) ? $default_upload : ''),
|
'$default' => (($ret['default_upload']) ? true : false),
|
||||||
'$uploadurl' => $ret['post_url']
|
'$uploadurl' => $ret['post_url'],
|
||||||
|
'$submit' => t('Submit')
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
return $o;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -727,7 +718,8 @@ function photos_content(&$a) {
|
|||||||
'$can_post' => $can_post,
|
'$can_post' => $can_post,
|
||||||
'$upload' => array(t('Upload'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/upload/' . bin2hex($album)),
|
'$upload' => array(t('Upload'), $a->get_baseurl() . '/photos/' . $a->data['channel']['channel_address'] . '/upload/' . bin2hex($album)),
|
||||||
'$order' => $order,
|
'$order' => $order,
|
||||||
|
'$upload_form' => $upload_form,
|
||||||
|
'$usage' => $usage_message
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1236,6 +1228,8 @@ function photos_content(&$a) {
|
|||||||
'$can_post' => $can_post,
|
'$can_post' => $can_post,
|
||||||
'$upload' => array(t('Upload'), $a->get_baseurl().'/photos/'.$a->data['channel']['channel_address'].'/upload'),
|
'$upload' => array(t('Upload'), $a->get_baseurl().'/photos/'.$a->data['channel']['channel_address'].'/upload'),
|
||||||
'$photos' => $photos,
|
'$photos' => $photos,
|
||||||
|
'$upload_form' => $upload_form,
|
||||||
|
'$usage' => $usage_message
|
||||||
));
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,24 +22,16 @@
|
|||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photos-upload-noshare {
|
#photos-upload-album {
|
||||||
margin-bottom: 10px;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photos-upload-spacer,
|
|
||||||
#photos-upload-new-end {
|
|
||||||
margin-top: 25px;
|
|
||||||
}
|
|
||||||
#photos-upload-new-end, #photos-upload-exist-end {
|
#photos-upload-new-end, #photos-upload-exist-end {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
#photos-upload-exist-end {
|
#photos-upload-exist-end {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
#photos-upload-submit {
|
|
||||||
margin-top: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#photos-upload-select-files-text {
|
#photos-upload-select-files-text {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
@ -63,8 +55,9 @@
|
|||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photo-edit-caption-end, #photo-edit-tags-end, #photo-edit-albumname-end, #photo-edit-rotate-end {
|
#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;
|
clear: both;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photo-edit-rotate-end {
|
#photo-edit-rotate-end {
|
||||||
@ -73,10 +66,9 @@
|
|||||||
|
|
||||||
|
|
||||||
#photo-edit-edit,
|
#photo-edit-edit,
|
||||||
#photo-album-edit-wrapper {
|
#photo-album-edit-wrapper,
|
||||||
|
#photo-upload-form {
|
||||||
display: none;
|
display: none;
|
||||||
padding: 7px 10px;
|
|
||||||
margin-bottom: 3px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#photo-album-edit-submit, #photo-album-edit-drop {
|
#photo-album-edit-submit, #photo-album-edit-drop {
|
||||||
|
@ -26,9 +26,6 @@
|
|||||||
/* search */
|
/* search */
|
||||||
|
|
||||||
#search-text {
|
#search-text {
|
||||||
border: 1px solid #ccc;
|
|
||||||
padding: 5px;
|
|
||||||
line-height: 1.5;
|
|
||||||
border-top-right-radius: 0px;
|
border-top-right-radius: 0px;
|
||||||
border-bottom-right-radius: 0px;
|
border-bottom-right-radius: 0px;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ html {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: arial,freesans,sans-serif;
|
font-family: sans-serif, arial, freesans;
|
||||||
font-size: $body_font_size;
|
font-size: $body_font_size;
|
||||||
background-color: $bgcolour;
|
background-color: $bgcolour;
|
||||||
background-image: url('$background_image');
|
background-image: url('$background_image');
|
||||||
@ -37,7 +37,7 @@ h5, .h5, h6, .h6 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.jslider {
|
.jslider {
|
||||||
font-family: arial,freesans,sans-serif;
|
font-family: sans-serif, arial, freesans;
|
||||||
}
|
}
|
||||||
|
|
||||||
abbr {
|
abbr {
|
||||||
@ -84,17 +84,19 @@ a.btn-success {
|
|||||||
input[type="text"],
|
input[type="text"],
|
||||||
input[type="password"],
|
input[type="password"],
|
||||||
input[type="submit"],
|
input[type="submit"],
|
||||||
|
input[type="file"],
|
||||||
select,
|
select,
|
||||||
textarea {
|
textarea {
|
||||||
font-family: arial,freesans,sans-serif;
|
font-family: sans-serif, arial, freesans;
|
||||||
font-size: $body_font_size;
|
font-size: $body_font_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
padding: 5px;
|
||||||
|
line-height: 1.5;
|
||||||
border: 1px solid $input_border;
|
border: 1px solid $input_border;
|
||||||
-moz-border-radius: $radiuspx;
|
-moz-border-radius: $radiuspx;
|
||||||
border-radius: $radiuspx;
|
border-radius: $radiuspx;
|
||||||
padding: 3px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="submit"] {
|
input[type="submit"] {
|
||||||
@ -704,9 +706,7 @@ footer {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#photo-album-edit-wrapper,
|
#photo-view-wrapper {
|
||||||
#photo-view-wrapper,
|
|
||||||
#photo-edit-edit {
|
|
||||||
background-color: $item_colour;
|
background-color: $item_colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2333,12 +2333,10 @@ aside .nav-pills > li > a {
|
|||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-title-submenu {
|
.section-content-tools-wrapper {
|
||||||
margin-top: 10px;
|
padding: 7px 10px;
|
||||||
}
|
background-color: $comment_item_colour;
|
||||||
|
margin-bottom: 3px;
|
||||||
.section-title-submenu a {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-content-wrapper {
|
.section-content-wrapper {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div id="photo-album-edit-wrapper">
|
<div id="photo-album-edit-wrapper" class="section-content-tools-wrapper">
|
||||||
<form name="photo-album-edit-form" id="photo-album-edit-form" action="photos/{{$nickname}}/album/{{$hexalbum}}" method="post" >
|
<form name="photo-album-edit-form" id="photo-album-edit-form" action="photos/{{$nickname}}/album/{{$hexalbum}}" method="post" >
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,13 +5,14 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
<a class="btn btn-default" href="{{$order.1}}" title="{{$order.0}}"><i class="icon-sort"></i></a>
|
<a class="btn btn-default" href="{{$order.1}}" title="{{$order.0}}"><i class="icon-sort"></i></a>
|
||||||
{{if $can_post}}
|
{{if $can_post}}
|
||||||
<a class="btn btn-xs btn-success" href="{{$upload.1}}"><i class="icon-upload"></i> {{$upload.0}}</a>
|
<button class="btn btn-xs btn-success" title="{{$usage}}" onclick="openClose('photo-upload-form');"><i class="icon-upload"></i> {{$upload.0}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<h2>{{$album}}</h2>
|
<h2>{{$album}}</h2>
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
{{$upload_form}}
|
||||||
{{$album_edit.1}}
|
{{$album_edit.1}}
|
||||||
<div id="photo-album-contents" class="generic-content-wrapper">
|
<div id="photo-album-contents" class="generic-content-wrapper">
|
||||||
{{foreach $photos as $photo}}
|
{{foreach $photos as $photo}}
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
<div id="side-bar-photos-albums" class="widget">
|
<div id="side-bar-photos-albums" class="widget">
|
||||||
<h3>{{$title}}</h3>
|
<h3>{{$title}}</h3>
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<ul class="nav nav-pills nav-stacked">
|
||||||
{{if $upload}}
|
|
||||||
<li><a href="{{$baseurl}}/photos/{{$nick}}/upload" title="{{$upload}}">{{$upload}}</a></li>
|
|
||||||
{{/if}}
|
|
||||||
<li><a href="{{$baseurl}}/photos/{{$nick}}" title="{{$title}}" >Recent Photos</a></li>
|
<li><a href="{{$baseurl}}/photos/{{$nick}}" title="{{$title}}" >Recent Photos</a></li>
|
||||||
{{if $albums}}
|
{{if $albums}}
|
||||||
{{foreach $albums as $al}}
|
{{foreach $albums as $al}}
|
||||||
{{if $al.text}}
|
{{if $al.text}}
|
||||||
<li><a href="{{$baseurl}}/photos/{{$nick}}/album/{{$al.bin2hex}}"><span class="badge pull-right">{{$al.total}}</span>{{$al.text}}</a></li>
|
<li><a href="{{$baseurl}}/photos/{{$nick}}/album/{{$al.bin2hex}}"><span class="badge pull-right">{{$al.total}}</span>{{$al.text}}</a></li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="photo-edit-edit">
|
<div id="photo-edit-edit" class="section-content-tools-wrapper">
|
||||||
<form action="photos/{{$edit.nickname}}/{{$edit.resource_id}}" method="post" id="photo_edit_form">
|
<form action="photos/{{$edit.nickname}}/{{$edit.resource_id}}" method="post" id="photo_edit_form">
|
||||||
<input type="hidden" name="item_id" value="{{$edit.item_id}}" />
|
<input type="hidden" name="item_id" value="{{$edit.item_id}}" />
|
||||||
<label id="photo-edit-albumname-label" for="photo-edit-albumname">{{$edit.newalbum}}</label>
|
<label id="photo-edit-albumname-label" for="photo-edit-albumname">{{$edit.newalbum}}</label>
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
{{if $can_post}}
|
{{if $can_post}}
|
||||||
<a class="btn btn-xs btn-success pull-right" href="{{$upload.1}}"><i class="icon-upload"></i> {{$upload.0}}</a>
|
<button class="btn btn-xs btn-success pull-right" title="{{$usage}}" onclick="openClose('photo-upload-form');"><i class="icon-upload"></i> {{$upload.0}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<h2>{{$title}}</h2>
|
<h2>{{$title}}</h2>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
{{$upload_form}}
|
||||||
<div id="photo-album-contents" class="generic-content-wrapper">
|
<div id="photo-album-contents" class="generic-content-wrapper">
|
||||||
{{foreach $photos as $photo}}
|
{{foreach $photos as $photo}}
|
||||||
{{include file="photo_top.tpl"}}
|
{{include file="photo_top.tpl"}}
|
||||||
|
@ -1,18 +1,12 @@
|
|||||||
<div class="generic-content-wrapper">
|
<div id="photo-upload-form" class="generic-content-wrapper">
|
||||||
<div class="section-title-wrapper">
|
<div class="section-content-tools-wrapper">
|
||||||
<div id="photos-usage-message" class="pull-right">{{$usage}}</div>
|
|
||||||
<h2>{{$pagename}}</h2>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="section-content-wrapper">
|
|
||||||
<form action="photos/{{$nickname}}" enctype="multipart/form-data" method="post" name="photos-upload-form" id="photos-upload-form">
|
<form action="photos/{{$nickname}}" enctype="multipart/form-data" method="post" name="photos-upload-form" id="photos-upload-form">
|
||||||
<input type="hidden" id="photos-upload-source" name="source" value="photos" />
|
<input type="hidden" id="photos-upload-source" name="source" value="photos" />
|
||||||
<div id="photos-album-name-label" >
|
|
||||||
<label id="photos-upload-newalbum-text" for="photos-upload-newalbum">{{$newalbum}}</label>
|
|
||||||
</div>
|
<div class="form-group">
|
||||||
<div id="photos-album-name-input">
|
<label for="photos-upload-album">{{$newalbum_label}}</label>
|
||||||
<input id="photos-upload-newalbum" type="text" value="{{$selname}}" name="newalbum" list="dl-photo-upload" />
|
<input type="text" class="form-control" id="photos-upload-album" name="newalbum" placeholder="{{$newalbum_placeholder}}" value="{{$selname}}" list="dl-photo-upload">
|
||||||
<datalist id="dl-photo-upload">
|
<datalist id="dl-photo-upload">
|
||||||
{{foreach $albums as $al}}
|
{{foreach $albums as $al}}
|
||||||
{{if $al.text}}
|
{{if $al.text}}
|
||||||
@ -22,27 +16,38 @@
|
|||||||
</datalist>
|
</datalist>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{$aclselect}}
|
||||||
|
|
||||||
|
{{if $default}}
|
||||||
|
<div class="form-group pull-left">
|
||||||
|
<input id="photos-upload-choose" type="file" name="userfile" />
|
||||||
|
</div>
|
||||||
|
<div class="btn-group pull-right">
|
||||||
|
<button class="btn btn-default btn-sm" data-toggle="modal" data-target="#aclModal" onclick="return false;">
|
||||||
|
<i id="jot-perms-icon" class="icon-{{$lockstate}} jot-icons"></i>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary btn-sm" type="submit" name="submit" id="photos-upload-submit">{{$submit}}</button>
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div id="photos-upload-new-end"></div>
|
<div id="photos-upload-new-end"></div>
|
||||||
|
|
||||||
<div id="photos-upload-noshare-div" class="photos-upload-noshare-div" >
|
<div class="form-group" id="photos-upload-noshare">
|
||||||
<input id="photos-upload-noshare" type="checkbox" name="not_visible" value="1" />
|
<label id="photos-upload-noshare-text" for="photos-upload-noshare" >
|
||||||
<label id="photos-upload-noshare-text" for="photos-upload-noshare" >{{$nosharetext}}</label>
|
<input id="photos-upload-noshare" type="checkbox" name="not_visible" value="1" /> {{$nosharetext}}
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{if $uploader}}
|
||||||
|
<div id="photos-upload-noshare-end"></div>
|
||||||
<div id="photos-upload-perms" class="photos-upload-perms" >
|
<div id="photos-upload-perms" class="photos-upload-perms" >
|
||||||
<span id="jot-perms-icon" class="icon-{{$lockstate}}" ></span>
|
<span id="jot-perms-icon" class="icon-{{$lockstate}}" ></span>
|
||||||
<button class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" onclick="return false;">{{$permissions}}</button>
|
<button class="btn btn-default btn-xs" data-toggle="modal" data-target="#aclModal" onclick="return false;">{{$permissions}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{$aclselect}}
|
|
||||||
|
|
||||||
<div id="photos-upload-perms-end"></div>
|
<div id="photos-upload-perms-end"></div>
|
||||||
|
|
||||||
<div id="photos-upload-spacer"></div>
|
|
||||||
|
|
||||||
{{$uploader}}
|
{{$uploader}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{$default}}
|
|
||||||
|
|
||||||
<div class="photos-upload-end" ></div>
|
<div class="photos-upload-end" ></div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
view/tpl/smarty3
|
|
||||||
|
|
||||||
This directory must exist and be writeable by the webserver in order to store compiled template files, which are created dynamically. Please see the installation instructions.
|
|
||||||
|
|
Reference in New Issue
Block a user