Pending translations and other minor changes
This commit is contained in:
parent
93a85954a6
commit
9b6128243b
1 changed files with 18 additions and 16 deletions
|
@ -13,8 +13,8 @@
|
||||||
*/
|
*/
|
||||||
function storm_quicktt_help($path, $arg) {
|
function storm_quicktt_help($path, $arg) {
|
||||||
switch ($path) {
|
switch ($path) {
|
||||||
case 'admin/storm/quicktt':
|
case 'admin/suitedesk/quicktt':
|
||||||
return '<p>'. t('Here you can set up parameters for Storm-Quick-TimeTracker.') .'</p>';
|
return '<p>'. t('Here you can set up parameters for SuiteDesk-Quick-TimeTracker.') .'</p>';
|
||||||
case 'admin/help#storm_quicktt':
|
case 'admin/help#storm_quicktt':
|
||||||
return filter_filter('process', 2, NULL, file_get_contents(dirname(__FILE__) ."/README.txt"));
|
return filter_filter('process', 2, NULL, file_get_contents(dirname(__FILE__) ."/README.txt"));
|
||||||
}
|
}
|
||||||
|
@ -26,9 +26,9 @@ function storm_quicktt_help($path, $arg) {
|
||||||
function storm_quicktt_menu() {
|
function storm_quicktt_menu() {
|
||||||
$items = array();
|
$items = array();
|
||||||
$access_config = array('administer site configuration');
|
$access_config = array('administer site configuration');
|
||||||
$items['admin/settings/storm/quicktt'] = array(
|
$items['admin/settings/suitedesk/quicktt'] = array(
|
||||||
'title' => 'Storm Quick TimeTracker',
|
'title' => 'SuiteDesk Quick TimeTracker',
|
||||||
'description' => 'Configure Storm Quick TimeTracker',
|
'description' => 'Configure SuiteDesk Quick TimeTracker',
|
||||||
'page callback' => 'drupal_get_form',
|
'page callback' => 'drupal_get_form',
|
||||||
'page arguments' => array('storm_quicktt_settings'),
|
'page arguments' => array('storm_quicktt_settings'),
|
||||||
'access arguments' => $access_config,
|
'access arguments' => $access_config,
|
||||||
|
@ -60,7 +60,7 @@ function storm_quicktt_add_resources() {
|
||||||
function storm_quicktt_block($op = 'list', $delta = 0, $edit = array()) {
|
function storm_quicktt_block($op = 'list', $delta = 0, $edit = array()) {
|
||||||
switch ($op) {
|
switch ($op) {
|
||||||
case 'list':
|
case 'list':
|
||||||
$blocks[0]['info'] = t('Storm Quick TimeTracker');
|
$blocks[0]['info'] = t('SuiteDesk Quick TimeTracker');
|
||||||
$blocks[0]['cache'] = BLOCK_NO_CACHE;
|
$blocks[0]['cache'] = BLOCK_NO_CACHE;
|
||||||
return $blocks;
|
return $blocks;
|
||||||
case 'configure':
|
case 'configure':
|
||||||
|
@ -79,7 +79,7 @@ function storm_quicktt_block($op = 'list', $delta = 0, $edit = array()) {
|
||||||
ORDER BY spr.organization_title, n.title";
|
ORDER BY spr.organization_title, n.title";
|
||||||
$sql = stormproject_access_sql($sql);
|
$sql = stormproject_access_sql($sql);
|
||||||
$result = db_query($sql);
|
$result = db_query($sql);
|
||||||
$options = array('0' => '- No billable work -');
|
$options = array('0' => t('- No billable work -'));
|
||||||
while ($node = db_fetch_object($result)) {
|
while ($node = db_fetch_object($result)) {
|
||||||
if (!isset($options[$node->organization_title])) {
|
if (!isset($options[$node->organization_title])) {
|
||||||
$options[$node->organization_title] = array();
|
$options[$node->organization_title] = array();
|
||||||
|
@ -135,7 +135,7 @@ function storm_quicktt_blockform($form_state, $options) {
|
||||||
'#title' => t('Projects'),
|
'#title' => t('Projects'),
|
||||||
'#options' => $options,
|
'#options' => $options,
|
||||||
'#default_value' => $pid,
|
'#default_value' => $pid,
|
||||||
'#size' => 10,
|
# '#size' => 10,
|
||||||
);
|
);
|
||||||
if (!module_exists('storm_dashboard')) {
|
if (!module_exists('storm_dashboard')) {
|
||||||
$form['selects']['info'] = array(
|
$form['selects']['info'] = array(
|
||||||
|
@ -435,7 +435,7 @@ function storm_quicktt_store_time($stop = 0, $show_msg = TRUE) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
$destination = ($_GET['q'] == 'stormdashboard/interact') ? 'stormdashboard' : $_GET['q'];
|
$destination = ($_GET['q'] == 'stormdashboard/interact') ? 'stormdashboard' : $_GET['q'];
|
||||||
$link = l('edit', 'node/'. $node->nid .'/edit', array('query' => array('destination' => $destination)));
|
$link = l(t('edit'), 'node/'. $node->nid .'/edit', array('query' => array('destination' => $destination)));
|
||||||
$msg = t('Time spent on %type %name: %min minutes (!edit).', array('%type' => $type, '%name' => $name, '%min' => $minutes, '!edit' => $link));
|
$msg = t('Time spent on %type %name: %min minutes (!edit).', array('%type' => $type, '%name' => $name, '%min' => $minutes, '!edit' => $link));
|
||||||
}
|
}
|
||||||
elseif (!$stop) {
|
elseif (!$stop) {
|
||||||
|
@ -577,14 +577,16 @@ function storm_quicktt_start_link() {
|
||||||
$style_resume = ' style="display:none"';
|
$style_resume = ' style="display:none"';
|
||||||
}
|
}
|
||||||
$text_paused = '<span class="storm-quicktt-resume"'. $style_resume .'>'. t('Paused') .'</span>';
|
$text_paused = '<span class="storm-quicktt-resume"'. $style_resume .'>'. t('Paused') .'</span>';
|
||||||
$path = drupal_get_path('module', 'storm');
|
/* $path = drupal_get_path('module', 'storm');
|
||||||
|
$path = variable_get('storm_icons_path', drupal_get_path('module', 'storm') .'/icons');
|
||||||
|
*/ $path = url(variable_get('storm_icons_path', drupal_get_path('module', 'storm') .'/icons'), array('absolute' => TRUE, 'language' => ''));
|
||||||
$title_pause = t('Pause');
|
$title_pause = t('Pause');
|
||||||
$title_resume = t('Resume');
|
$title_resume = t('Resume');
|
||||||
|
|
||||||
$text = '<div class="storm-quicktt-time">'. format_date($_SESSION['storm_quicktt_start']) .'</div>';
|
$text = '<div class="storm-quicktt-time">'. format_date($_SESSION['storm_quicktt_start']) .'</div>';
|
||||||
$text .= '<div class="storm-quicktt-timer-box"><span class="storm-quicktt-timer">'. storm_quicktt_elapsed_time() .'</span>'. $text_paused .'</div>';
|
$text .= '<div class="storm-quicktt-timer-box"><span class="storm-quicktt-timer">'. storm_quicktt_elapsed_time() .'</span>'. $text_paused .'</div>';
|
||||||
$text .= '<span class="storm-quicktt-pause"'. $style_pause .'><img src="/'. $path .'/icons/status_on_hold.png" title="'. $title_pause .'" alt="'. $title_pause .'"/></span>';
|
$text .= '<span class="storm-quicktt-pause"'. $style_pause .'><img src="'. $path .'/status_on_hold.png" title="'. $title_pause .'" alt="'. $title_pause .'"/></span>';
|
||||||
$text .= '<span class="storm-quicktt-resume"'. $style_resume .'><img src="/'. $path .'/icons/status_in_progress.png" title="'. $title_resume .'" alt="'. $title_resume .'"/></span>';
|
$text .= '<span class="storm-quicktt-resume"'. $style_resume .'><img src="'. $path .'/status_in_progress.png" title="'. $title_resume .'" alt="'. $title_resume .'"/></span>';
|
||||||
$text .= storm_quicktt_timetracking_trigger($nid, FALSE);
|
$text .= storm_quicktt_timetracking_trigger($nid, FALSE);
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
@ -610,13 +612,13 @@ function storm_quicktt_timetracking_trigger($nid = 0, $info = TRUE) {
|
||||||
|
|
||||||
if (!$active) {
|
if (!$active) {
|
||||||
$title = t('Start time tracking.');
|
$title = t('Start time tracking.');
|
||||||
$img_src = url(drupal_get_path('module', 'storm') .'/images/timetrackings.png', array('absolute' => TRUE));
|
$img_src = url(drupal_get_path('module', 'storm') .'/images/timetrackings.png', array('absolute' => TRUE, 'language' => ''));
|
||||||
$class = "";
|
$class = "";
|
||||||
$info_txt = ' '.t('Click to start timetracking');
|
$info_txt = ' '.t('Click to start timetracking');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$title = t('Stop time tracking.');
|
$title = t('Stop time tracking.');
|
||||||
$img_src = url(variable_get('storm_icons_path', drupal_get_path('module', 'storm') .'/icons') .'/dialog_close.png', array('absolute' => TRUE));
|
$img_src = url(variable_get('storm_icons_path', drupal_get_path('module', 'storm') .'/icons') .'/dialog_close.png', array('absolute' => TRUE, 'language' => ''));
|
||||||
$class = "timetracking-active";
|
$class = "timetracking-active";
|
||||||
$info_txt = ' '.t('Click to stop timetracking');
|
$info_txt = ' '.t('Click to stop timetracking');
|
||||||
}
|
}
|
||||||
|
@ -637,8 +639,8 @@ function storm_quicktt_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
|
||||||
if ($op == 'view') {
|
if ($op == 'view') {
|
||||||
$node->content['links']['storm_quicktt_timetracking_trigger'] = array(
|
$node->content['links']['storm_quicktt_timetracking_trigger'] = array(
|
||||||
'#value' => storm_quicktt_timetracking_trigger($node->nid),
|
'#value' => storm_quicktt_timetracking_trigger($node->nid),
|
||||||
'#weight' => 10,
|
'#weight' => 12,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue