<table border="0" width="100%">
  <tr>
    <td valign="top">
	 <b>&nbsp;{$page_title} <i>{$project_name}</i></b>
	  <!-- Add a new field -->
	 <p>
	  <a href={$add_new_field_url}>{$STRING.add_new_field_msg}</a>
	 </p> 
      <hr size="1">
			<!-- List of parent fields or configure an existing field -->
			<table border="0" cellpadding="2" cellspacing="1" width="100%">
				<tr>
					<TH></TH>
					<th class="{$headers.field_conf_id.class}"><a href="{$headers.field_conf_id.url}">{$STRING.FIELD_CONF.Title.field_conf_id}</a></th>
					<th class="{$headers.title.class}"><a href="{$headers.title.url}">{$STRING.FIELD_CONF.Title.title}</a></th>
					<th class="{$headers.field_type_title.class}"><a href="{$headers.field_type_title.url}">{$STRING.FIELD_CONF.Title.field_type_title}</a></th>
					<th class="{$headers.description.class}"><a href="{$headers.description.url}">{$STRING.FIELD_CONF.Title.description}</a></th>
					<th class="{$headers.default_value.class}"><a href="{$headers.default_value.url}">{$STRING.FIELD_CONF.Title.default_value}</a></th>
					<th class="{$headers.edit_order.class}"><a href="{$headers.edit_order.url}">{$STRING.FIELD_CONF.Title.edit_order}</a></th>
					<th class="{$headers.list_order.class}"><a href="{$headers.list_order.url}">{$STRING.FIELD_CONF.Title.list_order}</a></th>
					<th class="{$headers.properties.class}"><a href="{$headers.properties.url}">{$STRING.FIELD_CONF.Title.properties}</a></th>
					<th class="{$headers.created_by.class}"><a href="{$headers.created_by.url}">{$STRING.FIELD_CONF.Title.created_by}</a></th>
					<th class="{$headers.created_date.class}"><a href="{$headers.created_date.url}">{$STRING.FIELD_CONF.Title.created_date}</a></th>
					<th class="{$headers.last_modified_by.class}"><a href="{$headers.last_modified_by.url}">{$STRING.FIELD_CONF.Title.last_modified_by}</a></th>
					<th class="{$headers.last_modified_date.class}"><a href="{$headers.last_modified_date.url}">{$STRING.FIELD_CONF.Title.last_modified_date}</a></th>
				</tr>
				{section name=field loop=$fields}
					<!-- <tr{if $smarty.section.field.iteration is even} class="alt"{/if} title="{$fields[field].description}"> -->
					<tr{if $smarty.section.field.iteration is even} class="alt"{/if}">
					
						<!--
						<td>{if $perm->have_perm('AdminProject') or $perm->have_perm_proj($projects[project].project_id)}<a href="{$smarty.server.PHP_SELF}?op=edit&id={$projects[project].project_id}">{$projects[project].project_name|stripslashes}</a>{else}{$projects[project].project_name|stripslashes}{/if}</td>
						<td align="center">{$projects[project].created_date|date:DATE_FORMAT}</td>
						<td align="center">{if $projects[project].active}Yes{else}No{/if}</td>
						-->
						<td align="center"> </td>
						<td title="{$STRING.FIELD_CONF.Description.field_conf_id}" align="center">{$fields[field].field_conf_id}</td>
						<td title="{$STRING.FIELD_CONF.Description.title}" align="center">
							{if $allowed_to_edit_project_fields or !in_array($fields[field].field_name, $parent_field_names)}
								<a href="project.php?op={$do_edit_fields}&fid={$fields[field].field_conf_id}" title="{$do_edit_fields}">
							{/if}
							
								{$fields[field].title}
								
							{if $allowed_to_edit_project_fields or !in_array($fields[field].field_name, $parent_field_names)}
								</a>
							{/if}
						</td>						
						<td title="{$STRING.FIELD_CONF.Description.field_type_title}" align="center">{$fields[field].field_type_title}</td>
						<td title="{$STRING.FIELD_CONF.Description.description}" align="center">{$fields[field].description}</td>
						<td title="{$STRING.FIELD_CONF.Description.default_value}" align="center">
							{* $fields[field].default_value *}
							{if $fields[field].field_type_title == SELECTBOX_TYPE}
								{$fields[field].default_value|getSelectbox_value}
							{elseif $fields[field].field_type_title == TIMESTAMP_TYPE}
								{$fields[field].default_value|date:DATE_FORMAT}
							{else}
								{$fields[field].default_value}
							{/if}
						</td>
						<td title="{$STRING.FIELD_CONF.Description.edit_order}" align="center">{$fields[field].edit_order}</td>
						<td title="{$STRING.FIELD_CONF.Description.list_order}" align="center">{$fields[field].list_order}</td>
						<td title="{$STRING.FIELD_CONF.Description.properties}" align="left">{$fields[field].properties|MPSubProperty_to_html}</td>
						<td title="{$STRING.FIELD_CONF.Description.created_by}" align="center">{$fields[field]._username1|maskemail}</td> <!-- created_by -->
						<td title="{$STRING.FIELD_CONF.Description.created_date}" align="center">{$fields[field].created_date|date:DATE_FORMAT}</td>
						<td title="{$STRING.FIELD_CONF.Description.last_modified_by}" align="center">{$fields[field]._username2|maskemail}</td> <!-- last_modified_by -->
						<td title="{$STRING.FIELD_CONF.Description.last_modified_date}" align="center">{$fields[field].last_modified_date|date:DATE_FORMAT}</td>
						
					</tr>
				{/section}
				<!--
				<tr>
					<td colspan="3" align="center">
						<br>
  					{$first} - {$last} / {$total}
						<br>
						{if $pages ne "1"}[ {$pages} ]{/if}
  					<br>
					</td>
				</tr>				
				-->
			</table>
				<form action="{$edit_field_url}" METHOD=POST>
					<input type=hidden name="do"  value="{$do_edit_fields}">
					{$STRING.select_a_field_to_edit}&nbsp;&nbsp;&nbsp;{$select_field}&nbsp;&nbsp;<input type=SUBMIT value="OK">
				</form>
				<br>
				<a href="{$back_url}">{$STRING.back}</a>
    </td>
	</tr>
</table>
