Skip to content

Commit

Permalink
Updates styling of tags section in item/edit form to make more usable…
Browse files Browse the repository at this point in the history
…, moves edit button for items/show and collections/show.
  • Loading branch information
Jeremy Boggs committed Oct 24, 2008
1 parent a612307 commit 35a9772
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 32 deletions.
2 changes: 1 addition & 1 deletion admin/themes/default/collections/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<form method="post">
<?php include 'form.php';?>
<p id="form_submits"><button type="submit" name="submit" id="save-changes">Save Changes</button> or <a class="cancel" href="<?php echo uri('collections/show/').$collection->id; ?>">Cancel</a></p>
<input type="submit" name="submit" class="submit submit-medium" id="save-changes" value="Save Changes" />
<p id="delete_link"><a class="delete" href="<?php echo uri('collections/delete/').$collection->id; ?>">Delete This Collection</a></p>
</form>

Expand Down
15 changes: 7 additions & 8 deletions admin/themes/default/collections/show.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?php head(array('title'=>'Collection # '.collection('Id'), 'body_class'=>'collections')); ?>
<?php head(array('title'=>'Collection # '.collection('Id'), 'body_class'=>'collections show')); ?>
<h1>Collection: <?php echo strip_formatting(collection('Name'));?></h1>

<div id="primary">
<div id="collection-info">

<?php if (has_permission('Collections', 'edit')): ?>
<p> <?php echo link_to_collection('Edit', array('class'=>'edit'), 'edit'); ?></p>
<p id="edit"><?php echo link_to_collection('Edit', array('class'=>'edit'), 'edit'); ?></p>
<?php endif; ?>

<h2>Description:</h2> <p><?php echo collection('Description'); ?></p>
<div id="primary">
<div id="collection-info">
<h2>Description</h2>
<p><?php echo collection('Description'); ?></p>

<h2>Collectors:</h2>
<h2>Collectors</h2>
<ul id="collector-list">
<li><?php echo collection('Collectors', array('delimiter'=>'</li><li>')); ?></li>
</ul>
Expand Down
4 changes: 3 additions & 1 deletion admin/themes/default/css/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Grid: 846px wide, 12 columns at 54px each, 11 gutters at 18px each.
.alert {background:#fff09e; font-size:1.2em; padding: 1.5em;}
.tooltip {font-size:1.2em; line-height:1.5em;}

.show #edit {display:inline;margin-bottom:18px;}

/* == Form Components == */
form{overflow:hidden; zoom:1;}
div.field {overflow:hidden; zoom:1; position:relative; border-bottom:1px dotted #eee; padding: 18px 0;}
Expand All @@ -44,7 +46,7 @@ div.field {overflow:hidden; zoom:1; position:relative; border-bottom:1px dotted

.dateinput input {margin-right: 3px;}
/* Replaces tooltips */
.field .explanation {font-size:1.1em; margin-bottom:0;color: #999; margin-left:216px; float:right; clear:right;}
.field .explanation {font-size:1.1em; margin-bottom:0;color: #999; margin-left:216px; float:left; clear:right;}

/* Changes the width of inputs depending on the layout */

Expand Down
27 changes: 22 additions & 5 deletions admin/themes/default/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,13 @@ body {font:62.5% "Lucida Grande",Helvetica, Arial, sans-serif; background:#eae9d

#detailed .append-to-item-detail {clear:both;}
/* Item show styles */
#item-title, .show #edit-item {display:inline;}

.element-text, .element-text-empty {margin-bottom:1.5em; margin-left:18px;font-size:1.2em; line-height:1.5em;}
.element-text *, .element-text-empty * {font-size:1em;}


.item-pagination {margin-top:18px;}

/* Item add-edit styles */
#public-featured {position:absolute; top:36px; right:0; text-align:right;}
#public-featured .checkbox {text-align:right;float:none; overflow:hidden; display:inline;}
Expand All @@ -204,8 +208,18 @@ body {font:62.5% "Lucida Grande",Helvetica, Arial, sans-serif; background:#eae9d

#file-inputs a {float:left;display:block; font-size:1.2em; margin-left: 132px;margin-top:6px;}
#file-inputs input {margin-bottom:6px;}
#delete_item_link {padding: 18px 8px 8px 0;}
#delete_item_link .delete {font-weight:bold;background-position:0 50%;padding-left:36px; color: #900;}

#delete_item_link {padding: 18px 8px 8px 0;}
#delete_item_link .delete {font-weight:bold;background-position:0 50%;padding-left:36px; color: #900;}

#edit-all-tags {float:left; width: 288px;}
#tags-list {line-height: 2em;}
#edit-all-tags li {display:block; float:left; position:relative; border:1px solid #ccc;padding: 2px 8px 2px 24px; margin-bottom: 12px; margin-right: 4px;}
#edit-all-tags input {border-width: 0;padding:0 !important; position:absolute; top: 6px; left:4px;margin:0 !important;}

#edit-your-tags {float:right; width: 252px; padding:18px 18px 0; background: #F2F1E8;}
#edit-your-tags .explanation {font-size:1.1em; color: #777;margin-top:0;}
#edit-your-tags input {border-color: #bbb; margin-bottom:4px;}

/* Advanced Search Form */
.search-entry {margin-bottom:6px; overflow:hidden;zoom:1;}
Expand All @@ -218,9 +232,12 @@ body {font:62.5% "Lucida Grande",Helvetica, Arial, sans-serif; background:#eae9d

/* Collection Browse styles */

/* Item Types */

#add-element-form{ background:#fff;padding:0;}
/* Collection Show styles */
.collections h1 {display:inline;}
.collections #primary {margin-top:18px;}
/* Item Types */
#add-element-form {background:#fff;padding:0;}
#add-element-form h3 {background:#fff;margin:0;padding-bottom:18px;}
#add-element-form .field {border-bottom:1px solid #fff;background:#DDEBEE;}
#add-element-form label {text-indent:18px;}
Expand Down
11 changes: 5 additions & 6 deletions admin/themes/default/items/show.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?php head(array('title' => 'Item # '.item('id'), 'body_class'=>'items primary-secondary')); ?>
<h1 id="title">#<?php echo item('id');?>
<?php head(array('title' => 'Item # '.item('id'), 'body_class'=>'items show primary-secondary')); ?>
<h1 id="item-title">#<?php echo item('id');?>
<?php echo strip_formatting(item('Dublin Core', 'Title')); ?></h1>

<?php if (has_permission('Items', 'edit') or $item->wasAddedBy(current_user())): ?>
<p id="edit-delete">
<?php
echo link_to_item('Edit', array('class'=>'edit'), 'edit'); ?></p>
<p id="edit-item"><?php
echo link_to_item('Edit', array('class'=>'edit'), 'edit'); ?></p>
<?php endif; ?>

<ul class="item-pagination navigation">
Expand Down Expand Up @@ -131,7 +130,7 @@ function imageGallery() {
<ul>
<?php while(loop_files_for_item()): ?>
<?php $file = get_current_file(); ?>
<li><?php echo link_to($file, 'show', h($file->original_filename), array('class'=>'show','title'=>'View File Metadata')); ?></li>
<li><?php echo link_to($file, 'show', htmlentities($file->original_filename), array('class'=>'show','title'=>'View File Metadata')); ?></li>


<?php endwhile; ?>
Expand Down
25 changes: 14 additions & 11 deletions admin/themes/default/items/tag-form.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
<div id="tag-form">
<?php if(has_tags($item) and has_permission('Items','untagOthers')): ?>
<div class="field">
<label for="tags-list">Remove Other Users' Tags</label>
<div id="edit-all-tags">
<ul id="tags-list">

<?php foreach( $item->Tags as $key => $tag ): ?>
<li>

<li class="tag-delete">
<input type="image" src="<?php echo img('delete.gif'); ?>" name="remove_tag" value="<?php echo h($tag->id); ?>" />
<?php echo h($tag->name); ?>
<?php echo htmlentities($tag->name); ?>
</li>

<?php endforeach; ?>

</ul>
</div>
</div>
<?php endif; ?>

<div class="field">
<label for="tags-field">Your Tags</label>
<p>Separate tags with commas (lorem,ipsum,dolor sit,amet).</p>
<div class="inputs">
<input type="text" name="tags" size="30" id="tags-field" class="textinput" value="<?php echo not_empty_or($_POST['tags'], tag_string(current_user_tags($item))); ?>" />
</div>
<div id="edit-your-tags">
<h3>Your Tags</h3>
<input type="text" name="tags" size="30" id="tags-field" class="textinput" value="<?php echo not_empty_or($_POST['tags'], tag_string(current_user_tags($item))); ?>" />
<p class="explanation">Separate tags with commas (lorem, ipsum, dolor sit, amet).</p>
</div>

<?php fire_plugin_hook('append_to_item_form_tags', $item); // Deprecated in 0.10 ?>
Expand Down

0 comments on commit 35a9772

Please sign in to comment.