NIHVIVO-1316: Added add/edit/delete functionality to object properties in individual pages.

This commit is contained in:
mb863 2011-01-11 19:58:13 +00:00
parent c02c26a393
commit d61a526542
6 changed files with 20 additions and 4 deletions

View file

@ -369,3 +369,18 @@ article.property ul.subclass-property-list li{
font-size: 0.8em; font-size: 0.8em;
background: #f4f4f4; background: #f4f4f4;
} }
/* EDITING DISPLAY------> */
.add-individual{
vertical-align: middle;
margin-left: 2px;
}
.edit-individual{
border-left: 1px dotted #B2D15A;
margin-left: 10px;
padding-left: 8px;
padding-right: 1px;
vertical-align: text-top;
}
.delete-individual{
vertical-align: text-top;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

View file

@ -24,7 +24,7 @@
<#list group.properties as property> <#list group.properties as property>
<article class="property" role="article"> <article class="property" role="article">
<#-- Property display name --> <#-- Property display name -->
<h3>${property.name}</h3> <@p.addLink property showEditingLinks /> <h3>${property.name} <@p.addLink property showEditingLinks /></h3>
<#-- List the statements for each property --> <#-- List the statements for each property -->
<ul class="property-list" role="list"> <ul class="property-list" role="list">

View file

@ -36,7 +36,7 @@
<#if showEditingLinks> <#if showEditingLinks>
<#local url = property.addUrl> <#local url = property.addUrl>
<#if url?has_content> <#if url?has_content>
<a href="${url}">add</a> <a href="${url}"><img class="add-individual" src="${urls.images}/individual/addIcon.gif" alt="add relationship" /></a>
</#if> </#if>
</#if> </#if>
</#macro> </#macro>
@ -44,6 +44,7 @@
<#macro propertyListItem statement showEditingLinks> <#macro propertyListItem statement showEditingLinks>
<li role="listitem"> <li role="listitem">
<#nested> <#nested>
<@editingLinks statement showEditingLinks /> <@editingLinks statement showEditingLinks />
</li> </li>
</#macro> </#macro>
@ -58,13 +59,13 @@
<#macro editLink statement> <#macro editLink statement>
<#local url = statement.editUrl> <#local url = statement.editUrl>
<#if url?has_content> <#if url?has_content>
<a href="${url}">edit</a> <a href="${url}"><img class="edit-individual" src="${urls.images}/individual/editIcon.gif" alt="change this relationship" /></a>
</#if> </#if>
</#macro> </#macro>
<#macro deleteLink statement> <#macro deleteLink statement>
<#local url = statement.deleteUrl> <#local url = statement.deleteUrl>
<#if url?has_content> <#if url?has_content>
<a href="${url}">delete</a> <a href="${url}"><img class="delete-individual" src="${urls.images}/individual/deleteIcon.gif" alt="delete this relationship" /></a>
</#if> </#if>
</#macro> </#macro>