Skip to content

Commit

Permalink
# [#23085] Improved UI for Article/Category permissions. Thanks Andrea.
Browse files Browse the repository at this point in the history
git-svn-id: http://joomlacode.org/svn/joomla/development/trunk@19316 6f6e1ebd-4c2b-0410-823f-f34bde69bce9
  • Loading branch information
Jean-Marie Simonet committed Nov 1, 2010
1 parent 098d770 commit 57c5180
Show file tree
Hide file tree
Showing 14 changed files with 164 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@
value="-2">
JTRASHED</option>
</field>

<field
name="buttonspacer"
label="JGLOBAL_ACTION_PERMISSIONS_LABEL"
description="JGLOBAL_ACTION_PERMISSIONS_DESCRIPTION"
type="spacer" />
<field
name="checked_out"
type="hidden"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,18 @@
<?php echo $this->form->getInput('published'); ?></li>

<li><?php echo $this->form->getLabel('access'); ?>
<?php echo $this->form->getInput('access'); ?></li>

<?php echo $this->form->getInput('access'); ?></li>

<li><span class="faux-label"><?php echo JText::_('JGLOBAL_ACTION_PERMISSIONS_LABEL'); ?></span>
<div class="button2-left"><div class="blank">
<button type="button" onclick="document.location.href='#access-rules';">
<?php echo JText::_('JGLOBAL_PERMISSIONS_ANCHOR'); ?></button>
</div></div>
</li>

<li><?php echo $this->form->getLabel('language'); ?>
<?php echo $this->form->getInput('language'); ?></li>

<li><?php echo $this->form->getLabel('id'); ?>
<?php echo $this->form->getInput('id'); ?></li>
</ul>
Expand All @@ -70,22 +77,30 @@

<div class="width-40 fltrt">

<?php echo JHtml::_('sliders.start','plugin-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.start','categories-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo $this->loadTemplate('options'); ?>
<div class="clr"></div>

<?php echo JHtml::_('sliders.panel',JText::_('COM_CATEGORIES_FIELDSET_RULES'), 'meta-rules'); ?>
<fieldset>
<?php echo $this->form->getLabel('rules'); ?>
<?php echo $this->form->getInput('rules'); ?>
</fieldset>

<?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'meta-options'); ?>
<fieldset class="panelform">
<?php echo $this->loadTemplate('metadata'); ?>
</fieldset>

<?php echo JHtml::_('sliders.end'); ?>
</div>
<div class="clr"></div>
<div class="width-100 fltlft">

<?php echo JHtml::_('sliders.start','permissions-sliders-'.$this->item->id, array('useCookie'=>1)); ?>

<?php echo JHtml::_('sliders.panel',JText::_('COM_CATEGORIES_FIELDSET_RULES'), 'access-rules'); ?>
<fieldset class="panelform">
<?php echo $this->form->getLabel('rules'); ?>
<?php echo $this->form->getInput('rules'); ?>
</fieldset>

<?php echo JHtml::_('sliders.end'); ?>

<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
class="inputbox" required="true"
>
</field>

<field
name="buttonspacer"
description="JGLOBAL_ACTION_PERMISSIONS_DESCRIPTION"
type="spacer" />
<field name="created" type="calendar" label="COM_CONTENT_FIELD_CREATED_LABEL"
description="COM_CONTENT_FIELD_CREATED_DESC" class="inputbox" size="20"
format="%Y-%m-%d %H:%M:%S" filter="user_utc" />
Expand Down
45 changes: 30 additions & 15 deletions administrator/components/com_content/views/article/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
<li><?php echo $this->form->getLabel('access'); ?>
<?php echo $this->form->getInput('access'); ?></li>

<li><span class="faux-label"><?php echo JText::_('JGLOBAL_ACTION_PERMISSIONS_LABEL'); ?></span>
<div class="button2-left"><div class="blank">
<button type="button" onclick="document.location.href='#access-rules';">
<?php echo JText::_('JGLOBAL_PERMISSIONS_ANCHOR'); ?></button>
</div></div>
</li>
<li><?php echo $this->form->getLabel('language'); ?>
<?php echo $this->form->getInput('language'); ?></li>

Expand All @@ -61,12 +67,12 @@
<li><?php echo $this->form->getLabel('id'); ?>
<?php echo $this->form->getInput('id'); ?></li>
</ul>
<div class="clr"></div>
<?php echo $this->form->getLabel('articletext'); ?>
<div class="clr"></div>
<?php echo $this->form->getInput('articletext'); ?>
</fieldset>
</div>
<div class="clr"></div>
<?php echo $this->form->getLabel('articletext'); ?>
<div class="clr"></div>
<?php echo $this->form->getInput('articletext'); ?>
</fieldset>
</div>

