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) {
|
||||
switch ($path) {
|
||||
case 'admin/storm/quicktt':
|
||||
return '<p>'. t('Here you can set up parameters for Storm-Quick-TimeTracker.') .'</p>';
|
||||
case 'admin/suitedesk/quicktt':
|
||||
return '<p>'. t('Here you can set up parameters for SuiteDesk-Quick-TimeTracker.') .'</p>';
|
||||
case 'admin/help#storm_quicktt':
|
||||
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() {
|
||||
$items = array();
|
||||
$access_config = array('administer site configuration');
|
||||
$items['admin/settings/storm/quicktt'] = array(
|
||||
'title' => 'Storm Quick TimeTracker',
|
||||
'description' => 'Configure Storm Quick TimeTracker',
|
||||
$items['admin/settings/suitedesk/quicktt'] = array(
|
||||
'title' => 'SuiteDesk Quick TimeTracker',
|
||||
'description' => 'Configure SuiteDesk Quick TimeTracker',
|
||||
'page callback' => 'drupal_get_form',
|
||||
'page arguments' => array('storm_quicktt_settings'),
|
||||
'access arguments' => $access_config,
|
||||
|
@ -60,7 +60,7 @@ function storm_quicktt_add_resources() {
|
|||
function storm_quicktt_block($op = 'list', $delta = 0, $edit = array()) {
|
||||
switch ($op) {
|
||||
case 'list':
|
||||
$blocks[0]['info'] = t('Storm Quick TimeTracker');
|
||||
$blocks[0]['info'] = t('SuiteDesk Quick TimeTracker');
|
||||
$blocks[0]['cache'] = BLOCK_NO_CACHE;
|
||||
return $blocks;
|
||||
case 'configure':
|
||||
|
@ -79,7 +79,7 @@ function storm_quicktt_block($op = 'list', $delta = 0, $edit = array()) {
|
|||
ORDER BY spr.organization_title, n.title";
|
||||
$sql = stormproject_access_sql($sql);
|
||||
$result = db_query($sql);
|
||||
$options = array('0' => '- No billable work -');
|
||||
$options = array('0' => t('- No billable work -'));
|
||||
while ($node = db_fetch_object($result)) {
|
||||
if (!isset($options[$node->organization_title])) {
|
||||
$options[$node->organization_title] = array();
|
||||
|
@ -135,7 +135,7 @@ function storm_quicktt_blockform($form_state, $options) {
|
|||
'#title' => t('Projects'),
|
||||
'#options' => $options,
|
||||
'#default_value' => $pid,
|
||||
'#size' => 10,
|
||||
# '#size' => 10,
|
||||
);
|
||||
if (!module_exists('storm_dashboard')) {
|
||||
$form['selects']['info'] = array(
|
||||
|
@ -435,7 +435,7 @@ function storm_quicktt_store_time($stop = 0, $show_msg = TRUE) {
|
|||
return '';
|
||||
}
|
||||
$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));
|
||||
}
|
||||
elseif (!$stop) {
|
||||
|
@ -577,14 +577,16 @@ function storm_quicktt_start_link() {
|
|||
$style_resume = ' style="display:none"';
|
||||
}
|
||||
$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_resume = t('Resume');
|
||||
|
||||
$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 .= '<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-resume"'. $style_resume .'><img src="/'. $path .'/icons/status_in_progress.png" title="'. $title_resume .'" alt="'. $title_resume .'"/></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 .'/status_in_progress.png" title="'. $title_resume .'" alt="'. $title_resume .'"/></span>';
|
||||
$text .= storm_quicktt_timetracking_trigger($nid, FALSE);
|
||||
return $text;
|
||||
}
|
||||
|
@ -610,13 +612,13 @@ function storm_quicktt_timetracking_trigger($nid = 0, $info = TRUE) {
|
|||
|
||||
if (!$active) {
|
||||
$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 = "";
|
||||
$info_txt = ' '.t('Click to start timetracking');
|
||||
}
|
||||
else {
|
||||
$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";
|
||||
$info_txt = ' '.t('Click to stop timetracking');
|
||||
}
|
||||
|
@ -637,8 +639,8 @@ function storm_quicktt_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
|
|||
if ($op == 'view') {
|
||||
$node->content['links']['storm_quicktt_timetracking_trigger'] = array(
|
||||
'#value' => storm_quicktt_timetracking_trigger($node->nid),
|
||||
'#weight' => 10,
|
||||
'#weight' => 12,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue