]> git.mxchange.org Git - friendica.git/blob - view/templates/profile/index.tpl
Replace advanced profile display with custom profile fields
[friendica.git] / view / templates / profile / index.tpl
1 <div id="profile-page" class="generic-page-wrapper">
2     {{include file="section_title.tpl"}}
3
4     {{* The link to edit the profile*}}
5 {{if $is_owner}}
6         <div id="profile-edit-links">
7                 <ul class="nav nav-pills preferences">
8                         <li class="pull-right">
9                                 <a class="btn btn-link btn-sm" type="button" id="profile-edit-link" href="{{$edit_link.url}}" title="{{$edit_link.title}}">
10                                         <i class="fa fa-pencil-square-o" aria-hidden="true"></i>&nbsp;{{$edit_link.label}}
11                                 </a>
12                         </li>
13                 {{if count($view_as_contacts)}}
14                         <li class="pull-right">
15                                 <form action="{{$query_string}}" method="get">
16                                         <button type="submit" class="btn btn-sm">{{$view_as}}</button>
17                                         <select name="viewas" class="input-sm">
18                                                 <option value="0">Yourself</option>
19                                 {{foreach $view_as_contacts as $contact}}
20                                                 <option value="{{$contact.id}}"{{if $contact.id == $view_as_contact_id}} selected{{/if}}>{{$contact.name}}</option>
21                                 {{/foreach}}
22                                         </select>
23
24                                 </form>
25                         </li>
26                 {{/if}}
27                 </ul>
28                 <div class="clear"></div>
29         </div>
30 {{/if}}
31
32     {{* Frio does split the profile information in "standard" and "advanced". This is the tab menu for switching between this modes *}}
33     {{if count($custom_fields)}}
34                 <ul id="profile-menu" class="nav nav-tabs" role="tablist">
35                         <li role="presentation" class="active">
36                                 <a href="{{$query_string}}#profile-content-standard" aria-controls="profile-content-standard" role="tab" data-toggle="tab">{{$basic}}</a>
37                         </li>
38                         <li role="presentation">
39                                 <a href="{{$query_string}}#profile-content-advanced" aria-controls="profile-content-advanced" role="tab" data-toggle="tab">{{$advanced}}</a>
40                         </li>
41                 </ul>
42     {{/if}}
43
44         <div class="tab-content">
45                 <div role="tabpanel" class="tab-pane active" id="profile-content-standard">
46                         <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'}}">
47                                 <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.fullname.label}}</dt>
48                                 <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.fullname.value}}</dd>
49                         </dl>
50
51             {{if $basic_fields.membersince}}
52                                 <dl id="aprofile-membersince" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.membersince.class|default:'aprofile'}}">
53                                         <hr class="profile-separator">
54                                         <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.membersince.label}}</dt>
55                                         <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.membersince.value}}</dd>
56                                 </dl>
57             {{/if}}
58
59             {{if $basic_fields.birthday}}
60                                 <dl id="aprofile-birthday" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.birthday.class|default:'aprofile'}}">
61                                         <hr class="profile-separator">
62                                         <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.birthday.label}}</dt>
63                                         <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.birthday.value}}</dd>
64                                 </dl>
65             {{/if}}
66
67             {{if $basic_fields.age}}
68                                 <dl id="aprofile-age" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.age.class|default:'aprofile'}}">
69                                         <hr class="profile-separator">
70                                         <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.age.label}}</dt>
71                                         <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.age.value}}</dd>
72                                 </dl>
73             {{/if}}
74
75             {{if $basic_fields.location}}
76                                 <dl id="aprofile-location" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.location.class|default:'aprofile'}}">
77                                         <hr class="profile-separator">
78                                         <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.location.label}}</dt>
79                                         <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.location.value}}</dd>
80                                 </dl>
81             {{/if}}
82
83             {{if $basic_fields.homepage}}
84                                 <dl id="aprofile-homepage" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.homepage.class|default:'aprofile'}}">
85                                         <hr class="profile-separator">
86                                         <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.homepage.label}}</dt>
87                                         <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.homepage.value nofilter}}</dd>
88                                 </dl>
89             {{/if}}
90
91             {{if $basic_fields.xmpp}}
92                                 <dl id="aprofile-xmpp" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.xmpp.class|default:'aprofile'}}">
93                                         <hr class="profile-separator">
94                                         <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$basic_fields.xmpp.label}}</dt>
95                                         <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$basic_fields.xmpp.value nofilter}}</dd>
96                                 </dl>
97             {{/if}}
98
99             {{if $basic_fields.pub_keywords}}
100                                 <dl id="aprofile-tags" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$basic_fields.pub_keywords.class|default:'aprofile'}}">
101                                         <hr class="profile-separator">
102                                         <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>
103                                         <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">
104                         {{foreach $basic_fields.pub_keywords.value as $tag}}
105                                                         <a href="{{$tag.url}}" class="tag label btn-info sm">{{$tag.label}} <i class="fa fa-bolt" aria-hidden="true"></i></a>
106                         {{/foreach}}
107                                         </dd>
108                                 </dl>
109             {{/if}}
110                 </div>
111
112         {{if count($custom_fields)}}
113                         <div role="tabpanel" class="tab-pane advanced" id="profile-content-advanced">
114                 {{foreach $custom_fields as $custom_field}}
115                                         <dl id="{{$custom_field.id}}" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 {{$custom_field.class|default:'aprofile'}}">
116                                                 <hr class="profile-separator">
117                                                 <dt class="col-lg-4 col-md-4 col-sm-4 col-xs-12 profile-label-name text-muted">{{$custom_field.label}}</dt>
118                                                 <dd class="col-lg-8 col-md-8 col-sm-8 col-xs-12 profile-entry">{{$custom_field.value nofilter}}</dd>
119                                         </dl>
120                 {{/foreach}}
121                         </div>
122         {{/if}}
123         </div>
124 </div>