? Success

User tests: Successful: Unsuccessful:

avatar peterlose
peterlose
2 Mar 2015

Some small tweaks to the user notes in com_users > users.

The text has become a bit smaller, so I added tooltips to the buttons as well (See last screenshot).

Before patch

skaermbillede 2015-03-02 kl 20 52 09

After patch

skaermbillede 2015-03-02 kl 20 56 52

skaermbillede 2015-03-02 kl 21 03 54

avatar losedk losedk - open - 2 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 2 Mar 2015
Labels Added: ?
avatar dgt41
dgt41 - comment - 2 Mar 2015

nice :+1:

dd7a7bd 2 Mar 2015 avatar peterlose CS
avatar losedk
losedk - comment - 2 Mar 2015

@zero-24 Did I do it right?

avatar zero-24
zero-24 - comment - 2 Mar 2015

@losedk i have just comment on CS. That is why Travis fail here:

FILE: ...la/joomla-cms/administrator/components/com_users/helpers/html/users.php
--------------------------------------------------------------------------------
FOUND 4 ERROR(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
  58 | ERROR | Concat operator must be preceeded by one space
  58 | ERROR | Concat operator must be followed by one space
 112 | ERROR | Concat operator must be preceeded by one space
 112 | ERROR | Concat operator must be followed by one space
------------------------------------------------------------------------------
avatar zero-24
zero-24 - comment - 2 Mar 2015

hehe you are quite fast :smile:

Did I do it right?

Looks good to me. :+1: Will test now.

avatar zero-24
zero-24 - comment - 2 Mar 2015

Works great! Thanks @losedk

@dgt41 have you tested it?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6264.
avatar zero-24 zero-24 - test_item - 2 Mar 2015 - Tested successfully
avatar dgt41
dgt41 - comment - 2 Mar 2015

@test OK
May I suggest tthis little change:

<div class="btn-group" data-toggle="buttons-radio">

instead of the simple <div> at the beginning of this block, will render like this:
screen shot 2015-03-02 at 10 51 10

avatar dgt41
dgt41 - comment - 2 Mar 2015

Obviously without the data-toggle="buttons-radio"

avatar losedk
losedk - comment - 2 Mar 2015

@dgt41 Done. Had to add a div to the title as well, so it breaks correctly

avatar dgt41
dgt41 - comment - 2 Mar 2015

I am afraid my suggestion breaks the mobile view.
Sorry about that, I should have checked that before suggesting it!
Maybe just icons (no text) and their own column is a better (?) way for this?
This will render to something more familiar e.g. like in articles:
screen shot 2015-03-02 at 11 26 27

avatar losedk
losedk - comment - 2 Mar 2015

@dgt41 I have added hidden-phone to the text elements

skaermbillede 2015-03-02 kl 22 34 36

avatar dgt41
dgt41 - comment - 2 Mar 2015

Nice work around! :+1:

avatar dgt41
dgt41 - comment - 2 Mar 2015

@test success
screen shot 2015-03-02 at 11 35 56

avatar brianteeman
brianteeman - comment - 2 Mar 2015

Based purely on the screenshot there appears to be a double line between
the first two icons

On 2 March 2015 at 21:36, Dimitris Grammatiko notifications@github.com
wrote:

@test https://github.com/test success
[image: screen shot 2015-03-02 at 11 35 56]
https://cloud.githubusercontent.com/assets/3889375/6451111/f3177f80-c134-11e4-801b-0b47867d96eb.png


Reply to this email directly or view it on GitHub
#6264 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar zero-24 zero-24 - alter_testresult - 2 Mar 2015 - dgt41: Tested successfully
avatar losedk
losedk - comment - 2 Mar 2015

@brianteeman Yeah see it. It's because of the modal

<div id="userModal_471" tabindex="-1" class="modal hide fade">

I'm not quite sure how to fix that. @dgt41 any ideas?

avatar dgt41
dgt41 - comment - 2 Mar 2015

Propper solution:
views/users/tmpl/default.php

                            <div class="btn-group">
                                <?php echo JHtml::_('users.filterNotes', $item->note_count, $item->id); ?>
                                <?php echo JHtml::_('users.notes', $item->note_count, $item->id); ?>
                                <?php echo JHtml::_('users.addNote', $item->id); ?>
                                <?php if ($item->requireReset == '1') : ?>
                                <span class="label label-warning"><?php echo JText::_('COM_USERS_PASSWORD_RESET_REQUIRED'); ?></span>
                                <?php endif; ?>
                            </div>
                            <?php echo JHtml::_('users.notesModal', $item->note_count, $item->id); ?>

administrator/components/com_users/helpers/html/users.php
Replace function notes with:

    /**
     * Displays a note icon.
     *
     * @param   integer  $count   The number of notes for the user
     * @param   integer  $userId  The user ID
     *
     * @return  string  A link to a modal window with the user notes
     *
     * @since   2.5
     */
    public static function notes($count, $userId)
    {
        if (empty($count))
        {
            return '';
        }

        $title = JText::plural('COM_USERS_N_USER_NOTES', $count);

        return '<a href="#userModal_' . (int) $userId . '" id="modal-' . (int) $userId . '" data-toggle="modal" class="hasTooltip btn btn-mini" title="' . $title . '">'
            . '<i class="icon-drawer-2"></i><span class="hidden-phone">' . $title . '</span></a>';
    }

    /**
     * Renders the modal html.
     *
     * @param   integer  $count   The number of notes for the user
     * @param   integer  $userId  The user ID
     *
     * @return  null
     *
     * @since   3.4.1
     */
    public static function notesModal($count, $userId)
    {
        if (empty($count))
        {
            return '';
        }

        $title = JText::plural('COM_USERS_N_USER_NOTES', $count);

        echo JHtmlBootstrap::renderModal(
            'userModal_' . (int) $userId, array(
                'url' => JRoute::_('index.php?option=com_users&view=notes&tmpl=component&layout=modal&u_id=' . (int) $userId),
                'title' => $title,
                'width' => '800px',
                'height' => '500px')
        );

        return null;
    }
avatar brianteeman brianteeman - change - 2 Mar 2015
Category Templates (admin) UI/UX
178a20c 2 Mar 2015 avatar peterlose CS
avatar losedk
losedk - comment - 2 Mar 2015

@dgt41 Thanks a lot! :)

