Permalink
Browse files

mejoras visuales

  • Loading branch information...
1 parent b8eb025 commit b68828b3f6062f3f081bad1ecdd9e06a850ca655 @alevilar committed Jun 4, 2012
Showing with 137 additions and 51 deletions.
  1. +2 −0 lang/en/block_helpdesk.php
  2. +3 −1 lang/en/block_helpdesk.php~
  3. +2 −0 lang/es/block_helpdesk.php
  4. +3 −1 lang/es/block_helpdesk.php~
  5. +38 −10 styles.css
  6. +42 −10 styles.css~
  7. +22 −13 ticket_answer.php
  8. +23 −14 ticket_answer.php~
  9. +1 −1 ticket_index.php
  10. +1 −1 ticket_index.php~
@@ -55,3 +55,5 @@
$string['write_response'] = 'Please, write an answer';
$string['state_changed'] = 'The state has changed from "%s" to "%s".' ;
+$string['question'] = 'Question' ;
+
@@ -51,7 +51,9 @@ $string['user_assigned_change'] = 'User %s has being assigned as responsable of
$string['user_autoassigned_change'] = "He auto-assigned as responsable of this ticket" ;
$string['error_save'] = "Error saving, please try again.";
$string['responds'] = 'responds';
-$string['priority_changed'] = 'Priority changed from %s to %s';
+$string['priority_changed'] = 'Priority changed from "%s" to "%s"';
$string['write_response'] = 'Please, write an answer';
$string['state_changed'] = 'The state has changed from "%s" to "%s".' ;
+$string['question'] = 'Question' ;
+
@@ -53,4 +53,6 @@
$string['write_response'] = "Al menos debe ingresar una respuesta";
$string['state_changed'] = 'Modificó el estado de "%s" a "%s".';
+$string['question'] = 'Consulta' ;
+
@@ -51,6 +51,8 @@ $string['error_save'] = "Error al guardar, por favor intente nuevamente.";
$string['responds'] = 'respondió';
$string['priority_changed'] = 'Se modificó la prioridad "%s" por "%s"';
$string['write_response'] = "Al menos debe ingresar una respuesta";
-$string['state_changed'] = "Modificó el estado de %s a %s." ;
+$string['state_changed'] = 'Modificó el estado de "%s" a "%s".';
+
+$string['question'] = 'Consulta' ;
View
@@ -21,8 +21,7 @@
padding: 2px 4px;
text-shadow: 1px 1px 2px #393B0B;
filter: dropshadow(color=#393B0B, offx=1, offy=1);
- width: 80px;
- float: left;
+
margin-right: 5px;
-webkit-border-radius: 10px;
border-radius: 10px;
@@ -39,8 +38,7 @@
padding: 2px 4px;
text-shadow: 1px 1px 2px #ad9b25;
filter: dropshadow(color=#ad9b25, offx=1, offy=1);
- width: 80px;
- float: left;
+
margin-right: 5px;
-webkit-border-radius: 10px;
border-radius: 10px;
@@ -57,9 +55,7 @@ text-align: center;
filter: dropshadow(color=#FFFF8D, offx=1, offy=1);
font-size: 12px;
- padding: 2px 4px;
- width: 80px;
- float: left;
+ padding: 2px 4px;
color: #474700;
margin-right: 5px;
-webkit-border-radius: 10px;
@@ -77,9 +73,7 @@ text-align: center;
filter: dropshadow(color=#FFFF8D, offx=1, offy=1);
font-size: 12px;
- padding: 2px 4px;
- width: 80px;
- float: left;
+ padding: 2px 4px;
color: #474700;
margin-right: 5px;
-webkit-border-radius: 10px;
@@ -162,3 +156,37 @@ ul.changes .date{
color: red;
font-weight: bolder;
}
+
+.priority-2 span.priority{
+ font-weight: bolder;
+}
+
+.priority-block{
+ background: grey;
+ color: white;
+ padding: 0px 20px;
+ clear: both;
+ margin-bottom: 10px;
+}
+
+#helpdesk-sidebar{
+ float: left;
+ width: 150px;
+ margin-right: 10px;
+}
+
+p.question{
+ width: 440px;
+ margin-left: 95px;
+ float: left;
+ text-align: center;
+}
+
+
+.helpdesk-answers .username{
+ font-style: italic;
+}
+
+.helpdesk-answers .changetype-id-1 .answers{
+ margin-left: 88px;
+}
View
@@ -21,8 +21,7 @@
padding: 2px 4px;
text-shadow: 1px 1px 2px #393B0B;
filter: dropshadow(color=#393B0B, offx=1, offy=1);
- width: 80px;
- float: left;
+
margin-right: 5px;
-webkit-border-radius: 10px;
border-radius: 10px;
@@ -39,8 +38,7 @@
padding: 2px 4px;
text-shadow: 1px 1px 2px #ad9b25;
filter: dropshadow(color=#ad9b25, offx=1, offy=1);
- width: 80px;
- float: left;
+
margin-right: 5px;
-webkit-border-radius: 10px;
border-radius: 10px;
@@ -57,9 +55,7 @@ text-align: center;
filter: dropshadow(color=#FFFF8D, offx=1, offy=1);
font-size: 12px;
- padding: 2px 4px;
- width: 80px;
- float: left;
+ padding: 2px 4px;
color: #474700;
margin-right: 5px;
-webkit-border-radius: 10px;
@@ -77,9 +73,7 @@ text-align: center;
filter: dropshadow(color=#FFFF8D, offx=1, offy=1);
font-size: 12px;
- padding: 2px 4px;
- width: 80px;
- float: left;
+ padding: 2px 4px;
color: #474700;
margin-right: 5px;
-webkit-border-radius: 10px;
@@ -95,6 +89,10 @@ text-align: center;
}
+#ticket_index tr{
+ cursor:pointer;cursor:hand
+}
+
#ticket_index tr:hover{
background: #FCFCFC;
}
@@ -158,3 +156,37 @@ ul.changes .date{
color: red;
font-weight: bolder;
}
+
+.priority-2 span.priority{
+ font-weight: bolder;
+}
+
+.priority-block{
+ background: grey;
+ color: white;
+ padding: 0px 20px;
+ clear: both;
+ margin-bottom: 10px;
+}
+
+#helpdesk-sidebar{
+ float: left;
+ width: 150px;
+ margin-right: 10px;
+}
+
+p.question{
+ width: 440px;
+ margin-left: 95px;
+ float: left;
+ text-align: center;
+}
+
+
+.helpdesk-answers .username{
+ font-style: italic;
+}
+
+.helpdesk-answers .answers{
+ margin-left: 88px;
+}
View
@@ -169,8 +169,21 @@
}
- echo "<div class='state-$ticket->stateid'>$ticket->state</div>";
-
+ ?>
+ <div id="helpdesk-sidebar">
+ <div class="priority-block priority-<?php echo $ticket->priority ?>">
+ <span class="label"><?php echo get_string('priority', 'block_helpdesk')?>:</span>
+ <span class="priority"><?php echo $priorities[$ticket->priority];?></span>
+ </div>
+
+ <?php
+ echo "<div class='state-$ticket->stateid'>$ticket->state</div>";
+ ?>
+
+ </div>
+
+ <?php
+
$answers = $DB->get_records('block_helpdesk_changes', array('ticketid'=>$tt));
$userObj = $DB->get_record('user', array('id'=> $ticket->authorid));
@@ -179,31 +192,27 @@
?>
- <p style="margin-top: -13px">
- <div style="float: right" class="priority-<?php echo $ticket->priority ?>">
- <span><?php echo get_string('priority', 'block_helpdesk')?>:</span>
- <?php echo $priorities[$ticket->priority];?>
- </div>
- <span class='username'><?php echo $url_profile?>:</span> <span class='ticket-question'><?php echo $ticket->question?></span>
+ <p class="question"><h4><?php echo get_string('question', 'block_helpdesk')?></h4>
+ <span class='username'><?php echo $url_profile?>:</span>
+ <span class='ticket-question'><?php echo $ticket->question?></span>
</p>
- <br />
- <div style="margin-left: 94px;">
+ <div style="margin-left: 94px; margin-top: 20px;">
<?php
if ( count($answers) ) {
echo "<h4>Respuestas</h4>";
- echo "<ul class='changes' style='margin-left: 0px'>";
+ echo "<ul class='changes helpdesk-answers' style='margin-left: 0px'>";
foreach ($answers as $a) {
$userObj = $DB->get_record('user', array('id'=> $a->userid));
$url_profile = new moodle_url("/user/profile.php?id=$a->userid");
$url_profile = html_writer::tag('a', $userObj->username, array('href' => $url_profile, 'class'=>'username' ));
$date = ' ' . date('d/m/Y H:i',$a->created);
- $responsss = ($a->changetypeid == CHANGE_TYPE_COMMENT)? get_string('responds', 'block_helpdesk').':<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;':': ';
+ $responsss = ($a->changetypeid == CHANGE_TYPE_COMMENT)? get_string('responds', 'block_helpdesk').':<br>':': ';
- echo "<li class='changetype-id-$a->changetypeid'><span class='date'>$date</span><span class='username'> $url_profile $responsss<span class='answers'>$a->text<span></li>";
+ echo "<li class='changetype-id-$a->changetypeid'><span class='date'>$date</span><span class='username'> $url_profile $responsss</span><span class='answers'>$a->text</span></li>";
}
echo "</ul>";
}
View
@@ -161,16 +161,29 @@ echo $OUTPUT->header();
// show error message on empty form submit
if ( empty($record->text) ) {
- $mensajeError = get_strin('write_response', 'block_helpdesk');
+ $mensajeError = get_string('write_response', 'block_helpdesk');
}
// get updated $ticket data
$ticket = get_ticket($tt);
}
- echo "<div class='state-$ticket->stateid'>$ticket->state</div>";
-
+ ?>
+ <div id="helpdesk-sidebar">
+ <div class="priority-block priority-<?php echo $ticket->priority ?>">
+ <span class="label"><?php echo get_string('priority', 'block_helpdesk')?>:</span>
+ <span class="priority"><?php echo $priorities[$ticket->priority];?></span>
+ </div>
+
+ <?php
+ echo "<div class='state-$ticket->stateid'>$ticket->state</div>";
+ ?>
+
+ </div>
+
+ <?php
+
$answers = $DB->get_records('block_helpdesk_changes', array('ticketid'=>$tt));
$userObj = $DB->get_record('user', array('id'=> $ticket->authorid));
@@ -179,31 +192,27 @@ echo $OUTPUT->header();
?>
- <p style="margin-top: -13px">
- <div style="float: right" class="priority-<?php echo $ticket->priority ?>">
- <span><?php echo get_string('priority', 'block_helpdesk')?>:</span>
- <?php echo $priorities[$ticket->priority];?>
- </div>
- <span class='username'><?php echo $url_profile?>:</span> <span class='ticket-question'><?php echo $ticket->question?></span>
+ <p class="question"><h4><?php echo get_string('question', 'block_helpdesk')?></h4>
+ <span class='username'><?php echo $url_profile?>:</span>
+ <span class='ticket-question'><?php echo $ticket->question?></span>
</p>
- <br />
- <div style="margin-left: 94px;">
+ <div style="margin-left: 94px; margin-top: 20px;">
<?php
if ( count($answers) ) {
echo "<h4>Respuestas</h4>";
- echo "<ul class='changes' style='margin-left: 0px'>";
+ echo "<ul class='changes helpdesk-answers' style='margin-left: 0px'>";
foreach ($answers as $a) {
$userObj = $DB->get_record('user', array('id'=> $a->userid));
$url_profile = new moodle_url("/user/profile.php?id=$a->userid");
$url_profile = html_writer::tag('a', $userObj->username, array('href' => $url_profile, 'class'=>'username' ));
$date = ' ' . date('d/m/Y H:i',$a->created);
- $responsss = ($a->changetypeid == CHANGE_TYPE_COMMENT)? get_string('responds', 'block_helpdesk').':<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;':': ';
+ $responsss = ($a->changetypeid == CHANGE_TYPE_COMMENT)? get_string('responds', 'block_helpdesk').':<br>':': ';
- echo "<li class='changetype-id-$a->changetypeid'><span class='date'>$date</span><span class='username'> $url_profile $responsss<span class='answers'>$a->text<span></li>";
+ echo "<li class='changetype-id-$a->changetypeid'><span class='date'>$date</span><span class='username'> $url_profile $responsss<span class='answers'>$a->text</span></li>";
}
echo "</ul>";
}
View
@@ -105,7 +105,7 @@
$where_text .= " AND $w";
}
- $order_by = "ORDER by t.created ASC";
+ $order_by = "ORDER by t.created DESC";
$limit_text = " LIMIT $limit";
View
@@ -230,7 +230,7 @@ if (!empty($notificationerror)) {
if ( $t->ownerid ) {
$userObj = $DB->get_record('user', array('id'=>$t->ownerid));
- $url_profile = new moodle_url("/user/profile.php?id=".$t->authorid);
+ $url_profile = new moodle_url("/user/profile.php?id=".$t->ownerid);
$url_profile = html_writer::tag('a', $userObj->username, array('href' => $url_profile, 'class'=>'username' ));
} else {
$url_profile = get_string('no_assigned', 'block_helpdesk');

0 comments on commit b68828b

Please sign in to comment.