Merge pull request #565 from fermionic/20121227-eliminate-template-dashes
remove more dashes in templates
This commit is contained in:
commit
98c86d46d4
|
@ -710,6 +710,16 @@ function admin_page_users(&$a){
|
|||
$users = array_map("_setup_users", $users);
|
||||
|
||||
|
||||
// Get rid of dashes in key names, Smarty3 can't handle them
|
||||
foreach($users as $key => $user) {
|
||||
$new_user = array();
|
||||
foreach($user as $k => $v) {
|
||||
$k = str_replace('-','_',$k);
|
||||
$new_user[$k] = $v;
|
||||
}
|
||||
$users[$key] = $new_user;
|
||||
}
|
||||
|
||||
$t = get_markup_template("admin_users.tpl");
|
||||
$o = replace_macros($t, array(
|
||||
// strings //
|
||||
|
|
|
@ -341,6 +341,17 @@ function events_content(&$a) {
|
|||
// $tpl = get_markup_template("events.tpl");
|
||||
// }
|
||||
}
|
||||
|
||||
// Get rid of dashes in key names, Smarty3 can't handle them
|
||||
foreach($events as $key => $event) {
|
||||
$event_item = array();
|
||||
foreach($event['item'] as $k => $v) {
|
||||
$k = str_replace('-','_',$k);
|
||||
$event_item[$k] = $v;
|
||||
}
|
||||
$events[$key]['item'] = $event_item;
|
||||
}
|
||||
|
||||
$o = replace_macros($tpl, array(
|
||||
'$baseurl' => $a->get_baseurl(),
|
||||
'$tabs' => $tabs,
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<td class='register_date'>$u.register_date</td>
|
||||
<td class='login_date'>$u.login_date</td>
|
||||
<td class='lastitem_date'>$u.lastitem_date</td>
|
||||
<td class='login_date'>$u.page-flags {{ if $u.is_admin }}($siteadmin){{ endif }}</td>
|
||||
<td class='login_date'>$u.page_flags {{ if $u.is_admin }}($siteadmin){{ endif }}</td>
|
||||
<td class="checkbox">
|
||||
{{ if $u.is_admin }}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{ for $events as $event }}
|
||||
<div class="event">
|
||||
|
||||
{{ if $event.item.author-name }}<a href="$event.item.author-link" ><img src="$event.item.author-avatar" height="32" width="32" />$event.item.author-name</a>{{ endif }}
|
||||
{{ if $event.item.author_name }}<a href="$event.item.author_link" ><img src="$event.item.author_avatar" height="32" width="32" />$event.item.author_name</a>{{ endif }}
|
||||
$event.html
|
||||
{{ if $event.item.plink }}<a href="$event.plink.0" title="$event.plink.1" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{ endif }}
|
||||
{{ if $event.edit }}<a href="$event.edit.0" title="$event.edit.1" class="edit-event-link icon s22 pencil"></a>{{ endif }}
|
||||
|
|
|
@ -14,7 +14,7 @@ $tabs
|
|||
{{ for $events as $event }}
|
||||
<div class="event">
|
||||
{{ if $event.is_first }}<hr /><a name="link-$event.j" ><div class="event-list-date">$event.d</div></a>{{ endif }}
|
||||
{{ if $event.item.author-name }}<a href="$event.item.author-link" ><img src="$event.item.author-avatar" height="32" width="32" />$event.item.author-name</a>{{ endif }}
|
||||
{{ if $event.item.author_name }}<a href="$event.item.author_link" ><img src="$event.item.author_avatar" height="32" width="32" />$event.item.author_name</a>{{ endif }}
|
||||
$event.html
|
||||
{{ if $event.item.plink }}<a href="$event.plink.0" title="$event.plink.1" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{ endif }}
|
||||
{{ if $event.edit }}<a href="$event.edit.0" title="$event.edit.1" class="edit-event-link icon s22 pencil"></a>{{ endif }}
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<td class='register_date'>{{$u.register_date}}</td>
|
||||
<td class='login_date'>{{$u.login_date}}</td>
|
||||
<td class='lastitem_date'>{{$u.lastitem_date}}</td>
|
||||
<td class='login_date'>{{$u.page-flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}}</td>
|
||||
<td class='login_date'>{{$u.page_flags}} {{if $u.is_admin}}({{$siteadmin}}){{/if}}</td>
|
||||
<td class="checkbox">
|
||||
{{if $u.is_admin}}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{{foreach $events as $event}}
|
||||
<div class="event">
|
||||
|
||||
{{if $event.item.author-name}}<a href="{{$event.item.author-link}}" ><img src="{{$event.item.author-avatar}}" height="32" width="32" />{{$event.item.author-name}}</a>{{/if}}
|
||||
{{if $event.item.author_name}}<a href="{{$event.item.author_link}}" ><img src="{{$event.item.author_avatar}}" height="32" width="32" />{{$event.item.author_name}}</a>{{/if}}
|
||||
{{$event.html}}
|
||||
{{if $event.item.plink}}<a href="{{$event.plink.0}}" title="{{$event.plink.1}}" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{/if}}
|
||||
{{if $event.edit}}<a href="{{$event.edit.0}}" title="{{$event.edit.1}}" class="edit-event-link icon s22 pencil"></a>{{/if}}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{{foreach $events as $event}}
|
||||
<div class="event">
|
||||
{{if $event.is_first}}<hr /><a name="link-{{$event.j}}" ><div class="event-list-date">{{$event.d}}</div></a>{{/if}}
|
||||
{{if $event.item.author-name}}<a href="{{$event.item.author-link}}" ><img src="{{$event.item.author-avatar}}" height="32" width="32" />{{$event.item.author-name}}</a>{{/if}}
|
||||
{{if $event.item.author_name}}<a href="{{$event.item.author_link}}" ><img src="{{$event.item.author_avatar}}" height="32" width="32" />{{$event.item.author_name}}</a>{{/if}}
|
||||
{{$event.html}}
|
||||
{{if $event.item.plink}}<a href="{{$event.plink.0}}" title="{{$event.plink.1}}" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{/if}}
|
||||
{{if $event.edit}}<a href="{{$event.edit.0}}" title="{{$event.edit.1}}" class="edit-event-link icon s22 pencil"></a>{{/if}}
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<td class='register_date'>$u.register_date</td>
|
||||
<td class='login_date'>$u.login_date</td>
|
||||
<td class='lastitem_date'>$u.lastitem_date</td>
|
||||
<td class='login_date'>$u.page-flags</td>
|
||||
<td class='login_date'>$u.page_flags</td>
|
||||
<td class="checkbox"><input type="checkbox" class="users_ckbx" id="id_user_$u.uid" name="user[]" value="$u.uid"/></td>
|
||||
<td class="tools" style="width:60px;">
|
||||
<a href="$baseurl/admin/users/block/$u.uid?t=$form_security_token" title='{{ if $u.blocked }}$unblock{{ else }}$block{{ endif }}'><span class='icon block {{ if $u.blocked==0 }}dim{{ endif }}'></span></a>
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<td class='register_date'>{{$u.register_date}}</td>
|
||||
<td class='login_date'>{{$u.login_date}}</td>
|
||||
<td class='lastitem_date'>{{$u.lastitem_date}}</td>
|
||||
<td class='login_date'>{{$u.page-flags}}</td>
|
||||
<td class='login_date'>{{$u.page_flags}}</td>
|
||||
<td class="checkbox"><input type="checkbox" class="users_ckbx" id="id_user_{{$u.uid}}" name="user[]" value="{{$u.uid}}"/></td>
|
||||
<td class="tools" style="width:60px;">
|
||||
<a href="{{$baseurl}}/admin/users/block/{{$u.uid}}?t={{$form_security_token}}" title='{{if $u.blocked}}{{$unblock}}{{else}}{{$block}}{{/if}}'><span class='icon block {{if $u.blocked==0}}dim{{/if}}'></span></a>
|
||||
|
|
Loading…
Reference in a new issue