avatar dgt41
dgt41 - comment - 2 Mar 2015

@test success

avatar losedk
losedk - comment - 2 Mar 2015

@zero-24 Could you test again? :)

avatar zero-24 zero-24 - change - 2 Mar 2015
Status Pending Ready to Commit
Easy No Yes
avatar zero-24
zero-24 - comment - 3 Mar 2015

@test still successful. good work @losedk and @dgt41! -> RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6264.
avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2015
Labels Added: ?
avatar losedk
losedk - comment - 5 Mar 2015

Just added a small tweak. Moved the below mentioned outside the btn-group

<?php if ($item->requireReset == '1') : ?>
<span class="label label-warning"><?php echo JText::_('COM_USERS_PASSWORD_RESET_REQUIRED'); ?></span>
<?php endif; ?> 
avatar losedk
losedk - comment - 5 Mar 2015

@dgt41 Done

avatar dgt41
dgt41 - comment - 5 Mar 2015

:+1:

avatar losedk
losedk - comment - 8 Mar 2015

I don't why this fails?

avatar mbabker
mbabker - comment - 8 Mar 2015

There was a bad update to one of the PEAR service provider packages in the last few days. We changed our code to not rely on it but branches without that change will fail until the provider fixes the issue.

avatar losedk
losedk - comment - 8 Mar 2015

@mbabker thanks for the clarification

avatar losedk
losedk - comment - 8 Mar 2015

All green again :)

avatar losedk
losedk - comment - 12 Mar 2015

@zero-24 should this be tested again? Or is it still RTC?

avatar zero-24
zero-24 - comment - 12 Mar 2015

just tested and it is still RTC here :smile: thanks!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6264.
avatar phproberto phproberto - close - 13 Mar 2015
avatar zero-24 zero-24 - close - 13 Mar 2015
avatar phproberto phproberto - change - 13 Mar 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-03-13 09:49:12
avatar phproberto phproberto - close - 13 Mar 2015
avatar phproberto
phproberto - comment - 13 Mar 2015

Merged. Thanks!

avatar losedk losedk - head_ref_deleted - 13 Mar 2015
avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment