]> git.mxchange.org Git - friendica.git/commitdiff
manage-selector: some cleanup and css work
authorrabuzarus <>
Sun, 25 Oct 2015 15:49:45 +0000 (16:49 +0100)
committerrabuzarus <>
Sun, 25 Oct 2015 15:49:45 +0000 (16:49 +0100)
mod/manage.php
view/global.css
view/templates/manage.tpl
view/theme/frost-mobile/style.css
view/theme/frost/style.css

index 236a3fb0541c7a9357951290ce03ecb146e73e82..3f553dfa6b19d363946552526b51f4db3ad89a97 100644 (file)
@@ -99,16 +99,17 @@ function manage_content(&$a) {
 
        $identities = $a->identities;
 
-       //getting profile pics for delegates
+       //getting additinal information for each identity
        foreach ($identities as $key=>$id) {
-               $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (network = 'dfrn' OR self = 1)",
+               $thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (`network` = '%s' OR `self` = 1)",
                        intval($a->user['uid']),
                        dbesc($id['username']),
-                       dbesc($id['nickname'])
+                       dbesc($id['nickname']),
+                       dbesc(NETWORK_DFRN)
                        );
                $identities[$key][thumb] = $thumb[0][thumb];
 
-               $identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? ' selected="selected" ' : '');
+               $identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? true : false);
        }
 
        $o = replace_macros(get_markup_template('manage.tpl'), array(
index c2f5840039234e37c08101e9698d3e6e1961376e..d1c07d60aaef5f0b474887922f68fe795c54bd68 100644 (file)
@@ -212,3 +212,48 @@ a {
   clip: rect(0,0,0,0);
   border: 0;
 }
+
+.itentity-match-wrapper {
+  float: left;
+  padding: 10px;
+  width: 120px;
+  height: 140px;
+  margin-bottom: 20px;
+}
+
+.identity-match-photo {
+  float: left;
+  text-align: center;
+  width: 120px;
+}
+
+.identity-match-name {
+  text-align: center;
+}
+
+.identity-match-details {
+  float: left;
+  text-align: center;
+  width: 120px;
+  overflow: hidden;
+  font-size: 10px;
+  font-weight: 500;
+  color: #999999;
+}
+
+.identity-match-break, .identity-match-end {
+  clear: both;
+}
+
+.identity-match-photo button {
+  border: none;
+  padding: 0;
+  margin: 0;
+  background: none;
+  height: 80px;
+  width: 80px;
+}
+
+.selected-identity img {
+  border: 2px solid #ff0000;
+}
\ No newline at end of file
index d82ddb6d73a8f8219ed9884d0325b69f746e1fd2..8a7922d7be3149c357858fdbb13b236ee3ab7fd0 100644 (file)
@@ -2,32 +2,29 @@
 <h3>{{$title}}</h3>
 <div id="identity-manage-desc">{{$desc}}</div>
 <div id="identity-manage-choose">{{$choose}}</div>
-{{*<div id="identity-selector-wrapper">
-       <form action="manage" method="post" >
-       <select name="identity" size="10" onchange="this.form.submit();" >
-
-       {{foreach $identities as $id}}
-               <option {{$id.selected}} value="{{$id.uid}}">{{$id.username}} ({{$id.nickname}})</option>
-       {{/foreach}}
-
-       </select>
-       <div id="identity-select-break"></div>
-
-       
-       </form>
-</div>*}}
 
 <div id="identity-selector-wrapper">
        <form action="manage" method="post" >
-       
 
        {{foreach $identities as $id}}
-               <button  name="identity" value="{{$id.uid}}" onclick="this.form.submit();" class="id-selection-photo-link" title="{{$id.username}}"><img class="channel-photo" src="{{$id.thumb}}" alt="{{$id.username}}" /></button>
+               <div class="itentity-match-wrapper {{if $id.selected}}selected-identity{{/if}}" id="identity-match-{{$id.uid}}">
+                       <div class="identity-match-photo" id="identity-match-photo-{{$id.uid}}">
+                               <button name="identity" value="{{$id.uid}}" onclick="this.form.submit();" title="{{$id.username}}">
+                                       <img src="{{$id.thumb}}" alt="{{$id.username}}" />
+                               </button>
+                       </div>
+
+                       <div class="identity-match-break"></div>
+
+                       <div class="identity-match-desc">
+                               <div class="identity-match-name" id="identity-match-name-{{$id.uid}}">{{$id.username}}</div>
+                               <div class="identity-match-details" id="identity-match-nick-{{$id.uid}}">({{$id.nickname}})</div>
+                       </div>
+
+                       <div class="identity-match-end"></div>
+               </div>
        {{/foreach}}
 
-
-
-       {{*<!--<input id="identity-submit" type="submit" name="submit" value="{{$submit}}" />-->*}}
        </form>
 </div>
        
index f4b46fed84519e42135f58c62c9c9c4e4e66b98f..7d47c0b9873f0b71a1ffbc4059552c90a94ee2bd 100644 (file)
@@ -3234,17 +3234,49 @@ aside input[type='text'] {
        margin: 10px;\r
 }\r
 \r
-#identity-manage-desc {\r
-       margin-top:15px;\r
-       margin-bottom: 15px;\r
+.itentity-match-wrapper {\r
+       float: left;\r
+       padding: 10px;\r
+       width: 120px;\r
+       height: 140px;\r
+       margin-bottom: 20px;\r
 }\r
 \r
-#identity-manage-choose {\r
-       margin-bottom: 15px;\r
+.identity-match-photo {\r
+       float: left;\r
+       text-align: center;\r
+       width: 120px;\r
 }\r
 \r
-#identity-submit {\r
-       margin-top: 20px;\r
+.identity-match-name {\r
+       text-align: center;\r
+}\r
+\r
+.identity-match-details {\r
+       float: left;\r
+       text-align: center;\r
+       width: 120px;\r
+       overflow: hidden;\r
+       font-size: 10px;\r
+       font-weight: 500;\r
+       color: #999999;\r
+}\r
+\r
+.identity-match-break, .identity-match-end {\r
+       clear: both;\r
+}\r
+\r
+.identity-match-photo button {\r
+       border: none;\r
+       padding: 0;\r
+       margin: 0;\r
+       background: none;\r
+       height: 80px;\r
+       width: 80px;\r
+}\r
+\r
+.selected-identity img {\r
+       border: 2px solid #ff0000;\r
 }\r
 \r
 #photo-nav {\r
index 8b87c3bd42549e5f9a40350b04ce96fa1b69a2e4..5f3ea646ecff11a7a1c2d2e7b998f4dfc47ae890 100644 (file)
@@ -3006,17 +3006,49 @@ aside input[type='text'] {
        margin: 10px;
 }
 
-#identity-manage-desc {
-       margin-top:15px;
-       margin-bottom: 15px;
+.itentity-match-wrapper {
+       float: left;
+       padding: 10px;
+       width: 120px;
+       height: 140px;
+       margin-bottom: 20px;
 }
 
-#identity-manage-choose {
-       margin-bottom: 15px;
+.identity-match-photo {
+       float: left;
+       text-align: center;
+       width: 120px;
 }
 
-#identity-submit {
-       margin-top: 20px;
+.identity-match-name {
+       text-align: center;
+}
+
+.identity-match-details {
+       float: left;
+       text-align: center;
+       width: 120px;
+       overflow: hidden;
+       font-size: 10px;
+       font-weight: 500;
+       color: #999999;
+}
+
+.identity-match-break, .identity-match-end {
+       clear: both;
+}
+
+.identity-match-photo button {
+       border: none;
+       padding: 0;
+       margin: 0;
+       background: none;
+       height: 80px;
+       width: 80px;
+}
+
+.selected-identity img {
+       border: 2px solid #ff0000;
 }
 
 #photo-prev-link, #photo-next-link {