Skip to content

Commit

Permalink
* Tested up to version 4.9
Browse files Browse the repository at this point in the history
* Updated .pot file
* Added screenshots
* Switched to multi sass files for css
* Some extra refactoring
  • Loading branch information
Levdbas committed Oct 31, 2017
1 parent 178a1c6 commit 6ec0d92
Show file tree
Hide file tree
Showing 11 changed files with 312 additions and 135 deletions.
15 changes: 12 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: levdbas
Tags: time, hours, tracking, client, pre-paid
Requires at least: 3.0.1
Tested up to: 4.8
Stable tag: 1.4.1
Tested up to: 4.9
Stable tag: 1.4.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -41,9 +41,18 @@ Yes! I just added some new functionality to set different work entries. I will l
Yes! Feel free to sent me any suggestions or feedback. I think this plugin can be optimized quite a lot!

== Screenshots ==

1. Dashboard widget, visible for all roles highter then editor. Animated by css and js. The table shows the last five activities.
2. Settings page where you can set your E-mail adress. Amount of bought hours and input the activities with a date, description and the time spent.
3. Overview page where all activities are listed.

== Changelog ==
= 1.4.2 =

* Tested up to version 4.9
* Updated .pot file
* Added screenshots
* Switched to multi sass files for css
* Some extra refactoring

= 1.4.1 =
Thank you [Jos Klever](https://wordpress.org/support/users/josklever/) for reviewing the plugin.
Expand Down
91 changes: 46 additions & 45 deletions admin/css/partials/_widget.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,53 @@
font-weight: bold;
}
}


.progress-bar {
.innerCicle{
width: 90%;
height: 90%;
margin: 5%;
position: absolute;
z-index: 12;
border-radius: 50%;
background: white;
transition: all 0.2s ease-in;
.textHolder{
display: block;
top: 50%;
position: relative;
.text{
text-align: center;
display: block;
color:$background-color;
font-weight: bold;
margin-top: -50px;
font-size: 35px;
transition: all 0.2s ease-in;
line-height: 50px;
position: absolute;
width: 100%;
&.small{
margin-top: -50px;
line-height: 50px;
font-size: 30px;
}
}
}
&:hover{
width: 94%;
height: 94%;
margin: 3%;
.text{
font-size: 45px;
color:$progress-color;
&.small{
font-size: 35px;
}
}
}
}
position: relative;
width:100%;
padding-bottom: 100%;
Expand Down Expand Up @@ -34,51 +80,6 @@ div {
display: none;
}
}
.innerCicle{
width: 90%;
height: 90%;
margin: 5%;
position: absolute;
z-index: 12;
border-radius: 50%;
background: white;
transition: all 0.2s ease-in;
.textHolder{
display: block;
top: 50%;
position: relative;
.text{
text-align: center;
display: block;
color:$background-color;
font-weight: bold;
margin-top: -50px;
font-size: 35px;
transition: all 0.2s ease-in;
line-height: 50px;
position: absolute;
width: 100%;
&.small{
margin-top: -50px;
line-height: 50px;
font-size: 30px;
}
}
}
&:hover{
width: 94%;
height: 94%;
margin: 3%;
.text{
font-size: 45px;
color:$progress-color;
&.small{
font-size: 35px;
}
}
}
}

@keyframes toggle {
0% { opacity: 0; }
100% { opacity: 1; }
Expand Down
2 changes: 1 addition & 1 deletion admin/css/support-hours-admin.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<p>
<a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo admin_url( 'admin.php?page=support-hours-settings' ); ?>">
<?php _e( 'Configure plugin!', $this->plugin_name); ?>
</a>
</p>
33 changes: 33 additions & 0 deletions admin/partials/support-hours-admin-overview-workTable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php if ($pagenow == 'admin.php?page=support-hours'): ?>
<h3><?php _e('Activities', $this->plugin_name); ?></h3>
<?php endif; ?>
<table class="worktable" width="100%">
<thead>
<tr>
<th width="20%"><?php _e('Date', $this->plugin_name); ?></th>
<th width="50%"><?php _e('Description', $this->plugin_name); ?></th>
<th width="30%"><?php _e('Time used', $this->plugin_name); ?></th>
</tr>
</thead>
<tbody>
<?php
$i = 0;
foreach ( array_reverse($workFields) as $field ) { ?>
<tr>
<td><?php if(!empty($field['used'])) echo $field['date'] ?></td>
<td><?php if(!empty($field['used'])) echo $field['description'] ?></td>
<td><?php if(!empty($field['used'])) echo $field['used'] ?></td>
</tr>
<?php
$i++;
if ($i >= 5){
break;
}
}
?>
</tbody>
</table>
<div class="total">
<span class="bold"><?php _e('Total', $this->plugin_name); ?></span>
<span>: <?php echo AddTime($workFields); ?></span>
</div>
17 changes: 9 additions & 8 deletions admin/support-hours-admin-overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
if(!empty($users) && (!empty($bought_hours) || $bought_hours == '00:00' ) && !empty($email)):
$user_ID = get_current_user_id();
$i = 0;

if ( !empty($workFields[0]['date']) ) :
include_once( 'partials/support-hours-admin-widget-workTable.php' );
include_once( 'partials/support-hours-admin-overview-workTable.php' );
endif;

include_once( 'partials/support-hours-admin-widget-bottomMessage.php' );

elseif(empty($users) || empty($email)):
?>
<p>
<a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo admin_url( 'admin.php?page=support-hours-settings' ); ?>">
<?php _e( 'Configure plugin!', $this->plugin_name); ?>
</a>
</p>
<?php endif; ?>

include_once( 'partials/support-hours-admin-configure-plugin-notice.php' );

endif; ?>

</div>
13 changes: 5 additions & 8 deletions admin/support-hours-admin-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,18 @@
include_once( 'partials/support-hours-admin-widget-clock.php' );

if ( !empty($workFields[0]['date']) ) :
include_once( 'partials/support-hours-admin-widget-workTable.php' );

include_once( 'partials/support-hours-admin-overview-workTable.php' );

endif;

include_once( 'partials/support-hours-admin-widget-bottomMessage.php' );

elseif(empty($users) || empty($email)):
?>

<p>
<a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo admin_url( 'admin.php?page=support-hours-settings' ); ?>">
<?php _e( 'Configure plugin!', $this->plugin_name); ?>
</a>
</p>
include_once( 'partials/support-hours-admin-configure-plugin-notice.php' );

<?php else: ?>
else: ?>

<h4>
<?php _e( 'No support Hours bought', $this->plugin_name); ?>.
Expand Down
Binary file modified languages/support-hours-nl_NL.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions languages/support-hours-nl_NL.po
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
msgid ""
msgstr ""
"Project-Id-Version: Support hours\n"
"POT-Creation-Date: 2017-10-06 04:25+0200\n"
"PO-Revision-Date: 2017-10-06 04:55+0200\n"
"POT-Creation-Date: 2017-10-31 10:02+0100\n"
"PO-Revision-Date: 2017-10-31 10:11+0100\n"
"Last-Translator: \n"
"Language-Team: Erik van der Bas <erik@basedonline.nl>\n"
"Language: nl_NL\n"
Expand Down
Loading

0 comments on commit 6ec0d92

Please # to comment.