Roxen.git / server / site_templates / common.pike

version» Context lines:

Roxen.git/server/site_templates/common.pike:1:   #include <module.h>   #include <roxen.h> + #include <config_interface.h>   //<locale-token project="roxen_config">LOCALE</locale-token> - #define LOCALE(X,Y) _STR_LOCALE("roxen_config",X,Y) + #define LOCALE(X,Y) _STR_LOCALE("roxen_config",X,Y)      //! @decl optional array(string) modules = ({});   //!   //! Modules to include in the configuration. Any @tt{VAR_INITIAL@}   //! variables in them get shown in the wizard to be set by the user.   //!   //! Use "!" as separator for multiple module copies in this array,   //! e.g. "filesystem!1".      //! @decl optional array(string) silent_modules = ({});
Roxen.git/server/site_templates/common.pike:92:       foreach( this->modules || ({}), string mod )    {    ModuleInfo mi = roxen.find_module( (mod/"!")[0] );    RoxenModule moo = conf->find_module( replace(mod,"!","#") );    foreach( indices(moo->query()), string v )    {    if(moo->getvar( v )->check_visibility(id, 1, 0, 0, 1, 1))    {    num++; -  res += "<tr><td colspan='3'><h2>" +  res += "<div class='action-group no-hover site-padding-all'><h2>"    +LOCALE(1,"Initial variables for ")+ -  Roxen.html_encode_string(mi->get_name())+"</h2></td></tr>" +  Roxen.html_encode_string(mi->get_name())+"</h2>"    "<emit source='module-variables' "    " configuration=\""+conf->name+"\""    " module=\""+mod+#"\"/>";    if( !setonly )    res +=    "<emit noset='1' source='module-variables' "    " configuration=\""+conf->name+"\""    " module=\""+mod+#"\"> -  <tr> -  <td width='150' valign='top' colspan='2'><b>&_.name;</b></td> -  <td valign='top'><eval>&_.form:none;</eval></td></tr> -  <tr> - <td width='30'><img src='/internal-roxen-unit' width=50 height=1 alt='' /></td> -  <td colspan=2>&_.doc:none;</td></tr> -  <tr><td colspan='3'><img src='/internal-roxen-unit' height='18' /></td></tr> - </emit>"; +  <dl class='config-var'> +  <dt class='name'>&_.name;</dt> +  <dd class='value'><eval>&_.form:none;</eval></dd> +  <dd class='doc'>&_.doc:none;</dd> +  </dl> +  </emit> +  </div>";    break;    }    }    }    return res;   }      int form_is_ok( RequestID id )   {    Configuration conf = id->misc->new_configuration;
Roxen.git/server/site_templates/common.pike:150:    {    Variable.Variable va = conf->getvar( v );    if( va->get_warnings() )    return 0;    }    return 1;   }      mixed parse( RequestID id, mapping|void opt )   { +  TRACE("parse: %O\n", id);    Configuration conf = id->misc->new_configuration;    id->misc->do_not_goto = 1;       // Load initial modules    object enable_modules_lock = load_modules(conf);       string cf_form = -  "<emit noset='1' source=config-variables configuration='"+conf->name+"'>" -  " <tr><td colspan=2 valign=top width=20%><b>&_.name;</b></td>" -  " <td valign=top><eval>&_.form:none;</eval></td></tr>" -  " <tr><td></td><td colspan=2>&_.doc:none;<p>&_.type_hint;</td></tr>" -  " <tr><td colspan='3'><img src='/internal-roxen-unit' height='18' /></td></tr>" -  "</emit>"; +  "<div class='action-group no-hover site-padding-all'>" +  + "<h2>" + LOCALE(190,"Initial variables for the site") + "</h2>" +  " <emit noset='1' source=config-variables configuration='"+conf->name+"'>" +  " <dl class='config-var'>" +  " <dt class='name'>&_.name;</dt>" +  " <dd class='value'><eval>&_.form:none;</eval></dd>" +  " <dd class='doc'>&_.doc:none;<p>&_.type_hint;</p></dd>" +  " </dl>" +  " </emit>" +  "</div>";       // set initial variables from form variables...    Roxen.parse_rxml("<emit source=config-variables configuration='"+    conf->name+"'/>", id );    Roxen.parse_rxml( initial_form( conf, id, 1 ), id );       if( id->variables["ok.x"] && form_is_ok( id ) )    {    conf->set( "MyWorldLocation", Roxen.get_world(conf->query("URLs"))||"");   
Roxen.git/server/site_templates/common.pike:220:    if (init_modules)    init_modules( conf, id );       conf->fix_no_delayed_load_flag();    conf->save (1); // Call start callbacks and save it all in one go.    conf->low_init (1); // Handle the init hooks.    conf->forcibly_added = ([]);    return "<done/>";    }    return -  "<h2>"+LOCALE(190,"Initial variables for the site")+"</h2>" -  "<table>" + cf_form + initial_form( conf, id, 0 ) + -  ((opt||([]))->no_end_table?"":"</table><p>")+ -  ((opt||([]))->no_ok?"":"<p align=right><cf-ok /></p>"); +  cf_form + initial_form( conf, id, 0 ) + +  ((opt||([]))->no_end_table?"":"")+ +  ((opt||([]))->no_ok?"":"<hr><p><cf-ok /></p>");   }