diff options
author | Philip Häusler <msquare@notrademark.de> | 2014-08-24 16:36:10 +0200 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2014-08-24 16:36:10 +0200 |
commit | 53a10de5cf9b97b3a5fb1bf0726eb697c13e5ce2 (patch) | |
tree | fa147541bf7111e2a416604ec4dbabde5a543749 /includes/view | |
parent | 3da1748e841a24e4e462f5a8212362270d74cf0b (diff) |
move json and ical export buttons
Diffstat (limited to 'includes/view')
-rw-r--r-- | includes/view/User_view.php | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 8077d0af..b71f99cf 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -134,8 +134,8 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel buttons(array( $admin_user_privilege ? button(page_link_to('admin_user') . '&id=' . $user_source['UID'], '<span class="glyphicon glyphicon-edit"></span> ' . _("edit")) : '', ! $user_source['Gekommen'] ? button(page_link_to('admin_arrive') . '&arrived=' . $user_source['UID'], _("arrived")) : '', - button(page_link_to_absolute('ical') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-calendar"></span> ' . _("iCal Export")), - button(page_link_to_absolute('shifts_json_export') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-export"></span> ' . _("JSON Export")) + $its_me ? button(page_link_to_absolute('ical') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-calendar"></span> ' . _("iCal Export")) : '', + $its_me ? button(page_link_to_absolute('shifts_json_export') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-export"></span> ' . _("JSON Export")) : '' )), ($its_me || $admin_user_privilege) ? '<h2>' . _("Shifts") . '</h2>' : '', ($its_me || $admin_user_privilege) ? table(array( @@ -146,13 +146,7 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel 'comment' => _("Comment"), 'actions' => _("Action") ), $myshifts_table) : '', - $its_me && count($shifts) == 0 ? error(sprintf(_("Go to the <a href=\"%s\">shifts table</a> to sign yourself up for some shifts."), page_link_to('user_shifts')), true) : '', - ($its_me || $admin_user_privilege) ? '<h2>' . _("Exports") . '</h2>' : '', - $its_me ? (sprintf(_("Export of shown shifts. <a href=\"%s\">iCal format</a> or <a href=\"%s\">JSON format</a> available (please keep secret, otherwise <a href=\"%s\">reset the api key</a>)."), page_link_to_absolute('ical') . '&key=' . $user_source['api_key'], page_link_to_absolute('shifts_json_export') . '&key=' . $user_source['api_key'], page_link_to('user_myshifts') . '&reset')) : '', - (! $its_me && $admin_user_privilege) ? buttons(array( - button(page_link_to_absolute('ical') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-calendar"></span> ' . _("iCal Export")), - button(page_link_to_absolute('shifts_json_export') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-export"></span> ' . _("JSON Export")) - )) : '' + $its_me && count($shifts) == 0 ? error(sprintf(_("Go to the <a href=\"%s\">shifts table</a> to sign yourself up for some shifts."), page_link_to('user_shifts')), true) : '' )); } |