> > Feature (approved)

add "answere", "edit", "new note" as text-labels. Remove icons.

Summary

approved
Mar 28, 2006
60 min ... 4 hours
100%
Oct 26, 2006
Mar 28, 2006 / pixtur
Jan 5, 2009 / phsouzacruz
tino
 

Attached files

 
See the attached layout:
  • The author is now places on the left side
  • There is no Odd/even rows
  • The edit functions are directly placed as text, depending on the relation of the current user to the comment
  • The headline is renamed into "XX Comments"
  • The Comment-Occasion has been removed
  • The Table headline is not longer displayed

18 Comments

guest:New Comment

12 years ago (2. update 11 years ago) -

I don't think that would be important.

tino:Done...

11 years ago (2. update 11 years ago)

Hey Tom,

I replaced the icons by the corresponding labels.

In addition to this we should think about an answer functionality (see ).

pixtur:Not quiet

11 years ago (2. update 11 years ago)

Hi tino,

Sorry for being inprecise. I should have made a photoshop mockup first:
  1. the answere-links should be below each comment
  2. the drop down list must be cleared from the text functions (otherwise the function is listed twice)
I will do a quick sketch in photoshop.

tom


pixtur:Hi Tino,

11 years ago (2. update 11 years ago)

Should I do some of the points listed in description?

tom

tino:Hey Tom

11 years ago (2. update 11 years ago)

I'll try my best.

If I need some help - I feel free to contact you ;-)

tino

pixtur:very cool...

11 years ago (2. update 11 years ago)

it looks like my projects ends with september 4th. Then I will have some more time for streber ;-)

tino:a bit complicated

11 years ago (2. update 11 years ago)

Hey Tom,

The edit functions are directly placed as text, depending on the relation of the current user to the comment
  • this is a bit complicated - I think we need a new function to print the link directly (not in the footer)
Have you any ideas about that?

pixtur:sure...

11 years ago (2. update 11 years ago)

create a new column type and render it like...

from dirty example


function render($obj) {
  global $PH;
  global $auth;
  $buffer="<td>";
  if($obj->created_by == $auth->cur_user->id) {
    $buffer.= $PH->getLink('commentEdit', __('Edit'), array('coment'=>$obj->id);
    $buffer.=" ";
    $buffer.= $PH->getLink('commentEdit', __('Edit'), array('comment'=>$obj->id);
  }
  else {
    $buffer.= $PH->getLink('commentNew', __('Reply'), array('comment'=>$obj->id);
  }
}

(something like this)

tom

tino:Reply to sure...

11 years ago (2. update 11 years ago)

Thanks for this Tom,

I had something similar implemented so far - but your suggestion is quiet better!

Doing step by step I have another tricky problem:
  1. regarding to have no checkboxes anymore I have to implement the get_comment() function from the task-class (need this for the shrink and expand features)
   
$tsk=get('tsk');
$task=Task::getVisibleById($tsk);
$ids= $task->getComments();

foreach($ids as $id) {
...

But it doesn't work so far (I only get the object ids) ;-/

madlyr:Odd/even rows - why rmoved?

11 years ago (8. update 11 years ago)

I like coloring of odd/even rows.Please don't remove it. :-)

pixtur:OK, I am pretty flexible at this point...

11 years ago (7. update 11 years ago)


tino:Reply to OK, I am pretty flexible at this point...

11 years ago (8. update 11 years ago)

Everythings works fine except the shrink and collapse functions.

But I'm still working on this!


I don't changed the odd/even rows as yet.

tino:hey Tom, now it works

11 years ago (2. update 11 years ago)

now it works fine!

I didn't see the wood for the trees anyway ;-)

I get all the comments for the tasks with the getComment()-function and it works!


Only a problem with the pagehandle of the reply-function.
It would be very kind when you could dip into it.

I will commit the changes today's afternoon.


regards tino

pixtur:maybe like...

11 years ago (2. update 11 years ago)

from example

foreach($comments as $c) {
  echo $PH->getLink('commentNew', __("Reply"), array('comment'=> $c->id));
}

Just passing the id of another comment as comment shoud be sufficient to mark the new comment as reply.

tino:Reply to maybe like...

11 years ago (2. update 11 years ago)

hello Tom,

just commited to revision 77.

pixtur:Commenting your code...

11 years ago (2. update 11 years ago)

Thanks for commiting...

Namingπ

The problem with the new commentsExpandView() function is that it now does another thing, than the name suggests. It expands all comments of a task. I think this should be called taskExpandAllComments.


Code-Style:π

please read:

esp. single `if() {} ` and formatting of "$result= (1 == 2) ? true : false";

Be affraid of texts...π

Append an a "s" to an text you don't know is not a good a idea. Better write it like this:
			if(count($comments) == 1){
			     $list_comments->title= __("1 Comment") ;
			}
            else {
			     $list_comments->title= sprintf(__("%s Comments"), count($comments)) ;
			}



Styles are my faultπ

I will fixed the style sheet in an quiet hour...


Thanks for helping me with streber. It makes me really enthusiastic to see all of you developers contributing at once. Sorry that I currently have not that much time, but this will change...

tom


tino:Reply to Commenting your code...

11 years ago (2. update 11 years ago)

Hello Tom,

thanks for checking the code!


''Naming
The problem with the new commentsExpandView() function is that it now does another thing, than the name suggests. It expands all comments of a task. I think this should be called taskExpandAllComments.
''

So I will add two new functions to task_view.inc.php!


Code-Style & Be affraid of texts...

I will change all "dirty" code!


regards tino


tino:Committed the changes

11 years ago

Good evening Tom,

I committed the changes.

Added 2 new functions taskCollapseAllComments, taskExpandAllComments.


regards Tino