Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staffhours/stats #373

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ocfweb/main/templates/main/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ <h3>OCF Computer Lab</h3>
</ul>

<div class="ocf-staffhours">
<span class="title">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be indented

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, indentation on the whole <span> element would be good.

Staff Hours
</span>
{% for staff_hour in staff_hours %}
<h3>Staff Hours {{staff_hour.day}}</h3>
<h3>{{staff_hour.day}}</h3>
<div class="{% if staff_hour.cancelled %} cancelled {% endif %}">
<p>
{{staff_hour.time}}
Expand Down
46 changes: 27 additions & 19 deletions ocfweb/main/templates/main/staff-hours.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,38 @@
<h2>Have questions? Drop by for help from a friendly volunteer staffer!</h2>
<p>OCF staff members hold regular drop-in staff hours to provide assistance with account issues or with OCF services. We're always happy to help troubleshoot account or service issues!</p>
<p>Keep in mind the OCF volunteers sometimes have last-minute conflicts, so it's a good idea to check this page before coming in for cancellations.</p>
{% for staff_hour in staff_hours %}
<div class="hour {% if staff_hour.cancelled or staff_hour.day == today and lab_status.force_lab_closed %} cancelled {% endif %}">
<div class="title">
<strong>{{staff_hour.day}}</strong>
{{staff_hour.time}}
{% if staff_hour.cancelled or staff_hour.day == today and lab_status.force_lab_closed %}
<span class="cancelled-text">cancelled this week</span>
{% for staff_day in staff_hours %}
<div class = "day">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's please not have spaces around the equal sign

<div class="daytitle">
<strong><big>{{staff_day.day}}</big></strong>
{%if staff_day.holiday is not None %}
<span class="cancelled-text">{{staff_day.holiday}}</span>
{% endif %}
</div>
<div class="content">
<ul class="ocf-staffhours-faces">
{% for staffer in staff_hour.staff %}
<li>
<img alt="{{staffer.user_name}}" src="{{staffer|gravatar:100}}" />
<h4>{{staffer.real_name}}</h4>
<h5>{{staffer.position}}</h5>
</li>
{% endfor %}
</ul>
</div>
{% for staff_hour in staff_day.hours %}
<div class="hour {% if staff_hour.cancelled %} cancelled {% endif %}">
<div class="title">
<strong>{{staff_hour.time}}</strong>
{% if staff_hour.cancelled or lab_status.force_lab_closed and staff_day == today%}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should have space before %}

<span class="cancelled-text"> cancelled this week</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the space before "cancelled" necessary?

{% endif %}
</div>
<div class="content">
<ul class="ocf-staffhours-faces">
{%for staffer in staff_hour.staff %}
<li>
<img alt="{{staffer.user_name}}" src="{{staffer|gravatar:100}}" />
<h4>{{staffer.real_name}}</h4>
<h5>{{staffer.position}}</h5>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>

<div class="col-sm-4 ocf-sidebar">
<h4>Open Computing Facility Lab</h4>
<p>{% google_map '100%' '250px' %}</p>
Expand Down
11 changes: 11 additions & 0 deletions ocfweb/static/scss/pages/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,23 @@
}

.ocf-staffhours {
border-width: thin;
font-size: 18px;

.title {
margin-bottom: 0;
font-size: 28px;
font-weight: bold;
}

p {
margin: 0;
}

h3 {
margin-top: 0;
margin-bottom: 0;
font-size: 20px;
}

.cancelled p {
Expand Down
15 changes: 15 additions & 0 deletions ocfweb/static/scss/pages/_mirrors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.page-stats_mirrors {
.mirrors-pie-chart {
width: 1100px;
height: 500px;
padding: 10px;
margin: 0;
}

.mirrors-mirror-usage {
width: 1100px;
height: 500px;
padding: 10px;
margin: 0;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the addition of this file probably belongs in a separate pull request, since these aren't used at all yet.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to staff hours page and staff hours section of home page.
screenshot from 2018-04-30 15-46-09

screenshot from 2018-04-30 15-41-52
screenshot from 2018-04-30 15-42-06
screenshot from 2018-04-30 15-42-15
screenshot from 2018-04-30 15-42-28

105 changes: 61 additions & 44 deletions ocfweb/static/scss/pages/_staff-hours.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
.page-staff-hours {
.hour {
border: solid 1px #ddd;
margin-bottom: 15px;
.day {
border-width: thin;
padding: 20px;

.title {
font-size: 16px;
padding: 7px 10px 5px;
border-bottom: solid 1px #ddd;
.daytitle {
font-size: 22px;
padding: 0 10px 5px;
background-color: #eee;

strong {
margin-right: 3px;
}

span {
margin-left: 3px;
}
}

.content {
padding: 13px;
border: solid 1px #ddd;
}

&.cancelled .title {
Expand All @@ -31,39 +19,68 @@
font-weight: bold;
}

.ocf-staffhours-faces {
@extend .list-inline;
margin-bottom: 0;
.hour {
margin-bottom: 15px;
border-width: thin;

li {
h4,
h5 {
text-align: center;
}
.title {
font-size: 16px;
padding: 7px 10px 5px;
border-bottom: solid 2px #eee;

h4 {
margin-top: 5px;
margin-bottom: 4px;
font-size: 16px;
strong {
margin-right: 3px;
}

h5 {
margin-top: 0;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
span {
margin-left: 3px;
}
}

img {
display: block;
margin-left: auto;
margin-right: auto;
.content {
padding: 13px;
}

.ocf-staffhours-faces {
@extend .list-inline;
margin-bottom: 0;

li {
width: 165px;
display: inline-block;
margin-bottom: 20px;

h4,
h5 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix this indentation

text-align: center;
}

h4 {
text-align: center;
margin-top: 5px;
margin-bottom: 4px;
font-size: 16px;
}

h5 {
text-align: center;
margin-top: 0;
margin-bottom: 0;
font-size: 14px;
font-weight: normal;
}

img {
display: block;
margin-left: auto;
margin-right: auto;
}
}
}
}

&.cancelled .ocf-staffhours-faces {
opacity: 0.6;
&.cancelled .ocf-staffhours-faces {
opacity: 0.6;
}
}
}
}
}
1 change: 1 addition & 0 deletions ocfweb/static/scss/site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,4 @@ h6 {
@import 'pages/staff-hours';
@import 'pages/printing-announcement';
@import 'pages/tv';
@import 'pages/mirrors';
7 changes: 4 additions & 3 deletions ocfweb/stats/templates/stats/mirrors.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
{% load common %}
{% load stats %}


{% block content %}
<div class="ocf-content-block">
{% stats_navbar %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this been de-indented

<h2> Bandwidth usage per mirrored project </h2>
<div class="row">
{% stats_navbar %}
<h2> Bandwidth usage per mirrored project </h2>
<div class="row">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I don't think any changes are needed for this page from the looks of things

<div class="col-md-6">
<h4> Bandwidth Usage Since {{ start_date }} </h4>
<br />
Expand Down