Replace advanced profile display with custom profile fields
- Merge all profile/advanced.tpl theme templates into profile/index.tpl - Remove obsolete Model\Profile::getAdvanced method
This commit is contained in:
parent
3297d5c3e6
commit
d475cb5028
15 changed files with 392 additions and 799 deletions
|
@ -1,184 +0,0 @@
|
|||
|
||||
{{include file="section_title.tpl"}}
|
||||
|
||||
<dl id="aprofile-fullname" class="aprofile">
|
||||
<dt>{{$profile.fullname.0}}</dt>
|
||||
<dd>{{$profile.fullname.1}}</dd>
|
||||
</dl>
|
||||
|
||||
{{if $profile.membersince}}
|
||||
<dl id="aprofile-membersince" class="aprofile">
|
||||
<dt>{{$profile.membersince.0}}</dt>
|
||||
<dd>{{$profile.membersince.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.gender}}
|
||||
<dl id="aprofile-gender" class="aprofile">
|
||||
<dt>{{$profile.gender.0}}</dt>
|
||||
<dd>{{$profile.gender.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.birthday}}
|
||||
<dl id="aprofile-birthday" class="aprofile">
|
||||
<dt>{{$profile.birthday.0}}</dt>
|
||||
<dd>{{$profile.birthday.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.age}}
|
||||
<dl id="aprofile-age" class="aprofile">
|
||||
<dt>{{$profile.age.0}}</dt>
|
||||
<dd>{{$profile.age.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.marital}}
|
||||
<dl id="aprofile-marital" class="aprofile">
|
||||
<dt><span class="heart">♥</span> {{$profile.marital.0}}</dt>
|
||||
<dd>{{$profile.marital.1}}{{if $profile.marital.with}} ({{$profile.marital.with nofilter}}){{/if}}{{if $profile.howlong}} {{$profile.howlong}}{{/if}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.sexual}}
|
||||
<dl id="aprofile-sexual" class="aprofile">
|
||||
<dt>{{$profile.sexual.0}}</dt>
|
||||
<dd>{{$profile.sexual.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.pub_keywords}}
|
||||
<dl id="aprofile-tags" class="aprofile">
|
||||
<dt>{{$profile.pub_keywords.0}}</dt>
|
||||
<dd>{{$profile.pub_keywords.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.homepage}}
|
||||
<dl id="aprofile-homepage" class="aprofile">
|
||||
<dt>{{$profile.homepage.0}}</dt>
|
||||
<dd>{{$profile.homepage.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.hometown}}
|
||||
<dl id="aprofile-hometown" class="aprofile">
|
||||
<dt>{{$profile.hometown.0}}</dt>
|
||||
<dd>{{$profile.hometown.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.politic}}
|
||||
<dl id="aprofile-politic" class="aprofile">
|
||||
<dt>{{$profile.politic.0}}</dt>
|
||||
<dd>{{$profile.politic.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.religion}}
|
||||
<dl id="aprofile-religion" class="aprofile">
|
||||
<dt>{{$profile.religion.0}}</dt>
|
||||
<dd>{{$profile.religion.1}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.about}}
|
||||
<dl id="aprofile-about" class="aprofile">
|
||||
<dt>{{$profile.about.0}}</dt>
|
||||
<dd>{{$profile.about.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.interest}}
|
||||
<dl id="aprofile-interest" class="aprofile">
|
||||
<dt>{{$profile.interest.0}}</dt>
|
||||
<dd>{{$profile.interest.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.likes}}
|
||||
<dl id="aprofile-likes" class="aprofile">
|
||||
<dt>{{$profile.likes.0}}</dt>
|
||||
<dd>{{$profile.likes.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.dislikes}}
|
||||
<dl id="aprofile-dislikes" class="aprofile">
|
||||
<dt>{{$profile.dislikes.0}}</dt>
|
||||
<dd>{{$profile.dislikes.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.contact}}
|
||||
<dl id="aprofile-contact" class="aprofile">
|
||||
<dt>{{$profile.contact.0}}</dt>
|
||||
<dd>{{$profile.contact.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.music}}
|
||||
<dl id="aprofile-music" class="aprofile">
|
||||
<dt>{{$profile.music.0}}</dt>
|
||||
<dd>{{$profile.music.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.book}}
|
||||
<dl id="aprofile-book" class="aprofile">
|
||||
<dt>{{$profile.book.0}}</dt>
|
||||
<dd>{{$profile.book.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.tv}}
|
||||
<dl id="aprofile-tv" class="aprofile">
|
||||
<dt>{{$profile.tv.0}}</dt>
|
||||
<dd>{{$profile.tv.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.film}}
|
||||
<dl id="aprofile-film" class="aprofile">
|
||||
<dt>{{$profile.film.0}}</dt>
|
||||
<dd>{{$profile.film.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.romance}}
|
||||
<dl id="aprofile-romance" class="aprofile">
|
||||
<dt>{{$profile.romance.0}}</dt>
|
||||
<dd>{{$profile.romance.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.work}}
|
||||
<dl id="aprofile-work" class="aprofile">
|
||||
<dt>{{$profile.work.0}}</dt>
|
||||
<dd>{{$profile.work.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $profile.education}}
|
||||
<dl id="aprofile-education" class="aprofile">
|
||||
<dt>{{$profile.education.0}}</dt>
|
||||
<dd>{{$profile.education.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if $profile.forumlist}}
|
||||
<dl id="aprofile-forumlist" class="aprofile">
|
||||
<dt>{{$profile.forumlist.0}}</dt>
|
||||
<dd>{{$profile.forumlist.1 nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
|
124
view/templates/profile/index.tpl
Normal file
124
view/templates/profile/index.tpl
Normal file
|
@ -0,0 +1,124 @@
|
|||
<div id="profile-page" class="generic-page-wrapper">
|
||||
{{include file="section_title.tpl"}}
|
||||
|
||||
{{* The link to edit the profile*}}
|
||||
{{if $is_owner}}
|
||||
<div id="profile-edit-links">
|
||||
<ul class="nav nav-pills preferences">
|
||||
<li class="pull-right">
|
||||
<a class="btn btn-link btn-sm" type="button" id="profile-edit-link" href="{{$edit_link.url}}" title="{{$edit_link.title}}">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i> {{$edit_link.label}}
|
||||
</a>
|
||||
</li>
|
||||
{{if count($view_as_contacts)}}
|
||||
<li class="pull-right">
|
||||
<form action="{{$query_string}}" method="get">
|
||||
<button type="submit" class="btn btn-sm">{{$view_as}}</button>
|
||||
<select name="viewas" class="input-sm">
|
||||
<option value="0">Yourself</option>
|
||||
{{foreach $view_as_contacts as $contact}}
|
||||
<option value="{{$contact.id}}"{{if $contact.id == $view_as_contact_id}} selected{{/if}}>{{$contact.name}}</option>
|
||||
{{/foreach}}
|
||||
</select>
|
||||
|
||||
</form>
|
||||
</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{* Frio does split the profile information in "standard" and "advanced". This is the tab menu for switching between this modes *}}
|
||||
{{if count($custom_fields)}}
|
||||
<ul id="profile-menu" class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="{{$query_string}}#profile-content-standard" aria-controls="profile-content-standard" role="tab" data-toggle="tab">{{$basic}}</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<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">
|
||||
<div role="tabpanel" class="tab-pane active" id="profile-content-standard">
|
||||
<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'}}">
|
||||
<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>
|
||||
|
||||
{{if $basic_fields.membersince}}
|
||||
<dl id="aprofile-membersince" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.membersince.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.membersince.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.membersince.value}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.birthday}}
|
||||
<dl id="aprofile-birthday" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.birthday.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.birthday.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.birthday.value}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.age}}
|
||||
<dl id="aprofile-age" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.age.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.age.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.age.value}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.location}}
|
||||
<dl id="aprofile-location" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.location.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.location.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.location.value}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.homepage}}
|
||||
<dl id="aprofile-homepage" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.homepage.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.homepage.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.homepage.value nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{if $basic_fields.xmpp}}
|
||||
<dl id="aprofile-xmpp" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.xmpp.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.xmpp.label}}</dt>
|
||||
<dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.xmpp.value nofilter}}</dd>
|
||||
</dl>
|
||||
{{/if}}
|
||||
|
||||
{{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>
|
Loading…
Add table
Add a link
Reference in a new issue