summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/controller/angeltypes_controller.php18
-rw-r--r--includes/view/User_view.php6
-rw-r--r--public/js/moment-countdown.js0
-rw-r--r--templates/layout.html9
-rw-r--r--themes/theme1.scss1
5 files changed, 21 insertions, 13 deletions
diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php
index ba0d65d9..93c0e6bf 100644
--- a/includes/controller/angeltypes_controller.php
+++ b/includes/controller/angeltypes_controller.php
@@ -201,25 +201,31 @@ function angeltypes_list_controller() {
foreach ($angeltypes as &$angeltype) {
$actions = array(
- '<a class="view" href="' . page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'] . '">' . _("view") . '</a>'
+ button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'],_("view"),"btn-xs")
+ //'<a class="view btn btn-default" href="' . page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'] . '">' . _("view") . '</a>'
);
if (in_array('admin_angel_types', $privileges)) {
- $actions[] = '<a class="edit" href="' . page_link_to('angeltypes') . '&action=edit&angeltype_id=' . $angeltype['id'] . '">' . _("edit") . '</a>';
- $actions[] = '<a class="delete" href="' . page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'] . '">' . _("delete") . '</a>';
+ $actions[] = button(page_link_to('angeltypes') . '&action=edit&angeltype_id=' . $angeltype['id'], _("edit"), "btn-xs");
+ $actions[] = button(page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'], _("delete"), "btn-xs");
+
+ //$actions[] = '<a class="edit" href="' . page_link_to('angeltypes') . '&action=edit&angeltype_id=' . $angeltype['id'] . '">' . _("edit") . '</a>';
+ //$actions[] = '<a class="delete" href="' . page_link_to('angeltypes') . '&action=delete&angeltype_id=' . $angeltype['id'] . '">' . _("delete") . '</a>';
}
$angeltype['membership'] = AngelType_render_membership($angeltype);
if ($angeltype['user_angeltype_id'] != null) {
- $actions[] = '<a class="cancel" href="' . page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $angeltype['user_angeltype_id'] . '">' . _("leave") . '</a>';
+ //$actions[] = '<a class="cancel" href="' . page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $angeltype['user_angeltype_id'] . '">' . _("leave") . '</a>';
+ $actions[] = button(page_link_to('user_angeltypes') . '&action=delete&user_angeltype_id=' . $angeltype['user_angeltype_id'], _("leave"), "btn-xs");
} else {
- $actions[] = '<a class="add" href="' . page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'] . '">' . _("join") . '</a>';
+ $actions[] = button(page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], _("join"), "btn-xs");
+ //$actions[] = '<a class="add" href="' . page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'] . '">' . _("join") . '</a>';
}
$angeltype['restricted'] = $angeltype['restricted'] ? '<img src="pic/icons/lock.png" alt="' . _("Restricted") . '" title="' . _("Restricted") . '">' : '';
$angeltype['name'] = '<a href="' . page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'] . '">' . $angeltype['name'] . '</a>';
- $angeltype['actions'] = join(" ", $actions);
+ $angeltype['actions'] = buttons($actions);
}
return array(
diff --git a/includes/view/User_view.php b/includes/view/User_view.php
index baa02591..1824a1c4 100644
--- a/includes/view/User_view.php
+++ b/includes/view/User_view.php
@@ -23,11 +23,11 @@ function User_shift_mode_render($shift_mode) {
if ($shift_mode == 0)
return '<span class="text-success">' . _("Free") . '</span>';
if ($shift_mode > 8 * 3600)
- return '<span class="text-success">' . sprintf(_("Next shift in %s min"), floor($shift_mode / 60)) . '</span>';
+ return '<span class="text-success moment-countdown" data-seconds="' . $shift_mode . '">' . _("Next shift in") . '</span>';
if ($shift_mode > 0)
- return '<span class="text-warning">' . sprintf(_("Next shift in %s min"), floor($shift_mode / 60)) . '</span>';
+ return '<span class="text-warning moment-countdown" data-seconds="' . $shift_mode . '">' . _("Next shift in") . '</span>';
if ($shift_mode < 0)
- return '<span class="text-danger">' . sprintf(_("Current ends in %s min"), floor($shift_mode / 60)) . '</span>';
+ return '<span class="text-danger moment-countdown" data-seconds="' . $shift_mode . '">' . _("Current shift ends in") . '</span>';
}
function User_view($user_source, $admin_user_privilege, $freeloader, $user_shift_mode, $user_angeltypes, $user_groups, $shifts, $its_me) {
diff --git a/public/js/moment-countdown.js b/public/js/moment-countdown.js
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/js/moment-countdown.js
diff --git a/templates/layout.html b/templates/layout.html
index 50cafb42..7b1aa541 100644
--- a/templates/layout.html
+++ b/templates/layout.html
@@ -10,10 +10,6 @@
<meta http-equiv="expires" content="0" />
<meta name="robots" content="index" />
<meta name="revisit-after" content="1 days" />
-<script type="text/javascript" src="vendor/jquery-2.1.1.min.js"></script>
-<script type="text/javascript" src="vendor/bootstrap-3.2.0/js/bootstrap.min.js"></script>
-<script type="text/javascript" src="js/forms.js"></script>
-<script type="text/javascript" src="js/moment-with-locales.min.js"></script>
<link rel="stylesheet" type="text/css" href="vendor/bootstrap-3.2.0/css/theme%theme%.css" />
<link rel="stylesheet" type="text/css" href="vendor/icomoon/style.css" />
%atom_link%
@@ -39,6 +35,11 @@
</div>
</div>
</div>
+ <script type="text/javascript" src="vendor/jquery-2.1.1.min.js"></script>
+ <script type="text/javascript" src="vendor/bootstrap-3.2.0/js/bootstrap.min.js"></script>
+ <script type="text/javascript" src="js/forms.js"></script>
+ <script type="text/javascript" src="js/moment-with-locales.min.js"></script>
+ <script type="text/javascript" src="js/moment-countdown.js"></script>
<script type="text/javascript">
$(function() {
moment.locale("%locale%");
diff --git a/themes/theme1.scss b/themes/theme1.scss
index 7db3bb3b..2cd2519b 100644
--- a/themes/theme1.scss
+++ b/themes/theme1.scss
@@ -167,6 +167,7 @@ $btn-font-weight: normal;
$btn-default-color: #fff;
$btn-default-bg: lighten($gray-dark, 10%);
+
$btn-default-border: darken($btn-default-bg, 10%);
$btn-primary-color: $btn-default-color;