1
0
Fork 0

Merge pull request #8171 from MrPetovan/task/profile-fixes

Various profile fixes
This commit is contained in:
Philipp 2020-01-26 00:05:46 +01:00 committed by GitHub
commit 8035f795ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 66 additions and 88 deletions

View file

@ -148,7 +148,6 @@ class Index extends BaseModule
$basic_fields += self::buildField('homepage', DI::l10n()->t('Homepage:'), HTML::toLink($a->profile['homepage'])); $basic_fields += self::buildField('homepage', DI::l10n()->t('Homepage:'), HTML::toLink($a->profile['homepage']));
} }
$o .= Profile::getTabs($a, 'profile', $is_owner, $a->profile['nickname']);
if ( if (
$a->profile['address'] $a->profile['address']
|| $a->profile['locality'] || $a->profile['locality']

View file

@ -42,8 +42,8 @@ class Status extends BaseModule
$dtFormat = DI::dtFormat(); $dtFormat = DI::dtFormat();
if ($args->getArgc() > 2) { if ($args->getArgc() > 3) {
for ($x = 2; $x < $args->getArgc(); $x++) { for ($x = 3; $x < $args->getArgc(); $x++) {
if ($dtFormat->isYearMonth($args->get($x))) { if ($dtFormat->isYearMonth($args->get($x))) {
if ($datequery) { if ($datequery) {
$datequery2 = Strings::escapeHtml($args->get($x)); $datequery2 = Strings::escapeHtml($args->get($x));

View file

@ -28,97 +28,76 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
{{/if}} {{/if}}
<dl id="{{$basic_fields.fullname.id}}" class="row {{$basic_fields.fullname.class|default:'aprofile'}}">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.fullname.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.fullname.value}}</dd>
</dl>
{{* Frio does split the profile information in "standard" and "advanced". This is the tab menu for switching between this modes *}} {{if $basic_fields.membersince}}
{{if count($custom_fields)}} <dl id="aprofile-membersince" class="row {{$basic_fields.membersince.class|default:'aprofile'}}">
<ul id="profile-menu" class="nav nav-tabs" role="tablist"> <hr class="profile-separator">
<li role="presentation" class="active"> <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.membersince.label}}</dt>
<a href="{{$query_string}}#profile-content-standard" aria-controls="profile-content-standard" role="tab" data-toggle="tab">{{$basic}}</a> <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.membersince.value}}</dd>
</li> </dl>
<li role="presentation"> {{/if}}
<a href="{{$query_string}}#profile-content-advanced" aria-controls="profile-content-advanced" role="tab" data-toggle="tab">{{$advanced}}</a>
</li>
</ul>
{{/if}}
<div class="tab-content"> {{if $basic_fields.birthday}}
<div role="tabpanel" class="tab-pane active" id="profile-content-standard"> <dl id="aprofile-birthday" class="row {{$basic_fields.birthday.class|default:'aprofile'}}">
<dl id="{{$basic_fields.fullname.id}}" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.fullname.class|default:'aprofile'}}"> <hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.fullname.label}}</dt> <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.birthday.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.fullname.value}}</dd> <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.birthday.value}}</dd>
</dl> </dl>
{{/if}}
{{if $basic_fields.membersince}} {{if $basic_fields.age}}
<dl id="aprofile-membersince" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.membersince.class|default:'aprofile'}}"> <dl id="aprofile-age" class="row {{$basic_fields.age.class|default:'aprofile'}}">
<hr class="profile-separator"> <hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.membersince.label}}</dt> <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.age.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.membersince.value}}</dd> <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.age.value}}</dd>
</dl> </dl>
{{/if}} {{/if}}
{{if $basic_fields.birthday}} {{if $basic_fields.location}}
<dl id="aprofile-birthday" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.birthday.class|default:'aprofile'}}"> <dl id="aprofile-location" class="row {{$basic_fields.location.class|default:'aprofile'}}">
<hr class="profile-separator"> <hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.birthday.label}}</dt> <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.location.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.birthday.value}}</dd> <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.location.value}}</dd>
</dl> </dl>
{{/if}} {{/if}}
{{if $basic_fields.age}} {{if $basic_fields.homepage}}
<dl id="aprofile-age" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.age.class|default:'aprofile'}}"> <dl id="aprofile-homepage" class="row {{$basic_fields.homepage.class|default:'aprofile'}}">
<hr class="profile-separator"> <hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.age.label}}</dt> <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.homepage.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.age.value}}</dd> <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.homepage.value nofilter}}</dd>
</dl> </dl>
{{/if}} {{/if}}
{{if $basic_fields.location}} {{if $basic_fields.xmpp}}
<dl id="aprofile-location" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.location.class|default:'aprofile'}}"> <dl id="aprofile-xmpp" class="row {{$basic_fields.xmpp.class|default:'aprofile'}}">
<hr class="profile-separator"> <hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.location.label}}</dt> <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.xmpp.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.location.value}}</dd> <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.xmpp.value nofilter}}</dd>
</dl> </dl>
{{/if}} {{/if}}
{{if $basic_fields.homepage}} {{if $basic_fields.pub_keywords}}
<dl id="aprofile-homepage" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.homepage.class|default:'aprofile'}}"> <dl id="aprofile-tags" class="row {{$basic_fields.pub_keywords.class|default:'aprofile'}}">
<hr class="profile-separator"> <hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.homepage.label}}</dt> <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.pub_keywords.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.homepage.value nofilter}}</dd> <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">
</dl> {{foreach $basic_fields.pub_keywords.value as $tag}}
{{/if}} <a href="{{$tag.url}}" class="tag label btn-info sm">{{$tag.label}} <i class="fa fa-bolt" aria-hidden="true"></i></a>
{{/foreach}}
</dd>
</dl>
{{/if}}
{{if $basic_fields.xmpp}} {{foreach $custom_fields as $custom_field}}
<dl id="aprofile-xmpp" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.xmpp.class|default:'aprofile'}}"> <dl id="{{$custom_field.id}}" class="row {{$custom_field.class|default:'aprofile'}}">
<hr class="profile-separator"> <hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.xmpp.label}}</dt> <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$custom_field.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.xmpp.value nofilter}}</dd> <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$custom_field.value nofilter}}</dd>
</dl> </dl>
{{/if}} {{/foreach}}
{{if $basic_fields.pub_keywords}}
<dl id="aprofile-tags" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.pub_keywords.class|default:'aprofile'}}">
<hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.pub_keywords.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">
{{foreach $basic_fields.pub_keywords.value as $tag}}
<a href="{{$tag.url}}" class="tag label btn-info sm">{{$tag.label}} <i class="fa fa-bolt" aria-hidden="true"></i></a>
{{/foreach}}
</dd>
</dl>
{{/if}}
</div>
{{if count($custom_fields)}}
<div role="tabpanel" class="tab-pane advanced" id="profile-content-advanced">
{{foreach $custom_fields as $custom_field}}
<dl id="{{$custom_field.id}}" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$custom_field.class|default:'aprofile'}}">
<hr class="profile-separator">
<dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$custom_field.label}}</dt>
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$custom_field.value nofilter}}</dd>
</dl>
{{/foreach}}
</div>
{{/if}}
</div>
</div> </div>