Commit ab3ba542 authored by Gerd Schachtschneider's avatar Gerd Schachtschneider
Browse files

add license.txt

parent 4582d3d6
<?php
class tables_view_favorit {
// check login & editieren nicht erlaubt
function getPermissions($record) {
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
return Dataface_PermissionsTool::getRolePermissions('READ ONLY');
}
// table read only
function getRoles(&$record) {
return 'READ ONLY';
}
function reiter__renderCell( &$record ) {
$table = $record->strval('reiter');
return '<a href="'.DATAFACE_SITE_HREF.'?-table='.$table.'">'.$table.'</a>';
}
function block__after_result_list_content() {
$url = DATAFACE_SITE_HREF."?-table=list_reiter&-action=list";
echo 'Zum hinzuf&uuml;gen setze Checkbox Favorit in der gew&uuml;nschten Tabelle <a href='.$url.'>list_reiter</a>';
}
function autoID__renderCell(&$record) {
$table = 'list_reiter';
$action = 'edit';
$field = 'autoID';
$tabID = $record->val($field);
$name = $tabID;
$url = DATAFACE_SITE_HREF."?-table=${table}&-action=${action}&${field}=${tabID}";
return '<div style="text-align:left;"><a href="'.$url.'">'.$name.'</a></div>';
}
}
?>
<?php
class tables_view_reiter {
// check login & editieren nicht erlaubt
function getPermissions($record)
{
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
return Dataface_PermissionsTool::getRolePermissions('READ ONLY');
}
}
?>
[forgot_password]
;; entspricht disabled
[manage]
;; entspricht disabled
[my_profile]
;; entspricht disabled
[change_password]
;; entspricht disabled
[rss]
;; entspricht disabled
[record_rss > rss]
;; entspricht disabled
[related_rss]
;; entspricht disabled
[export_xml]
;; entspricht disabled
[view_xml]
;; entspricht disabled
[related_xml > export_xml]
;; entspricht disabled
[xml_list]
;; entspricht disabled
[printable_report]
icon="{$site_url}/images/printer.png"
category=result_list_actions
description="See this product list in a printable format"
url="{$app->url('-action=printable_report')}"
;; # bestimmte Tabellen nur
;; condition="$query['-table'] == 'mpi_kosten'"
;; # nur admin darf drucken
;; permission=reports
<link rel="stylesheet" type="text/css" href="styles.css"/>
<link rel="stylesheet" type="text/css" href="custom.css"/>
[kategorie]
__sql__ = "SELECT kategorie FROM list_katReiter ORDER BY kategorie"
<?php
class tables_view_reiter {
// check login & editieren nicht erlaubt
function getPermissions($record)
{
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
return Dataface_PermissionsTool::getRolePermissions('READ ONLY');
}
}
?>
{if $section.field.description}<div class="formHelp">{$section.field.description|escape}</div>{/if}
{block name="before_quickform_table"}
{if $section.field.display_style=='inline'}
{assign var="table_tag" value="span"}
{assign var="tr_tag" value="span"}
{assign var="td_tag" value="span"}
{assign var="th_tag" value="span"}
{assign var="thead_tag" value="span"}
{assign var="tbody_tag" value="span"}
{else}
{assign var="table_tag" value="table"}
{assign var="tr_tag" value="tr"}
{assign var="td_tag" value="td"}
{assign var="th_tag" value="th"}
{assign var="thead_tag" value="thead"}
{assign var="tbody_tag" value="tbody"}
{/if}
<{$table_tag} width="100%" class="Dataface_QuickForm-table-wrapper xf-form-group {if $section.field.display_style=='inline'}xf-form-group-inline{/if} " data-xf-record-id="{$form_record_id|escape}">
{*
#03 - Inner elements loop
--------------------------
Now we go through each element in this section and render
it.
*}
{foreach from=$elements item=element}
{*
#04 - Render Element
------------------------------
This section is used to render an element to be displayed.
*}
{block name="before_`$element.field.name`_row" table=$element.field.tablename}
{define_slot name="`$element.field.name`_row" table=$element.field.tablename}
<{$tr_tag} id="{$element.field.name}_form_row">
{if $element.field.widget.template}
<{$td_tag} colspan="2">{include file=$element.field.widget.template element=$element}</{$td_tag}>
{else}
<{$td_tag} {if $element.field.display == 'block'}colspan="2" class="Dataface_QuickForm-textarea-label-cell Dataface_QuickForm-block-label-cell"{/if} valign="top" {if $element.field.display != 'block'}align="right" class="Dataface_QuickForm-label-cell {$element.field.tablename} {$element.field.relationship}"{/if}>
<div class="field {if $element.error}error{/if}" id="{$element.field.tablename}-{$element.field.name}-label-wrapper">
<label>
{if $element.field.label_link or $element.field.label_click}
<a href="{if $element.field.label_link}{$element.field.label_link|escape}{else}#{/if}" target="_blank" {if $element.field.label_click}onclick="{$element.field.label_click|escape}" {/if}class="field-label-link no-link-icon">
{/if}{$element.field.widget.label}{if $element.field.label_link or $element.field.label_click}</a>
{/if}
</label>
{if $element.required}
<span style="color: #ff0000" class="fieldRequired" title="required">&nbsp;</span>
{/if}
{if $element.field.display != 'block'}
</div>
</{$td_tag}>
<{$td_tag} class="Dataface_QuickForm-widget-cell {$element.field.tablename} {$element.field.relationship} {if $isText} Dataface_QuickForm-textarea-widget-cell{/if}">
<div class="field {if $element.error}error{/if}" id="{$element.field.tablename}-{$element.field.name}-wrapper">
{/if}
{if $element.error}
<div class="fieldError" style="color: #ff0000">{$element.error}</div>
{/if}
{if $element.field.display == 'block'}{if !$element.frozen}
<div class="formHelp">{$element.field.widget.description}</div>
{else}
<div class="formHelp">{$element.field.widget.frozen_description}</div>
{/if}
{/if}
{if $element.properties.preview}
<div id="{$element.field.tablename}-{$element.field.name}-preview">
{define_slot name="`$element.field.name`_preview_image" src=$element.properties.image_preview}
{if $element.properties.image_preview}
<img src="{$element.properties.image_preview}" style="display: block; max-height: 200px" alt="{$element.field.name} preview image"/>
{/if}
{/define_slot}
<script type="text/javascript" language="javascript">
require(DATAFACE_URL+'/js/delete_file.js');
</script>
{define_slot name="`$element.field.name`_preview_link" src=$element.properties.preview}<a href="{$element.properties.preview}" target="_blank">{translate id="scripts.GLOBAL.MESSAGE_VIEW_FIELD_CONTENT"}View Field Content in new Window{/translate}</a>{/define_slot}
{define_slot name="`$element.field.name`_delete_link"}<a class="delete-file-link" href="#" title="Delete this file" onclick="Xataface.deleteFile('{$element.properties.record_url}', '{$element.field.Field}', '{$element.field.tablename}-{$element.field.name}-preview');return false;"><img src="{$ENV.DATAFACE_URL}/images/delete.gif" alt="Delete"/></a>{/define_slot}
</div>
{/if}
<div>
{if $element.field.widget.question}
<div class="formHelp">{$element.field.widget.question}</div>
{/if}
{define_slot name="`$element.field.name`_widget" table=$element.field.tablename}
{block name="before_`$element.field.name`_widget" table=$element.field.tablename}
{if $element.html}
{if $element.type == 'submit'}
{define_slot name="before_submit_button"}{/define_slot}
{/if}
{$element.html}
{elseif $element.elements}
{if $element.field.widget.layout == 'table'}
<fieldset>
<legend>
{if $element.field.label_link or $element.field.label_click}<a href="{if $element.field.label_link}{$element.field.label_link|escape}{else}#{/if}" target="_blank" {if $element.field.label_click}onclick="{$element.field.label_click}"{/if} class="field-label-link no-link-icon">{/if}
{$element.field.widget.label}
{if $element.field.label_link or $element.field.label_click}</a>{/if}
</legend>
<table>
{foreach from=$element.elements item=groupel name=grouploop}
<tr>
<td align="right" valign="top" class="Dataface_QuickForm-label-cell">
<div class="field {if $groupel.error}error{/if} id="{$element.field.tablename}-{$element.field.name}-{$groupel.field.name}-label-wrapper">
<label>
{if $groupel.field.label_link or $groupel.field.label_click}<a href="{if $groupel.field.label_link}{$groupel.field.label_link|escape}{else}#{/if}" target="_blank" {if $groupel.field.label_click}onclick="{$groupel.field.label_click|escape}"{/if} class="field-label-link no-link-icon">{/if}
{$groupel.field.widget.label}
{if $groupel.field.label_link or $groupel.field.label_click}</a>{/if}
</label>
{if $groupel.required}
<span style="color: #ff0000" class="fieldRequired" title="required">&nbsp;</span>
{/if}
</div>
</td>
<td class="Dataface_QuickForm-widget-cell">
<div class="field {if $groupel.error}error{/if} id="{$element.field.tablename}-{$element.field.name}-{$groupel.field.name}-wrapper">
{if $groupel.error}
<div class="fieldError" style="color: #ff0000">{$groupel.error}</div>
{/if}
{if $groupel.type == 'submit'}
{define_slot name="before_submit_button"}{/define_slot}
{/if}
{$groupel.html}
<div class="formHelp">{$groupel.field.widget.description}</div>
</div>
</td>
</tr>
{/foreach}
</table>
</fieldset>
{else}
<!--<fieldset><legend>{$element.field.widget.label}</legend>-->
{if $element.field.widget.columns}{assign var=cols value=$element.field.widget.columns}{else}{assign var=cols value=3}{/if}
{if $cols > 1}{*The user has specified columns to use so we place the grouped elements in a table.*}
{assign var=numelements value=$element.elements|@count}
{assign var=threshold value=$numelements/$cols}
<table><tr><td>
{/if}
{assign var=ctr value=0}
{foreach from=$element.elements item=groupel name=grouploop}
{if $groupel.field.label_link or $groupel.field.label_click}<a href="{if $groupel.field.label_link}{$groupel.field.label_link|escape}{else}#{/if}" target="_blank" {if $groupel.field.label_click}onclick="{$groupel.field.label_click|escape}"{/if} class="field-label-link no-link-icon">{/if}
{if $groupel.field.widget.label}{$groupel.field.widget.label}{else}{$groupel.label}{/if}
{if $groupel.field.label_link or $groupel.field.label_click}</a>{/if}
{if $groupel.type == 'submit'}
{define_slot name="before_submit_button"}{/define_slot}
{/if}
{$groupel.html}
{if $groupel.field.widget.description}<span class="formHelp">{$groupel.field.widget.description}</span>{/if}
{if $element.field.widget.separator}{$element.field.widget.separator}{else}{$element.separator}{/if}
{assign var=ctr value=$ctr+1}
{if ($cols > 1) and ($ctr >= $threshold)}</td><td>{assign var=ctr value=0}{/if}
{/foreach}
{if $cols > 1}
</td></tr></table>
{/if}
<!--</fieldset>-->
{/if}
{/if}
{block name="after_`$element.field.name`_widget" table=$element.field.tablename}
{/define_slot}
{* TODO: This has to be factored out!! There should be no mention of any
particular widget type in this template.
*}
{if $element.field.widget.type == 'select' and $element.field.widget.editvalues}
<script language="javascript"><!--
require('{$ENV.DATAFACE_URL}/js/ajax.js');
makeSelectEditable('{$element.field.tablename}', '{$element.field.vocabulary}', document.getElementById('{$element.field.name}'));
//--></script>
{/if}
{* This allows us to add arbitrary content after the widget *}
{if $element.field.widget.suffix}
{$element.field.widget.suffix}
{/if}
{if $element.properties.link}
<a href="{$element.properties.link}">Go</a>
{/if}
{if $element.field.actions}
{actions_menu class="field_actions" id="field_actions-`$element.field.name`" category=$element.field.actions var="actions"}
{/if}
</div>
{if $element.field.display != 'block'}
{if !$element.frozen}
<div class="formHelp">{$element.field.widget.description}</div>
{else}
<div class="formHelp">{$element.field.widget.frozen_description}</div>
{/if}
{/if}
{if $element.field.widget.focus}
<script language="javascript" type="text/javascript"><!--
try{literal}{{/literal}quickForm.setFocus('{$element.field.name}');{literal}} catch(err){}{/literal}
//--></script>
{/if}
</div>
</{$td_tag}>
{/if}
</{$tr_tag}>
{/define_slot}
{block name="after_`$element.field.name`_row" table=$element.field.tablename}
{/foreach}
</{$table_tag}>
<?php
class tables_view_user {
// check login & editieren nicht erlaubt
function getPermissions($record)
{
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
return Dataface_PermissionsTool::getRolePermissions('READ ONLY');
}
}
?>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".ini" allowed="false" />
<add fileExtension=".css" allowed="false" />
<add fileExtension=".js" allowed="false" />
</fileExtensions>
</security>
</system.webServer>
</configuration>
<?php
class tables_view_favorit {
// check login & editieren nicht erlaubt
function getPermissions($record) {
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
return Dataface_PermissionsTool::getRolePermissions('READ ONLY');
}
// table read only
function getRoles(&$record) {
return 'READ ONLY';
}
function reiter__renderCell( &$record ) {
$table = $record->strval('reiter');
return '<a href="'.DATAFACE_SITE_HREF.'?-table='.$table.'">'.$table.'</a>';
}
function block__after_result_list_content() {
$url = DATAFACE_SITE_HREF."?-table=list_reiter&-action=list";
echo 'Zum hinzuf&uuml;gen setze Checkbox Favorit in der gew&uuml;nschten Tabelle <a href='.$url.'>list_reiter</a>';
}
function autoID__renderCell(&$record) {
$table = 'list_reiter';
$action = 'edit';
$field = 'autoID';
$tabID = $record->val($field);
$name = $tabID;
$url = DATAFACE_SITE_HREF."?-table=${table}&-action=${action}&${field}=${tabID}";
return '<div style="text-align:left;"><a href="'.$url.'">'.$name.'</a></div>';
}
}
?>
# nur wegen sortierung, statt in index.php
__sql__ = "SELECT lst.*, IF(vReit.reiter IS NULL, 0, 1) AS exist FROM list_reiter AS lst LEFT JOIN view_reiter AS vReit ON lst.reiter = vReit.reiter ORDER BY reiter"
[__global__]
noLinkFromListView = 1
[autoID]
noLinkFromListView = 0
widget:type = hidden
widget:label = "TabID"
#visibility:list = hidden
#visibility:browse = hidden
#visibility:find = hidden"
order = 10
[reiter]
widget:type = select
vocabulary = tables
widget:label = "Tabelle"
column:legend = "[Link]"
filter = 1
order = 20
[kategorie]
widget:type = select
vocabulary = kategorie
filter = 1
order = 30
[favorit]
widget:type = checkbox
widget:label = "Favorit"
widget:description = "F&uuml;r den schnelleren Zugriff unter dem Men&uuml;punkt 'Favorit'"
filter = 1
order = 40
[history]
widget:type = checkbox
widget:label = "Historie"
widget:description = "Soll History-Tabelle erhalten bleiben. Per Default werden alle per Cronjob gel&ouml;scht. In Views unbedeutend"
filter = 1
order = 50
[bedeutung]
widget:atts:size = 75
order = 60
[exist]
#transient = 1
visibility:list = hidden
filter = 1
order = 70
[rss]
;; entspricht disabled
[record_rss > rss]
;; entspricht disabled
[related_rss]
;; entspricht disabled
[export_xml]
;; entspricht disabled
[view_xml]
;; entspricht disabled
[related_xml > export_xml]
;; entspricht disabled
[xml_list]
;; entspricht disabled
[printable_report]
icon="{$site_url}/images/printer.png"
category=result_list_actions
description="See this product list in a printable format"
url="{$app->url('-action=printable_report')}"
;; # bestimmte Tabellen nur
;; condition="$query['-table'] == 'mpi_kosten'"
;; # nur admin darf drucken
;; permission=reports
[new_lizenz]
description = Create a new lizenz record
condition="$query['-relationship'] == 'Install'"
url = "http://mpidb.mpi-magdeburg.mpg.de/it_licman/index.php?-action=new&-table=mpi_install&instID={$record->val('tabID')}"
icon = "{$dataface_url}/images/add_icon.gif"
category = related_list_actions
permission = add new related record
<div style="padding: 5px;">
<table>
<tr>
<td rowspan = "2">
<a href="{$ENV.SERVER.HOST_URI}">
<img title="Databases {$ENV.SERVER.HOST_URI}" alt="Databases {$ENV.SERVER.HOST_URI}" src="../master/images/mpi-banner.png"/>
</a>
</td>
<td style="padding-left: 40px; font-size: 140%;" valign="bottom">
Datenbank
</td>
<td style="padding-left: 5px; font-size: 140%;" valign="bottom">
<font color="Indigo">{$ENV.APPLICATION.title|escape}</font>
</td>
</tr>
<tr>
<td style="padding-left: 40px; font-size: 140%;" valign="top">
Tabelle
</td>
<td style="padding-left: 5px; font-size: 140%;" valign="top">
<font color="Indigo">{$ENV.table_object->getLabel()|escape}</font>
</td>
</tr>
</table>
</div>
<FilesMatch "\.ini$">
Deny from all
</FilesMatch>
\ No newline at end of file
/* plan_inv und pse_inv nicht farben veraendern - Wunsch tschroed */
tr.lesser td { background-color: #FF8000;}
tr.toless td { background-color: red;}
tr.enough td { background-color: green;}
tr.equal td { background-color: yellow;}
tr.narrow td { background-color: lime;}
tr.lineY td { background-color: yellow !important;}
/*#left_column { display: none;} */
/* .portlet { display: none;} */
/* #dataface-sections-left-column { display: none;} */
[userID]
#widget:type = "hidden"
visibility:list = "hidden"
visibility:browse = "hidden"
visibility:find = "hidden"
[username]
widget:type = select
vocabulary = user
#validators:lettersonly = "1"
#validators:lettersonly:message = "Username: Only letter here allowed"
widget:label = "Username"
column:legend = "User [Ext.]"
widget:description = "Daten von User-DB (view_user ggf. anpassen)"
[password]
encryption = "sha1"
widget:description = "Is empty, the last saved password will not be overwritten"
validators:regex = "/^.{8,31}$/"
validators:regex:message = "Password: Must be between 8 and 31 characters long"
[email]
widget:type = "Static"
#widget:description = "Important, if you want receive email from system"
validators:email = "1"
validators:email:message = "Email: Must contain a valid email address"
validators:minlength = "10"
validators:minlength:message = "Email: Must have minlength of 10 chars"
[role]
#widget:label = "Permissions"
widget:type = "select"
vocabulary = "roles"
widget:label = "Berechtigung"