diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-04-21 23:08:54 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-04-21 23:08:54 +0200 |
commit | e58e8f3f75ce2119698fb59bda55a5fbea9dda2a (patch) | |
tree | 4e6bffce8ed8b1369d05c5a75327fea6a2ee68ba | |
parent | 21704ecb93e293f39d0228ae0d9765f37af8d99e (diff) | |
download | volse-hubzilla-e58e8f3f75ce2119698fb59bda55a5fbea9dda2a.tar.gz volse-hubzilla-e58e8f3f75ce2119698fb59bda55a5fbea9dda2a.tar.bz2 volse-hubzilla-e58e8f3f75ce2119698fb59bda55a5fbea9dda2a.zip |
bring lockstate to webpages
-rw-r--r-- | mod/webpages.php | 6 | ||||
-rw-r--r-- | view/css/mod_webpages.css | 8 | ||||
-rw-r--r-- | view/tpl/webpagelist.tpl | 3 |
3 files changed, 12 insertions, 5 deletions
diff --git a/mod/webpages.php b/mod/webpages.php index b303b8652..615969d78 100644 --- a/mod/webpages.php +++ b/mod/webpages.php @@ -142,6 +142,9 @@ function webpages_content(&$a) { $pages = array(); foreach($r as $rr) { unobscure($rr); + + $lockstate = (($rr['allow_cid'] || $rr['allow_gid'] || $rr['deny_cid'] || $rr['deny_gid']) ? 'lock' : 'unlock'); + $element_arr = array( 'type' => 'webpage', 'title' => $rr['title'], @@ -159,7 +162,8 @@ function webpages_content(&$a) { 'title' => $rr['title'], 'created' => datetime_convert('UTC',date_default_timezone_get(),$rr['created']), 'edited' => datetime_convert('UTC',date_default_timezone_get(),$rr['edited']), - 'bb_element' => '[element]' . base64url_encode(json_encode($element_arr)) . '[/element]' + 'bb_element' => '[element]' . base64url_encode(json_encode($element_arr)) . '[/element]', + 'lockstate' => $lockstate ); } } diff --git a/view/css/mod_webpages.css b/view/css/mod_webpages.css index 075b789b8..d88657c69 100644 --- a/view/css/mod_webpages.css +++ b/view/css/mod_webpages.css @@ -15,14 +15,14 @@ padding: 7px 3px 7px 10px; } -#webpage-list-table th:nth-child(6), -#webpage-list-table td:nth-child(6){ +#webpage-list-table th:nth-child(7), +#webpage-list-table td:nth-child(7){ padding: 7px 3px; white-space: nowrap; } -#webpage-list-table th:nth-child(7), -#webpage-list-table td:nth-child(7){ +#webpage-list-table th:nth-child(8), +#webpage-list-table td:nth-child(8){ padding: 7px 10px 7px 7px; white-space: nowrap; } diff --git a/view/tpl/webpagelist.tpl b/view/tpl/webpagelist.tpl index 2c79a496d..591dc8eb7 100644 --- a/view/tpl/webpagelist.tpl +++ b/view/tpl/webpagelist.tpl @@ -21,6 +21,7 @@ <th width="1%"></th> <th width="1%"></th> <th width="1%"></th> + <th width="1%"></th> <th width="1%" class="hidden-xs">{{$created_txt}}</th> <th width="1%" class="hidden-xs">{{$edited_txt}}</th> </tr> @@ -38,6 +39,8 @@ {{$item.title}} </td> <td class="webpage-list-tool"> + {{if $item.lockstate=='lock'}}<i class="icon-lock dropdown-toggle lockview" data-toggle="dropdown" onclick="lockview('item',{{$item.url}});" ></i><ul id="panel-{{$item.url}}" class="lockview-panel dropdown-menu"></ul>{{/if}} + <td class="webpage-list-tool"> {{if $edit}}<a href="{{$baseurl}}/{{$item.url}}" title="{{$edit}}"><i class="icon-pencil"></i></a>{{/if}} </td> <td class="webpage-list-tool"> |