<div class="width-40 fltrt">
<?php echo JHtml::_('sliders.start','content-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
Expand All @@ -75,6 +81,7 @@

<fieldset class="panelform">
<ul class="adminformlist">

<li><?php echo $this->form->getLabel('created_by'); ?>
<?php echo $this->form->getInput('created_by'); ?></li>

Expand Down Expand Up @@ -119,21 +126,29 @@
</fieldset>
<?php endforeach; ?>

<?php echo JHtml::_('sliders.panel',JText::_('COM_CONTENT_FIELDSET_RULES'), 'access-rules'); ?>
<fieldset class="panelform">
<?php echo $this->form->getLabel('rules'); ?>
<?php echo $this->form->getInput('rules'); ?>
</fieldset>

<?php echo JHtml::_('sliders.panel',JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS'), 'meta-options'); ?>
<fieldset class="panelform">
<?php echo $this->loadTemplate('metadata'); ?>
</fieldset>


</div>
<?php echo JHtml::_('sliders.end'); ?>
</div>
<div class="clr"></div>
<div class="width-100 fltlft">
<?php echo JHtml::_('sliders.start','permissions-sliders-'.$this->item->id, array('useCookie'=>1)); ?>
<?php echo JHtml::_('sliders.panel',JText::_('COM_CONTENT_FIELDSET_RULES'), 'access-rules'); ?>

<fieldset class="panelform">
<?php echo $this->form->getLabel('rules'); ?>
<?php echo $this->form->getInput('rules'); ?>
</fieldset>

<?php echo JHtml::_('sliders.end'); ?>
</div>
<input type="hidden" name="task" value="" />
<input type="hidden" name="return" value="<?php echo JRequest::getCmd('return');?>" />
<?php echo JHtml::_('form.token'); ?>
</div>

</form>
<div class="clr"></div>

4 changes: 3 additions & 1 deletion administrator/language/en-GB/en-GB.ini
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,9 @@ JFIELD_SPACER_LABEL="<span style="_QQ_"width:auto"_QQ_"><hr /></span>"
JFIELD_TITLE_DESC="Title"
JFIELD_XREFERENCE_DESC="An optional field to allow this record to be cross-referenced to an external data system if required."
JFIELD_XREFERENCE_LABEL="External Reference"

JGLOBAL_ACROSS="Across"
JGLOBAL_ACTION_PERMISSIONS_LABEL="Permissions"
JGLOBAL_ACTION_PERMISSIONS_DESCRIPTION="Set the action permissions for this asset"
JGLOBAL_ALL_ARTICLE="Max Levels Articles"
JGLOBAL_ALL_LIST="Max Levels as List"
JGLOBAL_ALLOW_COMMENTS_DESC="If Yes, viewers will be able to add and view comments for the article."
Expand Down Expand Up @@ -392,6 +393,7 @@ JGLOBAL_PAGINATION_LABEL="Pagination"
JGLOBAL_PAGINATION_RESULTS_DESC="Show or hide pagination results information, for example, &quot;Page 1 of 4&quot;."
JGLOBAL_PAGINATION_RESULTS_LABEL="Pagination Results"
JGLOBAL_PASSWORD="Password"
JGLOBAL_PERMISSIONS_ANCHOR="Set Permissions"
JGLOBAL_PREVIEW="Preview"
JGLOBAL_RECORD_NUMBER="Record ID: %d"
JGLOBAL_REMEMBER_ME="Remember Me"
Expand Down
3 changes: 3 additions & 0 deletions administrator/language/xx-XX/xx-XX.ini
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ JFIELD_XREFERENCE_DESC="An optional field to allow this record to be cross-refer
JFIELD_XREFERENCE_LABEL="External Reference"

JGLOBAL_ACROSS="Across"
JGLOBAL_ACTION_PERMISSIONS_LABEL="Permissions"
JGLOBAL_ACTION_PERMISSIONS_DESCRIPTION="Set the action permissions for this asset"
JGLOBAL_ALL_ARTICLE="Max Levels Articles"
JGLOBAL_ALL_LIST="Max Levels as List"
JGLOBAL_ALLOW_COMMENTS_DESC="If Yes, viewers will be able to add and view comments for the article."
Expand Down Expand Up @@ -391,6 +393,7 @@ JGLOBAL_PAGINATION_LABEL="Pagination"
JGLOBAL_PAGINATION_RESULTS_DESC="Show or hide pagination results information, for example, &quot;Page 1 of 4&quot;."
JGLOBAL_PAGINATION_RESULTS_LABEL="Pagination Results"
JGLOBAL_PASSWORD="Password"
JGLOBAL_PERMISSIONS_ANCHOR="Set Permissions"
JGLOBAL_PREVIEW="Preview"
JGLOBAL_RECORD_NUMBER="Record ID: %d"
JGLOBAL_REMEMBER_ME="Remember Me"
Expand Down
40 changes: 31 additions & 9 deletions administrator/templates/bluestork/css/template.css
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,8 @@ dl#content-pane.tabs {
margin: 1px 0 0 0;
}

div.current label {
div.current label,
div.current span.faux-label {
display: block;
min-width: 150px;
float: left;
Expand Down Expand Up @@ -813,7 +814,8 @@ ul.adminformlist li {
list-style: none;
}

fieldset label {
fieldset label,
fieldset span.faux-label {
float: left;
clear: left;
display:block;
Expand All @@ -824,7 +826,8 @@ fieldset ul {
padding: 0;
}

form label {
form label,
form span.faux-label {
font-size: 1.091em;
}

Expand Down Expand Up @@ -1025,21 +1028,24 @@ button.jform-rightbtn {
}

/* Field label widths - long label */
fieldset.adminform.long label {
fieldset.adminform.long label,
fieldset.adminform.long span.faux-label {
min-width: 180px;
}
fieldset.adminform.long input { }

/* Field label widths - short label */
fieldset.adminform label {
fieldset.adminform label,
fieldset.adminform span.faux-label {
width: 135px;
}

fieldset.panelform {
overflow: hidden;
}
fieldset.panelform label,
fieldset.panelform div.paramrow label {
fieldset.panelform div.paramrow label,
fieldset.panelform span.faux-label {
min-width: 145px;
max-width: 145px;
}
Expand Down Expand Up @@ -1604,8 +1610,9 @@ a.saveorder.inactive {
}

.button2-left a,
.button2-left button,
.button2-right a,
.button2-left button,
.button2-right button,
.button2-left span,
.button2-right span {
display: block;
Expand All @@ -1630,6 +1637,7 @@ a.saveorder.inactive {
.button2-right .blank a,
.button2-left .blank span,
.button2-right .blank span,
.button2-left .blank button,
.button2-right .blank button {
padding: 0 6px;
}
Expand All @@ -1641,18 +1649,21 @@ a.saveorder.inactive {

.button2-left a:hover,
.button2-right a:hover,
.button2-left button:hover,
.button2-left button:hover {
text-decoration: none;
color: #0B55C4;
}

.button2-left a,
.button2-left span {
.button2-left span,
.button2-left button {
padding: 0 24px 0 6px;
}

.button2-right a,
.button2-right span {
.button2-right span,
.button2-right button {
padding: 0 6px 0 24px;
}

Expand Down Expand Up @@ -1701,6 +1712,17 @@ button:hover {
border: 1px solid #aaa;
}

div.button2-left button {
background: transparent;
margin-top: 0;
border: 0 solid #ccc;
}

div.button2-left button {
background: transparent;
border: 0 solid #aaa;
}


/* -- TOOLTIP STYLES ----------------------------- */
.tip {
Expand Down
6 changes: 4 additions & 2 deletions administrator/templates/bluestork/css/template_rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ select#lang {
margin: 0 20px 0 0;
clear:left;
}
fieldset label {
fieldset label,
fieldset span.faux-label {
float: right;
clear: right;
}
Expand Down Expand Up @@ -506,7 +507,8 @@ margin:3px 2px 0 2px;

/* Additional RTL fixes for forms */

div.current label {
div.current label,
div.current span.faux-label {
float: right;
clear: none;
clear: right;
Expand Down
11 changes: 8 additions & 3 deletions administrator/templates/hathor/css/template.css
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,14 @@ div.main-section {
}

div.options-section {
width: 40%;
width: 39%;
margin-top: 10px;
}

div.rules-section {
width: 98%;
margin: 10px;
}
/**
* Form Styles
*/
Expand Down Expand Up @@ -2945,8 +2950,8 @@ fieldset.panelform fieldset.radio span.faux-label {
}


fieldset.adminform input, fieldset.adminform span.faux-input, fieldset.adminform textarea, fieldset.adminform select, fieldset.adminform img,
fieldset.panelform input, fieldset.panelform span.faux-input, fieldset.panelform textarea, fieldset.panelform select, fieldset.panelform img {
fieldset.adminform input, fieldset.adminform span.faux-input, fieldset.adminform textarea, fieldset.adminform select, fieldset.adminform img, fieldset.adminform button,
fieldset.panelform input, fieldset.panelform span.faux-input, fieldset.panelform textarea, fieldset.panelform select, fieldset.panelform img, fieldset.panelform button {
float:left;
margin:5px 5px 5px 0;
width:auto;
Expand Down
4 changes: 2 additions & 2 deletions administrator/templates/hathor/css/template_rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,8 @@ fieldset.panelform fieldset.radio span.faux-label {
}


fieldset.adminform input, fieldset.adminform span.faux-input, fieldset.adminform textarea, fieldset.adminform select, fieldset.adminform img,
fieldset.panelform input, fieldset.panelform span.faux-input, fieldset.panelform textarea, fieldset.panelform select, fieldset.panelform img {
fieldset.adminform input, fieldset.adminform span.faux-input, fieldset.adminform textarea, fieldset.adminform select, fieldset.adminform img, fieldset.adminform button,
fieldset.panelform input, fieldset.panelform span.faux-input, fieldset.panelform textarea, fieldset.panelform select, fieldset.panelform img, fieldset.panelform button {
float:right;
margin:5px 0 5px 5px;
}
Expand Down
Loading

0 comments on commit 57c5180

Please sign in to comment.