Merge branch 'userTasksOverlay' into 'master'
Use do-plugin's user task button w/ overlay See merge request !55
This commit is contained in:
commit
52ef6e091d
5 changed files with 68 additions and 64 deletions
|
@ -46,7 +46,7 @@
|
|||
margin-bottom: @headericons-margin-xxs;
|
||||
}
|
||||
|
||||
> strong,
|
||||
> span,
|
||||
> a {
|
||||
display: block;
|
||||
width: auto;
|
||||
|
@ -68,6 +68,10 @@
|
|||
@media @screen_max-md {
|
||||
min-height: @toggle-size;
|
||||
}
|
||||
|
||||
@media @screen_only-lg {
|
||||
min-width: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
&.user {
|
||||
|
@ -222,46 +226,6 @@
|
|||
}
|
||||
}
|
||||
} // user
|
||||
|
||||
&.user-task {
|
||||
position: relative;
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
white-space: normal;
|
||||
text-indent: 0;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
.prefix {
|
||||
.btn-prefix();
|
||||
.icon-clipboard();
|
||||
|
||||
display: block;
|
||||
font-size: 1.2rem;
|
||||
text-align: center;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
} // user-task
|
||||
|
||||
&.noopentasks {
|
||||
strong {
|
||||
background-color: @ini_background_site;
|
||||
border-color: @noopentasks-border;
|
||||
color: @ini_text_webframe;
|
||||
}
|
||||
|
||||
.num {
|
||||
background-color: @noopentasks-border; // fix
|
||||
color: @noopentasks-color; // fix
|
||||
margin-top: 1px;
|
||||
}
|
||||
}
|
||||
} // li
|
||||
|
||||
|
||||
|
@ -317,4 +281,4 @@
|
|||
}
|
||||
} // a
|
||||
} // ul
|
||||
} // nav-usertools
|
||||
} // nav-usertools
|
|
@ -24,3 +24,60 @@ ul.page-attributes {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#dokuwiki__usertools.nav-usertools {
|
||||
ul {
|
||||
li {
|
||||
&.user-task {
|
||||
position: relative;
|
||||
|
||||
a {
|
||||
overflow: visible;
|
||||
white-space: normal; // Is this still needed?
|
||||
text-indent: 0;
|
||||
|
||||
&::before {
|
||||
content: ''; // remove when fontello is removed from usertools
|
||||
}
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 20px;
|
||||
margin-top: 2px;
|
||||
|
||||
@media @screen_max-md {
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
:not(.noopentasks) {
|
||||
svg path {
|
||||
fill: @ini_background;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.noopentasks {
|
||||
background-color: @ini_background;
|
||||
border-color: @noopentasks-border;
|
||||
color: @ini_text_webframe;
|
||||
|
||||
.num {
|
||||
background-color: @noopentasks-border; // fix
|
||||
color: @noopentasks-color; // fix
|
||||
margin-top: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
@media @screen_max-sm {
|
||||
display: none;
|
||||
}
|
||||
} // user-task
|
||||
} // li
|
||||
} // ul
|
||||
}
|
||||
|
||||
.plugin__do_usertasks_list {
|
||||
z-index: 5;
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ $lang['tab_tags'] = 'Tags';
|
|||
$lang['quality_trigger'] = 'Seitenanalyse ein- bzw. ausblenden';
|
||||
|
||||
$lang['prefix_tasks'] = 'offene Aufgaben: ';
|
||||
$lang['prefix_tasks_user'] = 'Ihre offenen Aufgaben: ';
|
||||
$lang['prefix_tasks_page'] = 'offene Aufgaben auf dieser Seite: ';
|
||||
$lang['tasks_page_none'] = 'keine offenen Aufgaben für diese Seite';
|
||||
|
||||
|
|
|
@ -37,13 +37,10 @@ $lang['tab_issues'] = 'Issues';
|
|||
$lang['quality_trigger'] = 'toggle page analysis';
|
||||
|
||||
$lang['prefix_tasks'] = 'open tasks: ';
|
||||
$lang['prefix_tasks_user'] = 'your open tasks: ';
|
||||
$lang['prefix_tasks_page'] = 'open tasks for this page: ';
|
||||
$lang['tasks_page_none'] = 'There are no open tasks for this page.';
|
||||
$lang['tasks_page_intime'] = 'There are %1$d open tasks on this page.';
|
||||
$lang['tasks_page_late'] = 'There are %1$d open tasks on this page, %2$d are late.';
|
||||
$lang['tasks_user_none'] = 'You have no open tasks.';
|
||||
$lang['tasks_user_intime'] = 'You have %1$d open tasks.';
|
||||
|
||||
$lang['discussion'] = 'Discussion';
|
||||
$lang['back_to_article'] = 'Back to article';
|
||||
|
|
|
@ -23,25 +23,12 @@
|
|||
/** @var \helper_plugin_do $doplugin */
|
||||
$doplugin = plugin_load('helper','do');
|
||||
if ($doplugin !== null && isset($_SERVER['REMOTE_USER'])) {
|
||||
$tasks = $doplugin->loadTasks(array('status' => array('undone'),'user' => $_SERVER['REMOTE_USER']));
|
||||
$num = count($tasks);
|
||||
if ($num === 0) {
|
||||
$title = tpl_getLang('tasks_user_none');
|
||||
} else {
|
||||
$title = sprintf(tpl_getLang('tasks_user_intime'), $num);
|
||||
$icon = $doplugin->tpl_getUserTasksIconHTML();
|
||||
if ($icon) {
|
||||
echo '<li class="user-task">' . $icon . '</li>';
|
||||
}
|
||||
|
||||
$doInner = "<span class=\"prefix\">".tpl_getLang('prefix_tasks_user')." </span><span class=\"num\">".count($tasks)."</span>";
|
||||
|
||||
$userpage = $doplugin->getConf('userpage');
|
||||
if ($userpage && $_SERVER['REMOTE_USER'] && $num > 0) {
|
||||
$linktarget = sprintf($userpage, $_SERVER['REMOTE_USER']) . ':' . 'dashboard';
|
||||
$linktarget = str_replace('::', ':', $linktarget);
|
||||
echo '<li class="user-task" title="'.$title.'"><a href="'.wl($linktarget).'">'.$doInner.'</a></li>';
|
||||
} else {
|
||||
echo '<li class="user-task" title="'.$title.'"><strong>'.$doInner.'</strong></li>';
|
||||
}
|
||||
} ?>
|
||||
}
|
||||
?>
|
||||
|
||||
</ul>
|
||||
</nav><!-- #dokuwiki__usertools -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue