aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-03-26 18:43:38 +0100
committerMario Vavti <mario@mariovavti.com>2016-03-26 18:43:38 +0100
commita50706317435d09cacb95cad0a6ccaf8ae5b5f6c (patch)
treeb97b9ca3d74ddc1b70b390ec37f3eb132c742256 /view
parent0a14ac1f60b70fe038cf714ac1e856c2bc66a92d (diff)
downloadvolse-hubzilla-a50706317435d09cacb95cad0a6ccaf8ae5b5f6c.tar.gz
volse-hubzilla-a50706317435d09cacb95cad0a6ccaf8ae5b5f6c.tar.bz2
volse-hubzilla-a50706317435d09cacb95cad0a6ccaf8ae5b5f6c.zip
move link to /locs to settings menu if we have more than one location and some template work on locs
Diffstat (limited to 'view')
-rw-r--r--view/css/mod_locs.css33
-rw-r--r--view/pdl/mod_locs.pdl4
-rw-r--r--view/pdl/mod_uexport.pdl4
-rwxr-xr-xview/tpl/channel.tpl4
-rw-r--r--view/tpl/locmanage.tpl77
5 files changed, 79 insertions, 43 deletions
diff --git a/view/css/mod_locs.css b/view/css/mod_locs.css
index 95aee6aef..876da8970 100644
--- a/view/css/mod_locs.css
+++ b/view/css/mod_locs.css
@@ -1,3 +1,32 @@
-td {
-padding: 10px;
+#locs-index {
+ width: 100%;
+}
+
+#locs-index th:nth-child(1),
+#locs-index td:nth-child(1){
+ padding: 7px 3px 7px 10px;
+}
+
+#locs-index th:nth-child(3),
+#locs-index td:nth-child(3){
+ padding: 7px 3px;
+}
+
+#locs-index th:nth-child(4),
+#locs-index td:nth-child(4){
+ padding: 7px 10px 7px 7px;
+}
+
+.primehub,
+.drophub {
+ font-size: 1.2em;
+}
+
+.primehub:hover {
+ cursor: pointer;
+}
+
+.drophub:hover {
+ cursor: pointer;
+ color: red;
}
diff --git a/view/pdl/mod_locs.pdl b/view/pdl/mod_locs.pdl
new file mode 100644
index 000000000..0b0a99638
--- /dev/null
+++ b/view/pdl/mod_locs.pdl
@@ -0,0 +1,4 @@
+[region=aside]
+[widget=settings_menu][/widget]
+[/region]
+
diff --git a/view/pdl/mod_uexport.pdl b/view/pdl/mod_uexport.pdl
new file mode 100644
index 000000000..0b0a99638
--- /dev/null
+++ b/view/pdl/mod_uexport.pdl
@@ -0,0 +1,4 @@
+[region=aside]
+[widget=settings_menu][/widget]
+[/region]
+
diff --git a/view/tpl/channel.tpl b/view/tpl/channel.tpl
index 17713aef4..d306f0aa0 100755
--- a/view/tpl/channel.tpl
+++ b/view/tpl/channel.tpl
@@ -44,10 +44,6 @@
<i class="icon-user{{if $channel.intros != 0}} new-notification{{/if}}"></i>
{{if $channel.intros != 0}}<a href='manage/{{$channel.channel_id}}/connections/ifpending'>{{/if}}{{$channel.intros|string_format:$intros_format}}{{if $channel.intros != 0}}</a>{{/if}}
</div>
- <div class="channel-link">
- <i class="icon-map-marker"></i>
- <a href="manage/{{$channel.channel_id}}/locs">{{$locs}}</a>
- </div>
{{/if}}
</div>
</div>
diff --git a/view/tpl/locmanage.tpl b/view/tpl/locmanage.tpl
index c94cf60a7..95847d559 100644
--- a/view/tpl/locmanage.tpl
+++ b/view/tpl/locmanage.tpl
@@ -1,38 +1,41 @@
-<div class="generic-content-wrapper-styled">
-<h2>{{$header}}</h2>
-
-<script>
-function primehub(id) {
- $.post(baseurl + '/locs','primary='+id,function(data) { window.location.href=window.location.href; });
-}
-function drophub(id) {
- $.post(baseurl + '/locs','drop='+id,function(data) { window.location.href=window.location.href; });
-}
-</script>
-
-<div class="descriptive-text">{{$sync_text}}</div>
-<br />
-<div class="descriptive-text">{{$drop_text}}</div>
-<div class="descriptive-text">{{$last_resort}}</div>
-<br />
-
-
-
-
-<table>
-<tr><td>{{$loc}}</td><td>{{$mkprm}}</td><td>{{$drop}}</td></tr>
-{{foreach $hubs as $hub}}
-{{if ! $hub.deleted }}
-<tr><td>
-{{$hub.hubloc_url}} ({{$hub.hubloc_addr}})</td>
-<td>
-{{if $hub.primary}}<button class="btn btn-std"><i class="icon-check"></i></button>{{else}}<button class="btn btn-std" onclick="primehub({{$hub.hubloc_id}}); return false;" ><i class="icon-check-empty" ></i></button>{{/if}}
-</td>
-<td><button class="btn btn-std" onclick="drophub({{$hub.hubloc_id}}); return false;"><i class="icon-trash"></i></button></td>
-</tr>
-{{/if}}
-{{/foreach}}
-</table>
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ <script>
+ function primehub(id) {
+ $.post(baseurl + '/locs','primary='+id,function(data) { window.location.href=window.location.href; });
+ }
+ function drophub(id) {
+ $.post(baseurl + '/locs','drop='+id,function(data) { window.location.href=window.location.href; });
+ }
+ </script>
+ <button class="btn btn-success btn-xs pull-right" onclick="window.location.href='/locs/f=&sync=1'; return false;"><i class="icon-refresh"></i>&nbsp;{{$sync}}</button>
+ <h2>{{$header}}</h2>
+ </div>
+ <div class="section-content-wrapper-np">
+ <div class="section-content-warning-wrapper">
+ {{$sync_text}}
+ </div>
+ <div class="section-content-info-wrapper">
+ {{$drop_text}}<br>
+ {{$last_resort}}
+ </div>
+ <table id="locs-index">
+ <tr>
+ <th>{{$loc}}</th>
+ <th>{{$addr}}</th>
+ <th>{{$mkprm}}</th>
+ <th>{{$drop}}</th>
+ </tr>
+ {{foreach $hubs as $hub}}
+ {{if ! $hub.deleted }}
+ <tr>
+ <td>{{$hub.hubloc_url}}</td>
+ <td>{{$hub.hubloc_addr}}</td>
+ <td>{{if $hub.primary}}<i class="icon-check"></i>{{else}}<i class="icon-check-empty primehub" onclick="primehub({{$hub.hubloc_id}}); return false;"></i>{{/if}}</td>
+ <td><i class="icon-trash drophub" onclick="drophub({{$hub.hubloc_id}}); return false;"></i></td>
+ </tr>
+ {{/if}}
+ {{/foreach}}
+ </table>
+ </div>
</div>
-<div class="clear"></div>
-<button class="btn btn-std" onclick="window.location.href='/locs/f=&sync=1'; return false;">{{$sync}}</button>