SF.net SVN: postfixadmin:[1769] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2015-04-05 19:21:22
|
Revision: 1769 http://sourceforge.net/p/postfixadmin/code/1769 Author: christian_boltz Date: 2015-04-05 19:21:15 +0000 (Sun, 05 Apr 2015) Log Message: ----------- add 'can_create' flag PFAHandler: - add $msg['can_create'] (true by default) DomainHandler: - set $msg['can_create'] based on is_superadmin list.tpl: - display 'create' button only if $msg['can_create'] is true Note: This is only an optical improvement, not a permission check. Modified Paths: -------------- trunk/model/DomainHandler.php trunk/model/PFAHandler.php trunk/templates/list.tpl Modified: trunk/model/DomainHandler.php =================================================================== --- trunk/model/DomainHandler.php 2015-04-04 14:37:46 UTC (rev 1768) +++ trunk/model/DomainHandler.php 2015-04-05 19:21:15 UTC (rev 1769) @@ -122,6 +122,7 @@ $this->msg['store_error'] = 'pAdminEdit_domain_result_error'; $this->msg['successmessage'] = 'domain_updated'; } + $this->msg['can_create'] = $this->is_superadmin; } public function webformConfig() { Modified: trunk/model/PFAHandler.php =================================================================== --- trunk/model/PFAHandler.php 2015-04-04 14:37:46 UTC (rev 1768) +++ trunk/model/PFAHandler.php 2015-04-05 19:21:15 UTC (rev 1769) @@ -112,6 +112,7 @@ # (stored separately to make the functions reuseable) # filled by initMsg() protected $msg = array( + 'can_create' => True, 'confirm_delete' => 'confirm', ); Modified: trunk/templates/list.tpl =================================================================== --- trunk/templates/list.tpl 2015-04-04 14:37:46 UTC (rev 1768) +++ trunk/templates/list.tpl 2015-04-05 19:21:15 UTC (rev 1769) @@ -106,8 +106,10 @@ </table> +{if $msg.can_create} <br /><a href="edit.php?table={$table|escape:"url"}" class="button">{$PALANG.{$formconf.create_button}}</a><br /> <br /> +{/if} <br /><a href="list.php?table={$table|escape:"url"}&output=csv">{$PALANG.download_csv}</a> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |