Skip to content
This repository has been archived by the owner on Jun 13, 2018. It is now read-only.

Commit

Permalink
enable custom template files for droplets
Browse files Browse the repository at this point in the history
  • Loading branch information
labby committed Jul 31, 2015
1 parent 7e63a2c commit e264e93
Show file tree
Hide file tree
Showing 22 changed files with 126 additions and 777 deletions.
83 changes: 57 additions & 26 deletions upload/modules/droplets/css/backend.css
Expand Up @@ -12,38 +12,69 @@
*
*/

#droplets {padding:20px;}

label {

white-space: nowrap;
display: block;
float: left;
margin-right: 20px;

}

input[type='checkbox']{
float: left;
margin-right: 10px;
margin-top: 6px;
}

.button {margin:10px !important;}

#droplets {margin-top:20px;}
#droplets h1 {display:inline-block; margin-bottom: 24px;;font-size:24px;}
#droplets table.droplets {background-color:white;width:100%;}
#droplets table.droplets thead {font-weight:bold;background-color:#c7d1db !important;height:25px;}
#droplets table.droplets th {background-color: #e6EEEE;border: 1px solid #FFF;font-size: 8pt;padding: 4px;text-align:left;}
#droplets a.tooltip span.comment {display:none; margin-left:14px; width:430px;}

#droplets a.tooltip:hover span.comment{display:inline; position:absolute; padding:5px; border:1px solid #000000; background:#ffffff; color:#000000;}

#droplets span.usage {font-weight:bold;}
#droplets fieldset{border:1px solid #888888;padding:10px;}
#droplets legend{font-weight:bold;font-size:1.3em;padding:0 20px;border-left:1px solid #888888;border-right:1px solid #888888;margin:15px 0;}
#droplets label, #droplets span.label {
width:160px;
float:left;
text-align:right;
margin-right:5px;
margin-left: 5px;
padding-top:5px;
font-weight:bold;
}

#droplets a:hover {text-decoration:none;}

/* hack for be-theme algos */
.info {
background: none;
padding-left: 0px;
#droplets input[type=text], #droplets textarea {width:600px;}
#droplets input[type=submit] {width:200px;}
#droplets div.problem {border:2px solid #f00;padding:15px;background-color:#FFCCCC;font-size:1.2em;font-weight:bold;text-align:center;color:#f00;}
#droplets div.info {border:2px solid #006600;margin:15px auto;padding:15px;background-color:#CCFFCC;font-size:1.2em;font-weight:bold;text-align:center;color:#060;}
/* addition 2.0.2 */
#code { display: block; float: left; width: 100%; height: 300px; }
.droplet-v-spacer { display: block; float: left; width: 100%; height: 20px; }
.radio_label {
display: block;
width: 50px !important;
overflow: hidden;
text-align: left !important;
}
#active_y, #active_n {
float: left;
width: 24px;
}
th {
padding-left: 10px !important;
}
th input[type='checkbox'] {
margin-right: 10px;
}

#droplets td {
padding-left: 11px !important;
}
.spacer {
height: 24px;
width:100%;
}

input[type='checkbox']{
float: left;
margin-right: 10px;
}
label {
text-align: left !important;
margin-right: 30px !important;
}

.bottom_save {
float:right;
margin-right:78px;
}
80 changes: 0 additions & 80 deletions upload/modules/droplets/css/backend_old.css

This file was deleted.

12 changes: 6 additions & 6 deletions upload/modules/droplets/functions.php
Expand Up @@ -211,7 +211,7 @@ function list_droplets( $info = NULL )
}

echo $parser->render(
'modify.lte',
'@droplets/modify.lte',
array(
'rows' => $rows,
'num_rows' => count($rows),
Expand Down Expand Up @@ -309,7 +309,7 @@ function manage_backups()
}

echo $parser->render(
'backups.lte',
'@droplets/backups.lte',
array(
'rows' => $rows,
'info' => $info,
Expand Down Expand Up @@ -381,7 +381,7 @@ function manage_perms()
sort($rows);

echo $parser->render(
'permissions.lte',
'@droplets/permissions.lte',
array(
'rows' => $rows,
'info' => $info,
Expand Down Expand Up @@ -542,7 +542,7 @@ function import_droplets()
}

echo $parser->render(
'import.lte',
'@droplets/import.lte',
array(
'problem' => $problem
)
Expand Down Expand Up @@ -799,7 +799,7 @@ function edit_droplet( $id )
}

echo $parser->render(
'edit.lte',
'@droplets/edit.lte',
array(
'LANG' => $MOD_DROPLET,
'problem' => $problem,
Expand Down Expand Up @@ -880,7 +880,7 @@ function edit_droplet_perms( $id )
}

echo $parser->render(
'droplet_permissions.lte',
'@droplets/droplet_permissions.lte',
array(
'rows' => $rows,
'info' => $info,
Expand Down
59 changes: 0 additions & 59 deletions upload/modules/droplets/headers.inc.php

This file was deleted.

4 changes: 0 additions & 4 deletions upload/modules/droplets/js/backend_body.js
Expand Up @@ -24,7 +24,3 @@ if ( typeof jQuery != 'undefined' ) {
});
}

// initialise semantic radio button
$('.ui.radio.checkbox')
.checkbox()
;
46 changes: 46 additions & 0 deletions upload/modules/droplets/register_parser.php
@@ -0,0 +1,46 @@
<?php
/**
* This file is part of an ADDON for use with LEPTON Core.
* This ADDON is released under the GNU GPL.
* Additional license terms can be seen in the info.php of this module.
*
* @module Droplets
* @author LEPTON Project
* @copyright 2010-2015 LEPTON Project
* @link http://www.LEPTON-cms.org
* @license http://www.gnu.org/licenses/gpl.html
* @license_terms please see info.php of this module
* @reformatted 2011-12-30
*
* This code was originally created by Ruud Eisinga (Ruud) and John (PCWacht)
* for Website Baker CMS and adapted for LEPTON in 2011
*
*/

/** *******************************
* Try to get the template-engine.
*
* Make your basic settings for your module-backend interface(-s) here.
* Keep in mind, that the paths-settings belongs to the backend only!
*
*/
global $parser, $loader;
if (!isset($parser))
{
require_once( LEPTON_PATH."/modules/lib_twig/library.php" );
}

require(dirname(__FILE__)."/info.php");

$loader->prependPath( dirname(__FILE__)."/templates/", $module_directory );

$backend_template_path = LEPTON_PATH."/templates/".DEFAULT_THEME."/backend/".$module_directory."/";
$module_template_path = dirname(__FILE__)."/templates/";

require_once (LEPTON_PATH."/modules/lib_twig/classes/class.twig_utilities.php");
$twig_util = new twig_utilities( $parser, $loader, $module_template_path, $backend_template_path );
$twig_util->template_namespace = $module_directory;

$twig_modul_namespace = "@".$module_directory."/"

?>

0 comments on commit e264e93

Please sign in to comment.