Пример #1
0
     $selector = gen_liste("select distinct idlocation, location_libelle from docs_location order by 2 ", "idlocation", "location_libelle", 'form_' . $field, "", $field_values[$i], "", "", "0", $msg["all_location"], 0);
     $deflt_user .= "\n\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . "&nbsp;:&nbsp;</div>\n\n\t\t\t\t\t<div class='colonne_suite'>" . $selector . "</div></div>\n";
 } elseif ($field == "deflt_agnostic_warehouse") {
     $conn = new agnostic($base_path . '/admin/connecteurs/in/agnostic');
     $conn->get_sources();
     $selector = "<select name=\"form_" . $field . "\">\n\t\t\t\t\t<option value='0' " . (!$field_values[$i] ? "selected='selected'" : "") . ">" . $msg['caddie_save_to_warehouse_none'] . "</option>";
     if (is_array($conn->sources)) {
         foreach ($conn->sources as $key_source => $source) {
             $selector .= "<option value='" . $key_source . "' " . ($field_values[$i] == $key_source ? "selected='selected'" : "") . ">" . htmlentities($source['NAME'], ENT_QUOTES, $charset) . "</option>";
         }
     }
     $selector .= "</select>";
     $deflt_user .= "\n\t\t\t\t\t<div class='row'><div class='colonne60'>" . $msg[$field] . "&nbsp;:&nbsp;</div>\n\n\t\t\t\t\t<div class='colonne_suite'>" . $selector . "</div></div>\n";
 } elseif ($field == "deflt_cms_article_statut") {
     if ($cms_active && SESSrights & CMS_AUTH) {
         $publications_states = new cms_editorial_publications_states();
         $selector = "\n\t\t\t\t\t\t<select name=\"form_" . $field . "\">\n\t\t\t\t\t\t\t" . $publications_states->get_selector_options($field_values[$i]) . "\n\t\t\t\t\t\t</select>";
         $deflt_user .= "<div class='row'><div class='colonne60'>" . $msg[$field] . "</div>\n\t\n\t\t\t\t\t\t<div class='colonne_suite'>\t\t\t\n\t\t\t\t\t\t\t{$selector}\n\t\t\t\t\t\t</div></div>\n";
     }
 } elseif ($field == "deflt_cms_article_type") {
     if ($cms_active && SESSrights & CMS_AUTH) {
         $types = new cms_editorial_types('article');
         $types->get_types();
         $selector = "\n\t\t\t\t\t\t<select name=\"form_" . $field . "\">\n\t\t\t\t\t\t\t" . $types->get_selector_options($field_values[$i]) . "\n\t\t\t\t\t\t</select>";
         $deflt_user .= "<div class='row'><div class='colonne60'>" . $msg[$field] . "</div>\n\t\n\t\t\t\t\t\t<div class='colonne_suite'>\t\t\t\n\t\t\t\t\t\t\t{$selector}\n\t\t\t\t\t\t</div></div>\n";
     }
 } elseif ($field == "deflt_cms_section_type") {
     if ($cms_active && SESSrights & CMS_AUTH) {
         $types = new cms_editorial_types('section');
         $types->get_types();
         $selector = "\n\t\t\t\t\t\t<select name=\"form_" . $field . "\">\n\t\t\t\t\t\t\t" . $types->get_selector_options($field_values[$i]) . "\n\t\t\t\t\t\t</select>";
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: publication_states.inc.php,v 1.1 2012-08-20 12:41:08 arenou Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/cms/cms_editorial_publications_states.class.php";
$publication_states = new cms_editorial_publications_states();
switch ($action) {
    case "edit":
        print $publication_states->get_form($id);
        break;
    case "save":
        $publication_states->save();
        print $publication_states->get_table();
        break;
    case "delete":
        $publication_states->delete($id);
        print $publication_states->get_table();
        break;
    case "list":
    default:
        print $publication_states->get_table();
        break;
}
Пример #3
0
 protected function get_publication_state_field()
 {
     global $cms_editorial_publication_state_field;
     $publications_states = new cms_editorial_publications_states();
     return str_replace("!!cms_editorial_form_publications_states_options!!", $publications_states->get_selector_options($this->publication_state), $cms_editorial_publication_state_field);
 }
Пример #4
0
    /** Fonctions: */
    public static function get_watch_form()
    {
        global $docwatch_watch_form_tpl, $msg;
        $marc_select = new marc_select("doctype", 'record_types');
        $cms_editorial_article = new cms_editorial_types('article');
        $cms_editorial_section = new cms_editorial_types('section');
        $cms_section = new cms_section();
        $cms_article = new cms_article();
        $cms_publication_state = new cms_editorial_publications_states();
        $status = $cms_publication_state->get_selector_options();
        $record_part = gen_plus("record_options", encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_options_record']), '<div class="row">
					<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_record_default_type']) . '</label>
				</div>
				<div class="row">' . str_replace('<select', '<select data-dojo-type="dijit/form/Select" style="width:auto"', $marc_select->display) . '</div>
				<div class="row">
					<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_record_default_status']) . '</label>
				</div>
				<div class="row">		
					<select  id="record_status" data-dojo-type="dijit/form/Select" style="width:auto" name="record_status">' . self::get_record_status() . '</select>
				</div>');
        $article_part = gen_plus("article_options", encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_options_article']), '<div class="row">
					<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_article_default_content_type']) . '</label>
				</div>
				<div class="row">
					<select  id="article_type" data-dojo-type="dijit/form/Select" style="width:auto" name="article_type">' . $cms_editorial_article->get_selector_options() . '</select>
				</div>
				<div class="row">
					<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_article_default_publication_status']) . '</label>
				</div>
				<div class="row">
					<select  id="article_status" data-dojo-type="dijit/form/Select" style="width:auto" name="article_status">' . $status . '</select>
				</div>
				<div class="row">
					<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_article_default_parent']) . '</label>
				</div>
				<div class="row">
					<select  id="article_parent" data-dojo-type="dijit/form/Select" style="width:auto" name="article_parent">' . $cms_article->get_parent_selector() . '</select>
				</div>');
        $section_part = gen_plus("section_options", encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_options_section']), '<div class="row">
					<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_section_default_content_type']) . '</label>
				</div>
				<div class="row">
					<select  id="section_type" data-dojo-type="dijit/form/Select" style="width:auto" name="section_type">' . $cms_editorial_section->get_selector_options() . '</select>
				</div>
				<div class="row">
					<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_section_default_publication_status']) . '</label>
				</div>
				<div class="row">
					<select  id="section_status" data-dojo-type="dijit/form/Select" style="width:auto" name="section_status">' . $status . '</select>
				</div>
				<div class="row">
					<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_watch_form_section_default_parent']) . '</label>
				</div>
				<div class="row">
					<select  id="section_parent" data-dojo-type="dijit/form/Select" style="width:auto" name="section_parent">' . $cms_section->get_parent_selector() . '</select>
				</div>');
        $form = $docwatch_watch_form_tpl;
        $form = str_replace('!!users_checkboxes!!', self::generate_users(), $form);
        $form = str_replace('!!options_record!!', $record_part, $form);
        $form = str_replace('!!options_article!!', $article_part, $form);
        $form = str_replace('!!options_section!!', $section_part, $form);
        return $form;
    }