mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Added timerboard feature
This commit is contained in:
parent
1ca376f71b
commit
d1244a97e3
@ -46,5 +46,6 @@ Special Permissions In Admin:
|
|||||||
auth | user | group_management ( Access to add members to groups within the alliance )
|
auth | user | group_management ( Access to add members to groups within the alliance )
|
||||||
auth | user | human_resources ( Corp only access to view applications )
|
auth | user | human_resources ( Corp only access to view applications )
|
||||||
auth | user | jabber_broadcast ( Access to broadcast a message over jabber to specific groups or all)
|
auth | user | jabber_broadcast ( Access to broadcast a message over jabber to specific groups or all)
|
||||||
auth | user | blue_memeber ( Auto Added to people who register has a blue when adding api key)
|
auth | user | blue_member ( Auto Added to people who register has a blue when adding api key)
|
||||||
auth | user | corp_stats (View basic corp auth stats *who is authed etc*)
|
auth | user | corp_stats (View basic corp auth stats *who is authed etc*)
|
||||||
|
auth | user | timer_management ( Access to create and remove timers)
|
||||||
|
@ -52,6 +52,7 @@ INSTALLED_APPS = (
|
|||||||
'eveonline',
|
'eveonline',
|
||||||
'groupmanagement',
|
'groupmanagement',
|
||||||
'hrapplications',
|
'hrapplications',
|
||||||
|
'timerboard',
|
||||||
)
|
)
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
MIDDLEWARE_CLASSES = (
|
||||||
|
6
alliance_auth/urls.py
Normal file → Executable file
6
alliance_auth/urls.py
Normal file → Executable file
@ -123,4 +123,8 @@ urlpatterns = patterns('',
|
|||||||
url(r'^tool/fleet_formatter_tool/$', 'services.views.fleet_formatter_view',
|
url(r'^tool/fleet_formatter_tool/$', 'services.views.fleet_formatter_view',
|
||||||
name='auth_fleet_format_tool_view'),
|
name='auth_fleet_format_tool_view'),
|
||||||
|
|
||||||
)
|
# Timer URLS
|
||||||
|
url(r'^timers/$', 'timerboard.views.timer_view', name='auth_timer_view'),
|
||||||
|
url(r'^add_timer/$', 'timerboard.views.add_timer_view', name='auth_add_timer_view'),
|
||||||
|
url(r'^remove_timer/(\w+)', 'timerboard.views.remove_timer', name='auth_remove_timer'),
|
||||||
|
)
|
496
static/css/jquery.datetimepicker.css
Executable file
496
static/css/jquery.datetimepicker.css
Executable file
@ -0,0 +1,496 @@
|
|||||||
|
.xdsoft_datetimepicker {
|
||||||
|
box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-bottom: 1px solid #BBBBBB;
|
||||||
|
border-left: 1px solid #CCCCCC;
|
||||||
|
border-right: 1px solid #CCCCCC;
|
||||||
|
border-top: 1px solid #CCCCCC;
|
||||||
|
color: #333333;
|
||||||
|
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
|
||||||
|
padding: 8px;
|
||||||
|
padding-left: 0;
|
||||||
|
padding-top: 2px;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 9999;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker iframe {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 75px;
|
||||||
|
height: 210px;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*For IE8 or lower*/
|
||||||
|
.xdsoft_datetimepicker button {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_noselect {
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-khtml-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
-o-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_noselect::selection {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_noselect::-moz-selection {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_inline {
|
||||||
|
display: inline-block;
|
||||||
|
position: static;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker * {
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_datepicker {
|
||||||
|
width: 224px;
|
||||||
|
float: left;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker {
|
||||||
|
width: 256px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker {
|
||||||
|
width: 58px;
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: 8px;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_datepicker.active + .xdsoft_timepicker {
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 3px
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_mounthpicker {
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label i,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_prev,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_next,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_today_button {
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label i {
|
||||||
|
opacity: 0.5;
|
||||||
|
background-position: -92px -19px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 9px;
|
||||||
|
height: 20px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_prev {
|
||||||
|
float: left;
|
||||||
|
background-position: -20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_today_button {
|
||||||
|
float: left;
|
||||||
|
background-position: -70px 0;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_next {
|
||||||
|
float: right;
|
||||||
|
background-position: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_next,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_prev,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_today_button {
|
||||||
|
background-color: transparent;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
border: 0 none currentColor;
|
||||||
|
cursor: pointer;
|
||||||
|
display: block;
|
||||||
|
height: 30px;
|
||||||
|
opacity: 0.5;
|
||||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
||||||
|
outline: medium none currentColor;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 0;
|
||||||
|
position: relative;
|
||||||
|
text-indent: 100%;
|
||||||
|
white-space: nowrap;
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next {
|
||||||
|
float: none;
|
||||||
|
background-position: -40px -15px;
|
||||||
|
height: 15px;
|
||||||
|
width: 30px;
|
||||||
|
display: block;
|
||||||
|
margin-left: 14px;
|
||||||
|
margin-top: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev {
|
||||||
|
background-position: -40px 0;
|
||||||
|
margin-bottom: 7px;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
|
||||||
|
height: 151px;
|
||||||
|
overflow: hidden;
|
||||||
|
border-bottom: 1px solid #DDDDDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div {
|
||||||
|
background: #F5F5F5;
|
||||||
|
border-top: 1px solid #DDDDDD;
|
||||||
|
color: #666666;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
border-collapse: collapse;
|
||||||
|
cursor: pointer;
|
||||||
|
border-bottom-width: 0;
|
||||||
|
height: 25px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div:first-child {
|
||||||
|
border-top-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_today_button:hover,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_next:hover,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_prev:hover {
|
||||||
|
opacity: 1;
|
||||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label {
|
||||||
|
display: inline;
|
||||||
|
position: relative;
|
||||||
|
z-index: 9999;
|
||||||
|
margin: 0;
|
||||||
|
padding: 5px 3px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: #fff;
|
||||||
|
float: left;
|
||||||
|
width: 182px;
|
||||||
|
text-align: center;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label:hover > span {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label:hover i {
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select {
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 30px;
|
||||||
|
z-index: 101;
|
||||||
|
display: none;
|
||||||
|
background: #fff;
|
||||||
|
max-height: 160px;
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect {
|
||||||
|
right: -7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect {
|
||||||
|
right: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
|
||||||
|
color: #fff;
|
||||||
|
background: #ff8000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option {
|
||||||
|
padding: 2px 10px 2px 5px;
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
|
||||||
|
background: #33AAFF;
|
||||||
|
box-shadow: #178FE5 0 1px 3px 0 inset;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_month {
|
||||||
|
width: 100px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_year {
|
||||||
|
width: 48px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td > div {
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar th {
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td, .xdsoft_datetimepicker .xdsoft_calendar th {
|
||||||
|
width: 14.2857142%;
|
||||||
|
background: #F5F5F5;
|
||||||
|
border: 1px solid #DDDDDD;
|
||||||
|
color: #666666;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: right;
|
||||||
|
vertical-align: middle;
|
||||||
|
padding: 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td, .xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th {
|
||||||
|
width: 12.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar th {
|
||||||
|
background: #F1F1F1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
|
||||||
|
color: #33AAFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
|
||||||
|
background: #33AAFF;
|
||||||
|
box-shadow: #178FE5 0 1px 3px 0 inset;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_time_box > div > div.xdsoft_disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
|
||||||
|
opacity: 0.2;
|
||||||
|
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td:hover,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
|
||||||
|
color: #fff !important;
|
||||||
|
background: #ff8000 !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
|
||||||
|
.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_disabled:hover {
|
||||||
|
color: inherit !important;
|
||||||
|
background: inherit !important;
|
||||||
|
box-shadow: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_calendar th {
|
||||||
|
font-weight: 700;
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_copyright {
|
||||||
|
color: #ccc !important;
|
||||||
|
font-size: 10px;
|
||||||
|
clear: both;
|
||||||
|
float: none;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_copyright a {
|
||||||
|
color: #eee !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker .xdsoft_copyright a:hover {
|
||||||
|
color: #aaa !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_time_box {
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_scrollbar > .xdsoft_scroller {
|
||||||
|
background: #ccc !important;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_scrollbar {
|
||||||
|
position: absolute;
|
||||||
|
width: 7px;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_scroller_box {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark {
|
||||||
|
box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
|
||||||
|
background: #000000;
|
||||||
|
border-bottom: 1px solid #444444;
|
||||||
|
border-left: 1px solid #333333;
|
||||||
|
border-right: 1px solid #333333;
|
||||||
|
border-top: 1px solid #333333;
|
||||||
|
color: #cccccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box {
|
||||||
|
border-bottom: 1px solid #222222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box > div > div {
|
||||||
|
background: #0a0a0a;
|
||||||
|
border-top: 1px solid #222222;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label {
|
||||||
|
background-color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select {
|
||||||
|
border: 1px solid #333;
|
||||||
|
background: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
|
||||||
|
color: #000;
|
||||||
|
background: #007fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
|
||||||
|
background: #cc5500;
|
||||||
|
box-shadow: #b03e00 0 1px 3px 0 inset;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button {
|
||||||
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
||||||
|
background: #0a0a0a;
|
||||||
|
border: 1px solid #222222;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
||||||
|
background: #0e0e0e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today {
|
||||||
|
color: #cc5500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
|
||||||
|
background: #cc5500;
|
||||||
|
box-shadow: #b03e00 0 1px 3px 0 inset;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
|
||||||
|
color: #000 !important;
|
||||||
|
background: #007fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright {
|
||||||
|
color: #333 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a {
|
||||||
|
color: #111 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover {
|
||||||
|
color: #555 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_dark .xdsoft_time_box {
|
||||||
|
border: 1px solid #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xdsoft_dark .xdsoft_scrollbar > .xdsoft_scroller {
|
||||||
|
background: #333 !important;
|
||||||
|
}
|
4
static/css/sb-admin-2.css
Normal file → Executable file
4
static/css/sb-admin-2.css
Normal file → Executable file
@ -11,11 +11,13 @@ body {
|
|||||||
#wrapper {
|
#wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-wrapper {
|
#page-wrapper {
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
min-height: 568px;
|
min-height: 568px;
|
||||||
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,8 +31,6 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-top-links li {
|
.navbar-top-links li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
2169
static/js/jquery.datetimepicker.js
Executable file
2169
static/js/jquery.datetimepicker.js
Executable file
File diff suppressed because it is too large
Load Diff
2066
static/js/jquery.min.js
vendored
Executable file
2066
static/js/jquery.min.js
vendored
Executable file
File diff suppressed because it is too large
Load Diff
71
templates/public/base.html
Normal file → Executable file
71
templates/public/base.html
Normal file → Executable file
@ -54,9 +54,6 @@
|
|||||||
<div class="navbar-default sidebar" role="navigation">
|
<div class="navbar-default sidebar" role="navigation">
|
||||||
<div class="sidebar-nav navbar-collapse">
|
<div class="sidebar-nav navbar-collapse">
|
||||||
<ul class="nav" id="side-menu">
|
<ul class="nav" id="side-menu">
|
||||||
<li class="sidebar-search">
|
|
||||||
|
|
||||||
</li>
|
|
||||||
<li class="text-center divider-horizontal">
|
<li class="text-center divider-horizontal">
|
||||||
<h5>Main Navigation</h5>
|
<h5>Main Navigation</h5>
|
||||||
</li>
|
</li>
|
||||||
@ -76,30 +73,43 @@
|
|||||||
href="{% url 'auth_api_key_management' %}"><i
|
href="{% url 'auth_api_key_management' %}"><i
|
||||||
class="fa fa-key fa-fw grayiconecolor"></i> Api Keys</a>
|
class="fa fa-key fa-fw grayiconecolor"></i> Api Keys</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a {% ifequal request.path "/groups/" %} class="active" {% endifequal %}
|
{% if perms.auth.alliance_member %}
|
||||||
href="{% url 'auth_groups' %}"><i
|
<li>
|
||||||
class="fa fa-cogs fa-sitemap grayiconecolor"></i> Groups</a>
|
<a {% ifequal request.path "/groups/" %} class="active" {% endifequal %}
|
||||||
</li>
|
href="{% url 'auth_groups' %}"><i
|
||||||
<li>
|
class="fa fa-cogs fa-sitemap grayiconecolor"></i> Groups</a>
|
||||||
<a {% ifequal request.path "/services/" %} class="active" {% endifequal %}
|
</li>
|
||||||
href="{% url 'auth_services' %}"><i
|
{% endif %}
|
||||||
class="fa fa-cogs fa-fw grayiconecolor"></i> Services</a>
|
{% if perms.auth.alliance_member or perms.auth.blue_member %}
|
||||||
</li>
|
<li>
|
||||||
|
<a {% ifequal request.path "/services/" %} class="active" {% endifequal %}
|
||||||
|
href="{% url 'auth_services' %}"><i
|
||||||
|
class="fa fa-cogs fa-fw grayiconecolor"></i> Services</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a {% ifequal request.path "/timer_management" %} class="active" {% endifequal %}
|
||||||
|
href="{% url 'auth_timer_view' %}"><i
|
||||||
|
class="fa fa-clock-o fa-fw grayiconecolor"></i> OP Timers</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not perms.auth.alliance_member and not perms.auth.blue_member or perms.auth.human_resources %}
|
||||||
|
<li>
|
||||||
|
<a {% ifequal request.path "/hr_application_management/" %}
|
||||||
|
class="active" {% endifequal %}
|
||||||
|
href="{% url 'auth_hrapplications_view' %}"><i
|
||||||
|
class="fa fa-file-o fa-fw grayiconecolor"></i> Applications</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a {% ifequal request.path "/help/" %} class="active" {% endifequal %}
|
<a {% ifequal request.path "/help/" %} class="active" {% endifequal %}
|
||||||
href="{% url 'auth_help' %}"><i
|
href="{% url 'auth_help' %}"><i
|
||||||
class="fa fa-question fa-fw grayiconecolor"></i> Help</a>
|
class="fa fa-question fa-fw grayiconecolor"></i> Help</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{% if not perms.auth.alliance_member or perms.auth.human_resources %}
|
|
||||||
<li>
|
|
||||||
<a {% ifequal request.path "/hr_application_management/" %} class="active" {% endifequal %}
|
|
||||||
href="{% url 'auth_hrapplications_view' %}"><i
|
|
||||||
class="fa fa-file-o fa-fw grayiconecolor"></i> Applications</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<li class="text-center divider-horizontal">
|
<li class="text-center divider-horizontal">
|
||||||
<h5>Util</h5>
|
<h5>Util</h5>
|
||||||
</li>
|
</li>
|
||||||
@ -108,6 +118,15 @@
|
|||||||
href="{% url 'password_change' %}"><i
|
href="{% url 'password_change' %}"><i
|
||||||
class="fa fa-lock fa-fw grayiconecolor"></i>Change Password</a>
|
class="fa fa-lock fa-fw grayiconecolor"></i>Change Password</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
{% if perms.auth.alliance_member or perms.auth.blue_member %}
|
||||||
|
<li>
|
||||||
|
<a {% ifequal request.path "/tool/fleet_formatter_tool/" %}
|
||||||
|
class="active" {% endifequal %}
|
||||||
|
href="{% url 'auth_fleet_format_tool_view' %}"><i
|
||||||
|
class="fa fa-space-shuttle fa-fw grayiconecolor"></i> Fleet Broadcast Formatter</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
{% if perms.auth.corp_stats %}
|
{% if perms.auth.corp_stats %}
|
||||||
<li>
|
<li>
|
||||||
<a {% ifequal request.path "/corporation_stats" %} class="active" {% endifequal %}
|
<a {% ifequal request.path "/corporation_stats" %} class="active" {% endifequal %}
|
||||||
@ -131,11 +150,6 @@
|
|||||||
class="fa fa-lock fa-bullhorn grayiconecolor"></i> Jabber Broadcast</a>
|
class="fa fa-lock fa-bullhorn grayiconecolor"></i> Jabber Broadcast</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li>
|
|
||||||
<a {% ifequal request.path "/tool/fleet_formatter_tool/" %} class="active" {% endifequal %}
|
|
||||||
href="{% url 'auth_fleet_format_tool_view' %}"><i
|
|
||||||
class="fa fa-space-shuttle fa-fw grayiconecolor"></i> Fleet Broadcast Formatter</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.sidebar-collapse -->
|
<!-- /.sidebar-collapse -->
|
||||||
@ -149,5 +163,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<script src="{% static 'js/jquery.min.js' %}"></script>
|
||||||
|
<script src="{% static 'js/jquery.datetimepicker.js' %}"></script>
|
||||||
|
<script src="{% static 'js/bootstrap.min.js' %}"></script>
|
||||||
|
<script>{% block extra_script %}
|
||||||
|
{% endblock extra_script %}</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
42
templates/registered/addtimer.html
Executable file
42
templates/registered/addtimer.html
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
{% extends "public/base.html" %}
|
||||||
|
{% load bootstrap %}
|
||||||
|
{% load staticfiles %}
|
||||||
|
|
||||||
|
{% block title %}Alliance Auth - Timer Create{% endblock %}
|
||||||
|
|
||||||
|
{% block page_title %}Timer Create{% endblock page_title %}
|
||||||
|
{% block extra_css %}
|
||||||
|
<link href="{% static 'css/jquery.datetimepicker.css' %}" rel="stylesheet" type="text/css">{% endblock extra_css %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h1 class="page-header text-center">Create Timer</h1>
|
||||||
|
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="col-md-4 col-md-offset-4">
|
||||||
|
<div class="row">
|
||||||
|
{% if success %}
|
||||||
|
<div class="alert alert-success text-center" role="alert">Application Submitted</div>
|
||||||
|
{% else %}
|
||||||
|
<form class="form-signin" role="form" action="" method="POST">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form|bootstrap }}
|
||||||
|
<br/>
|
||||||
|
<button class="btn btn-lg btn-primary btn-block" type="submit">Submit Application</button>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock content %}
|
||||||
|
|
||||||
|
{% block extra_script %}
|
||||||
|
|
||||||
|
$('#id_eve_time').datetimepicker({
|
||||||
|
maskInput: true,
|
||||||
|
format: 'Y-m-d H:i',minDate:0
|
||||||
|
});
|
||||||
|
|
||||||
|
{% endblock extra_script %}
|
211
templates/registered/timermanagement.html
Executable file
211
templates/registered/timermanagement.html
Executable file
@ -0,0 +1,211 @@
|
|||||||
|
{% extends "public/base.html" %}
|
||||||
|
{% load staticfiles %}
|
||||||
|
|
||||||
|
{% block title %}Alliance Auth{% endblock %}
|
||||||
|
|
||||||
|
{% block page_title %}Timer Management{% endblock page_title %}
|
||||||
|
{% block extra_css %}{% endblock extra_css %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h1 class="page-header text-center">Operation Timers
|
||||||
|
<div class="text-right">
|
||||||
|
<a href="{% url 'auth_add_timer_view' %}">
|
||||||
|
{% if perms.auth.timer_management %}
|
||||||
|
<button type="button" class="btn btn-success">Create Timer</button>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</h1>
|
||||||
|
<div class="col-lg-12 text-center">
|
||||||
|
<div class="label label-info text-left">
|
||||||
|
<b>Current Eve Time: {{ CURRENT_UTC_TIME | date:"Y-m-d H:i" }}</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h4><b>Next Timer</b></h4>
|
||||||
|
<table class="table table-responsive table-bordered">
|
||||||
|
<tr>
|
||||||
|
<th style="width:150px" class="text-center">Fleet Name</th>
|
||||||
|
<th class="text-center">Fleet Type</th>
|
||||||
|
<th class="text-center">System</th>
|
||||||
|
<th class="text-center">Structure</th>
|
||||||
|
<th class="text-center">Eve Time</th>
|
||||||
|
<th class="text-center">Creator</th>
|
||||||
|
{% if perms.auth.timer_management %}
|
||||||
|
<th class="text-center">Action</th>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% if closest_timer %}
|
||||||
|
{% ifequal closest_timer.important True %}
|
||||||
|
<tr class="danger">
|
||||||
|
{% else %}
|
||||||
|
<tr class="info">
|
||||||
|
{% endifequal %}
|
||||||
|
<td style="width:150px" class="text-center">{{ closest_timer.name }}</td>
|
||||||
|
<td class="text-center">
|
||||||
|
{% ifequal closest_timer.fleet_type "Armor" %}
|
||||||
|
<div class="label label-danger">
|
||||||
|
Armor
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal closest_timer.fleet_type "Shield" %}
|
||||||
|
<div class="label label-primary">
|
||||||
|
Shield
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal closest_timer.fleet_type "Other" %}
|
||||||
|
<div class="label label-default">
|
||||||
|
Other
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
</td>
|
||||||
|
<td class="text-center"><a
|
||||||
|
href="http://evemaps.dotlan.net/system/{{ closest_timer.system }}">{{ closest_timer.system }} {{ closest_timer.planet_moon }} </a>
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
{% ifequal closest_timer.structure "I-HUB" %}
|
||||||
|
<div class="label label-warning">
|
||||||
|
I-HUB
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal closest_timer.structure "POCO" %}
|
||||||
|
<div class="label label-success">
|
||||||
|
POCO
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal closest_timer.structure "POS[S]" %}
|
||||||
|
<div class="label label-info">
|
||||||
|
POS [S]
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal closest_timer.structure "POS[M]" %}
|
||||||
|
<div class="label label-info">
|
||||||
|
POS [M]
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal closest_timer.structure "POS[L]" %}
|
||||||
|
<div class="label label-info">
|
||||||
|
POS [L]
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal closest_timer.structure "Station" %}
|
||||||
|
<div class="label label-danger">
|
||||||
|
Station
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal closest_timer.structure "Other" %}
|
||||||
|
<div class="label label-default">
|
||||||
|
Other
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
</td>
|
||||||
|
<td class="text-center">{{ closest_timer.eve_time | date:"Y-m-d H:i" }} UTC</td>
|
||||||
|
<td class="text-center">{{ closest_timer.eve_character.character_name }}</td>
|
||||||
|
{% if perms.auth.timer_management %}
|
||||||
|
<td class="text-center">
|
||||||
|
|
||||||
|
<a href="/remove_timer/{{ closest_timer.id }}">
|
||||||
|
<button type="button" class="btn btn-danger"><span
|
||||||
|
class="glyphicon glyphicon-remove"></span></button>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<h4><b>Future Timers</b></h4>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<th style="width:150px" class="text-center">Fleet Name</th>
|
||||||
|
<th class="text-center">Fleet Type</th>
|
||||||
|
<th class="text-center">System</th>
|
||||||
|
<th class="text-center">Structure</th>
|
||||||
|
<th class="text-center">Eve Time</th>
|
||||||
|
<th class="text-center">Creator</th>
|
||||||
|
{% if perms.auth.timer_management %}
|
||||||
|
<th class="text-center">Action</th>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% for timer in timers %}
|
||||||
|
{% ifnotequal timer closest_timer %}
|
||||||
|
{% ifequal timer.important True %}
|
||||||
|
<tr class="danger">
|
||||||
|
{% else %}
|
||||||
|
<tr class="info">
|
||||||
|
{% endifequal %}
|
||||||
|
<td style="width:150px" class="text-center">{{ timer.name }}</td>
|
||||||
|
<td class="text-center">
|
||||||
|
{% ifequal timer.fleet_type "Armor" %}
|
||||||
|
<div class="label label-danger">
|
||||||
|
Armor
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal timer.fleet_type "Shield" %}
|
||||||
|
<div class="label label-primary">
|
||||||
|
Shield
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal timer.fleet_type "Other" %}
|
||||||
|
<div class="label label-default">
|
||||||
|
Other
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
</td>
|
||||||
|
<td class="text-center"><a
|
||||||
|
href="http://evemaps.dotlan.net/system/{{ timer.system }}">{{ timer.system }} {{ timer.planet_moon }} </a>
|
||||||
|
</td>
|
||||||
|
<td class="text-center">
|
||||||
|
{% ifequal timer.structure "I-HUB" %}
|
||||||
|
<div class="label label-warning">
|
||||||
|
I-HUB
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal timer.structure "POCO" %}
|
||||||
|
<div class="label label-success">
|
||||||
|
POCO
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal timer.structure "POS[S]" %}
|
||||||
|
<div class="label label-info">
|
||||||
|
POS [S]
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal timer.structure "POS[M]" %}
|
||||||
|
<div class="label label-info">
|
||||||
|
POS [M]
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal timer.structure "POS[L]" %}
|
||||||
|
<div class="label label-info">
|
||||||
|
POS [L]
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal timer.structure "Station" %}
|
||||||
|
<div class="label label-danger">
|
||||||
|
Station
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal timer.structure "Other" %}
|
||||||
|
<div class="label label-default">
|
||||||
|
Other
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
</td>
|
||||||
|
<td class="text-center">{{ timer.eve_time | date:"Y-m-d H:i" }} UTC</td>
|
||||||
|
<td class="text-center">{{ timer.eve_character.character_name }}</td>
|
||||||
|
{% if perms.auth.timer_management %}
|
||||||
|
<td class="text-center">
|
||||||
|
<a href="/remove_timer/{{ timer.id }}">
|
||||||
|
<button type="button" class="btn btn-danger"><span
|
||||||
|
class="glyphicon glyphicon-remove"></span></button>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endifnotequal %}
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock content %}
|
0
timerboard/__init__.py
Executable file
0
timerboard/__init__.py
Executable file
6
timerboard/admin.py
Executable file
6
timerboard/admin.py
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
from models import Timer
|
||||||
|
|
||||||
|
admin.site.register(Timer)
|
||||||
|
# Register your models here.
|
15
timerboard/form.py
Executable file
15
timerboard/form.py
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
from django import forms
|
||||||
|
|
||||||
|
|
||||||
|
class TimerForm(forms.Form):
|
||||||
|
structure_choices = [('POCO', 'POCO'), ('I-HUB', 'I-HUB'), ('POS[S]', 'POS[S]'),
|
||||||
|
('POS[M]', 'POS[M]'), ('POS[L]', 'POS[L]'), ('Station', 'Station'), ('Other', 'Other')]
|
||||||
|
fleet_type_choices = [('Armor', 'Armor'), ('Shield', 'Shield'), ('Other', 'Other')]
|
||||||
|
|
||||||
|
name = forms.CharField(max_length=254, required=True, label='Fleet Name')
|
||||||
|
system = forms.CharField(max_length=254, required=True, label="System")
|
||||||
|
planet_moon = forms.CharField(max_length=254, label="Planet/Moon", required=False, initial="")
|
||||||
|
structure = forms.ChoiceField(choices=structure_choices, required=True, label="Structure Type")
|
||||||
|
fleet_type = forms.ChoiceField(choices=fleet_type_choices, required=True, label="Fleet Type")
|
||||||
|
eve_time = forms.DateTimeField(required=True, label="Eve Time")
|
||||||
|
important = forms.BooleanField(label="Important", required=False)
|
18
timerboard/models.py
Executable file
18
timerboard/models.py
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
from django.db import models
|
||||||
|
from django.contrib.auth.models import User
|
||||||
|
|
||||||
|
from eveonline.models import EveCharacter
|
||||||
|
from eveonline.models import EveCorporationInfo
|
||||||
|
|
||||||
|
|
||||||
|
class Timer(models.Model):
|
||||||
|
name = models.CharField(max_length=254, default="")
|
||||||
|
system = models.CharField(max_length=254, default="")
|
||||||
|
planet_moon = models.CharField(max_length=254, default="")
|
||||||
|
structure = models.CharField(max_length=254, default="")
|
||||||
|
fleet_type = models.CharField(max_length=254, default="")
|
||||||
|
eve_time = models.DateTimeField()
|
||||||
|
important = models.BooleanField(default=False)
|
||||||
|
eve_character = models.ForeignKey(EveCharacter)
|
||||||
|
eve_corp = models.ForeignKey(EveCorporationInfo)
|
||||||
|
user = models.ForeignKey(User)
|
1
timerboard/tests.py
Executable file
1
timerboard/tests.py
Executable file
@ -0,0 +1 @@
|
|||||||
|
# Create your tests here.
|
77
timerboard/views.py
Executable file
77
timerboard/views.py
Executable file
@ -0,0 +1,77 @@
|
|||||||
|
import datetime
|
||||||
|
|
||||||
|
from django.http import HttpResponseRedirect
|
||||||
|
from django.template import RequestContext
|
||||||
|
from django.shortcuts import render_to_response
|
||||||
|
from django.contrib.auth.decorators import login_required
|
||||||
|
from django.contrib.auth.decorators import permission_required
|
||||||
|
from django.contrib.auth.decorators import user_passes_test
|
||||||
|
|
||||||
|
from util import check_if_user_has_permission
|
||||||
|
from authentication.managers import AuthServicesInfoManager
|
||||||
|
from eveonline.managers import EveManager
|
||||||
|
from form import TimerForm
|
||||||
|
from models import Timer
|
||||||
|
|
||||||
|
|
||||||
|
def timer_util_test(user):
|
||||||
|
return check_if_user_has_permission(user, 'alliance_member') or check_if_user_has_permission(user, 'blue_member')
|
||||||
|
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
@user_passes_test(timer_util_test)
|
||||||
|
def timer_view(request):
|
||||||
|
timer_list = Timer.objects.all()
|
||||||
|
closest_timer = None
|
||||||
|
if timer_list:
|
||||||
|
closest_timer = \
|
||||||
|
sorted(list(Timer.objects.all()), key=lambda d: abs(datetime.datetime.now() - d.eve_time.replace(tzinfo=None)))[
|
||||||
|
0]
|
||||||
|
|
||||||
|
render_items = {'timers': Timer.objects.all(),
|
||||||
|
'closest_timer': closest_timer}
|
||||||
|
|
||||||
|
return render_to_response('registered/timermanagement.html', render_items, context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
@permission_required('auth.timer_management')
|
||||||
|
def add_timer_view(request):
|
||||||
|
if request.method == 'POST':
|
||||||
|
form = TimerForm(request.POST)
|
||||||
|
|
||||||
|
if form.is_valid():
|
||||||
|
# Get character
|
||||||
|
auth_info = AuthServicesInfoManager.get_auth_service_info(request.user)
|
||||||
|
character = EveManager.get_character_by_id(auth_info.main_char_id)
|
||||||
|
corporation = EveManager.get_corporation_info_by_id(character.corporation_id)
|
||||||
|
|
||||||
|
# handle valid form
|
||||||
|
timer = Timer()
|
||||||
|
timer.name = form.cleaned_data['name']
|
||||||
|
timer.system = form.cleaned_data['system']
|
||||||
|
timer.planet_moon = form.cleaned_data['planet_moon']
|
||||||
|
timer.structure = form.cleaned_data['structure']
|
||||||
|
timer.fleet_type = form.cleaned_data['fleet_type']
|
||||||
|
timer.eve_time = form.cleaned_data['eve_time']
|
||||||
|
timer.important = form.cleaned_data['important']
|
||||||
|
timer.eve_character = character
|
||||||
|
timer.eve_corp = corporation
|
||||||
|
timer.user = request.user
|
||||||
|
timer.save()
|
||||||
|
return HttpResponseRedirect("/timers/")
|
||||||
|
else:
|
||||||
|
form = TimerForm()
|
||||||
|
|
||||||
|
render_items = {'form': form}
|
||||||
|
|
||||||
|
return render_to_response('registered/addtimer.html', render_items, context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
@permission_required('auth.timer_management')
|
||||||
|
def remove_timer(request, timer_id):
|
||||||
|
if Timer.objects.filter(id=timer_id).exists():
|
||||||
|
timer = Timer.objects.get(id=timer_id)
|
||||||
|
timer.delete()
|
||||||
|
return HttpResponseRedirect("/timers/")
|
1
util/__init__.py
Normal file → Executable file
1
util/__init__.py
Normal file → Executable file
@ -13,6 +13,7 @@ def bootstrap_permissions():
|
|||||||
Permission.objects.get_or_create(codename="human_resources", content_type=ct, name="human_resources")
|
Permission.objects.get_or_create(codename="human_resources", content_type=ct, name="human_resources")
|
||||||
Permission.objects.get_or_create(codename="blue_member", content_type=ct, name="blue_member")
|
Permission.objects.get_or_create(codename="blue_member", content_type=ct, name="blue_member")
|
||||||
Permission.objects.get_or_create(codename="corp_stats", content_type=ct, name="corp_stats")
|
Permission.objects.get_or_create(codename="corp_stats", content_type=ct, name="corp_stats")
|
||||||
|
Permission.objects.get_or_create(codename="timer_management", content_type=ct, name="timer_management")
|
||||||
Group.objects.get_or_create(name=settings.DEFAULT_ALLIANCE_GROUP)
|
Group.objects.get_or_create(name=settings.DEFAULT_ALLIANCE_GROUP)
|
||||||
Group.objects.get_or_create(name=settings.DEFAULT_BLUE_GROUP)
|
Group.objects.get_or_create(name=settings.DEFAULT_BLUE_GROUP)
|
||||||
|
|
||||||
|
4
util/context_processors.py
Normal file → Executable file
4
util/context_processors.py
Normal file → Executable file
@ -1,4 +1,5 @@
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
from django.utils import timezone
|
||||||
|
|
||||||
|
|
||||||
def alliance_id(request):
|
def alliance_id(request):
|
||||||
@ -21,4 +22,5 @@ def domain_url(request):
|
|||||||
'ENABLE_ALLIANCE_MUMBLE': settings.ENABLE_ALLIANCE_MUMBLE,
|
'ENABLE_ALLIANCE_MUMBLE': settings.ENABLE_ALLIANCE_MUMBLE,
|
||||||
'ENABLE_BLUE_JABBER': settings.ENABLE_BLUE_JABBER,
|
'ENABLE_BLUE_JABBER': settings.ENABLE_BLUE_JABBER,
|
||||||
'ENABLE_BLUE_FORUM': settings.ENABLE_BLUE_FORUM,
|
'ENABLE_BLUE_FORUM': settings.ENABLE_BLUE_FORUM,
|
||||||
'ENABLE_BLUE_MUMBLE': settings.ENABLE_BLUE_MUMBLE}
|
'ENABLE_BLUE_MUMBLE': settings.ENABLE_BLUE_MUMBLE,
|
||||||
|
'CURRENT_UTC_TIME': timezone.now()}
|
Loading…
x
Reference in New Issue
Block a user