Merge pull request #2802 from annando/xmpp-profile

New fields for the DFRN protocol (XMPP and Account Type)
This commit is contained in:
Tobias Diekershoff 2016-09-27 20:57:56 +02:00 committed by GitHub
commit 4aa834564a
28 changed files with 257 additions and 37 deletions

View file

@ -54,6 +54,7 @@
{{* Some information about the contact from the profile *}}
<dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl>
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
{{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}}
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
</div>{{* End of contact-edit-links *}}

View file

@ -1,5 +1,3 @@
<div class='field radio'>
<label for='id_{{$field.0}}_{{$field.2}}'>{{$field.1}}</label>
<input type="radio" name='{{$field.0}}' id='id_{{$field.0}}_{{$field.2}}' value="{{$field.2|escape:'html'}}" {{if $field.4}}checked="true"{{/if}} aria-describedby={{$field.0}}_tip'>

View file

@ -1,8 +1,26 @@
<h4>{{$account_types}}</h4>
{{include file="field_radio.tpl" field=$account_person}}
{{include file="field_radio.tpl" field=$account_organisation}}
{{include file="field_radio.tpl" field=$account_news}}
{{include file="field_radio.tpl" field=$account_community}}
<h4>{{$user}}</h4>
{{if $account_type == $type_person}}
<h5>{{$user}}</h5>
{{include file="field_radio.tpl" field=$page_normal}}
{{include file="field_radio.tpl" field=$page_soapbox}}
{{include file="field_radio.tpl" field=$page_freelove}}
<h4>{{$community}}</h4>
{{/if}}
{{if $account_type == $type_organisation}}
<input type='hidden' name='page-flags' value='1'>
{{/if}}
{{if $account_type == $type_news}}
<input type='hidden' name='page-flags' value='1'>
{{/if}}
{{if $account_type == $type_community}}
<h5>{{$community}}</h5>
{{include file="field_radio.tpl" field=$page_community}}
{{include file="field_radio.tpl" field=$page_prvgroup}}
{{/if}}

View file

@ -134,6 +134,13 @@
</div>
<div id="profile-edit-homepage-end"></div>
<div id="profile-edit-xmpp-wrapper" >
<label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
<input type="text" size="32" name="xmpp" id="profile-edit-xmpp" title="{{$lbl_ex2}}" value="{{$xmpp.2|escape:'html'}}" />
</div><div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
<div id="profile-edit-xmpp-end"></div>
<div id="profile-edit-politic-wrapper" >
<label id="profile-edit-politic-label" for="profile-edit-politic" >{{$politic.1}} </label>
<input type="text" size="32" name="politic" id="profile-edit-politic" value="{{$politic.2|escape:'html'}}" />
@ -352,6 +359,13 @@
</div>
<div id="profile-edit-homepage-end"></div>
<div id="profile-edit-xmpp-wrapper" >
<label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
<input type="text" size="32" name="xmpp" id="profile-edit-xmpp" title="{{$lbl_ex2}}" value="{{$xmpp.2|escape:'html'}}" />
</div><div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
<div id="profile-edit-xmpp-end"></div>
{{$hide_friends}}
<div id="profile-edit-address-wrapper" >

View file

@ -28,6 +28,13 @@
</dl>
{{/if}}
{{if $profile.xmpp}}
<dl class="xmpp">
<dt class="xmpp-label">{{$xmpp}}</dt>
<dd class="xmpp-data">{{$profile.xmpp}}</dd>
</dl>
{{/if}}
{{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
{{if $profile.pubkey}}<div class="key u-key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}

View file

@ -967,10 +967,14 @@ aside .vcard .p-addr {
white-space: nowrap;
padding-bottom: 2px;
}
aside .vcard .detail {
display: table;
padding: 5px 0;
}
aside .xmpp {
display: table;
}
aside .vcard .icon {
display: table-cell;
padding-right: 10px;

View file

@ -88,6 +88,14 @@
</div>
{{/if}}
{{if $xmpp}}
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<hr class="profile-separator">
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 text-muted">{{$xmpp_label}}</div>
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">{{$xmpp}}</div>
</div>
{{/if}}
{{if $keywords}}
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<hr class="profile-separator">

View file

@ -203,6 +203,8 @@
<div class="section-content-tools-wrapper">
{{include file="field_input.tpl" field=$homepage}}
{{include file="field_input.tpl" field=$xmpp}}
{{include file="field_input.tpl" field=$pub_keywords}}
{{include file="field_input.tpl" field=$prv_keywords}}
@ -268,6 +270,8 @@
{{include file="field_input.tpl" field=$homepage}}
{{include file="field_input.tpl" field=$xmpp}}
{{$hide_friends}}
{{include file="field_input.tpl" field=$address}}

View file

@ -87,6 +87,12 @@
</div>
{{/if}}
{{if $profile.xmpp}}
<div class="xmpp">
<span class="xmpp-label icon"><i class="fa fa-comments"></i></span>
<span class="xmpp-data">{{$profile.xmpp}}</span>
</div>
{{/if}}
{{if $gender}}
<div class="mf detail">

View file

@ -918,6 +918,7 @@ input#dfrn-url {
#profile-edit-religion-label,
#profile-edit-pubkeywords-label,
#profile-edit-prvkeywords-label,
#profile-edit-xmpp-label,
#profile-edit-homepage-label,
#profile-edit-hometown-label {
font-weight: 700;
@ -939,6 +940,7 @@ input#dfrn-url {
#sexual-select,
#profile-edit-politic,
#profile-edit-religion,
#profile-edit-xmpp,
#profile-edit-pubkeywords,
#profile-edit-prvkeywords,
#profile-in-dir-yes,
@ -952,6 +954,7 @@ input#dfrn-url {
float: left;
margin-bottom: 20px;
}
#profile-edit-xmpp,
#profile-edit-pubkeywords,
#profile-edit-prvkeywords {
margin-bottom: 5px;
@ -1024,6 +1027,7 @@ input#dfrn-url {
#profile-edit-pdesc-desc,
#profile-edit-xmpp-desc,
#profile-edit-pubkeywords-desc,
#profile-edit-prvkeywords-desc {
float: left;
@ -1039,7 +1043,8 @@ input#dfrn-url {
float: left;
margin-bottom: 35px;
}*/
#profile-edit-homepage, #profile-edit-hometown {
#profile-edit-homepage,
#profile-edit-hometown {
float: left;
margin-bottom: 25px;
}
@ -1082,6 +1087,7 @@ input#dfrn-url {
#profile-edit-pubkeywords-end,
#profile-edit-prvkeywords-end,
#profile-edit-homepage-end,
#profile-edit-xmpp-end,
#profile-edit-hometown-end,
#profile-in-dir-break,
#profile-in-dir-end,
@ -1897,6 +1903,7 @@ input#dfrn-url {
#advanced-profile-marital-wrapper,
#advanced-profile-sexual-wrapper,
#advanced-profile-homepage-wrapper,
#advanced-profile-xmpp-wrapper,
#advanced-profile-politic-wrapper,
#advanced-profile-religion-wrapper,
#advanced-profile-about-wrapper,
@ -1919,6 +1926,7 @@ input#dfrn-url {
#advanced-profile-marital-text,
#advanced-profile-sexual-text,
#advanced-profile-homepage-text,
#advanced-profile-xmpp-text,
#advanced-profile-politic-text,
#advanced-profile-religion-text,
#advanced-profile-about-text,
@ -1942,6 +1950,7 @@ input#dfrn-url {
#advanced-profile-marital-end,
#advanced-profile-sexual-end,
#advanced-profile-homepage-end,
#advanced-profile-xmpp-end,
#advanced-profile-politic-end,
#advanced-profile-religion-end {
height: 10px;
@ -1968,6 +1977,7 @@ input#dfrn-url {
#advanced-profile-marital,
#advanced-profile-sexual,
#advanced-profile-homepage,
#advanced-profile-xmpp,
#advanced-profile-politic,
#advanced-profile-religion {
float: left;
@ -2912,14 +2922,14 @@ aside input[type='text'] {
margin-bottom: 25px;
}
.location-label, .gender-label, .marital-label, .homepage-label, .network-label {
.location-label, .gender-label, .marital-label, .homepage-label, .ympp-label, .network-label, .xmpp-label {
float: left;
text-align: right;
display: block;
width: 65px;
}
.adr, .x-gender, .marital-text, .homepage-url, .x-network {
.adr, .x-gender, .marital-text, .homepage-url, .x-network, .xmpp-data {
float: left;
display: block;
margin-left: 8px;

View file

@ -131,6 +131,12 @@
</div>
<div id="profile-edit-homepage-end"></div>
<div id="profile-edit-xmpp-wrapper" >
<label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
<input type="text" size="28" name="xmpp" id="profile-edit-xmpp" title="{{$lbl_ex2}}" value="{{$xmpp.2}}" />
</div><div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
<div id="profile-edit-xmpp-end"></div>
<div id="profile-edit-politic-wrapper" >
<label id="profile-edit-politic-label" for="profile-edit-politic" >{{$politic.1}} </label>
<input type="text" size="28" name="politic" id="profile-edit-politic" value="{{$politic.2}}" />

View file

@ -26,6 +26,13 @@
</dl>
{{/if}}
{{if $profile.xmpp}}
<dl class="xmpp">
<dt class="xmpp-label">{{$xmpp}}</dt>
<dd class="xmpp-data">{{$profile.xmpp}}</dd>
</dl>
{{/if}}
{{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
{{if $profile.pubkey}}<div class="key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}

View file

@ -49,6 +49,13 @@
</dl>
{{/if}}
{{if $profile.xmpp}}
<dl class="xmpp">
<dt class="xmpp-label">{{$xmpp}}</dt>
<dd class="xmpp-data">{{$profile.xmpp}}</dd>
</dl>
{{/if}}
{{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
{{if $profile.pubkey}}<div class="key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}

View file

@ -54,6 +54,7 @@
{{* Some information about the contact from the profile *}}
<dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl>
{{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
{{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}}
{{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
{{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
</div>{{* End of contact-edit-links *}}

View file

@ -93,6 +93,13 @@
</div>
<div id="profile-edit-pdesc-end"></div>
<div id="profile-edit-xmpp-wrapper" >
<label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
<input type="text" size="32" name="xmpp" id="profile-edit-xmpp" value="{{$xmpp.2}}" />
</div>
<div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
<div id="profile-edit-xmpp-end"></div>
<div id="profile-edit-homepage-wrapper" >
<label id="profile-edit-homepage-label" for="profile-edit-homepage" >{{$homepage.1}} </label>
<input type="text" size="32" name="homepage" id="profile-edit-homepage" value="{{$homepage.2}}" />
@ -342,6 +349,13 @@
<div id="profile-edit-dob-end"></div>
{{/if}}
<div id="profile-edit-xmpp-wrapper" >
<label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
<input type="text" size="32" name="xmpp" id="profile-edit-xmpp" value="{{$xmpp.2}}" />
</div>
<div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
<div id="profile-edit-xmpp-end"></div>
<div id="profile-edit-homepage-wrapper" >
<label id="profile-edit-homepage-label" for="profile-edit-homepage" >{{$homepage.1}} </label>
<input type="text" size="32" name="homepage" id="profile-edit-homepage" value="{{$homepage.2}}" />

View file

@ -39,6 +39,13 @@
</dl>
{{/if}}
{{if $profile.xmpp}}
<dl class="xmpp">
<dt class="xmpp-label">{{$xmpp}}</dt>
<dd class="xmpp-data">{{$profile.xmpp}}</dd>
</dl>
{{/if}}
{{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
{{if $profile.pubkey}}<div class="key u-key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}