Project

General

Profile

« Previous | Next » 

Revision 1333

Added by Dietmar over 14 years ago

start recoding without style display:none

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12

  
13 13
------------------------------------- 2.8.1 -------------------------------------
14
22-Apr-2010 Dietmar Woellbrink (Luisehahne)
15
!	start recoding without style display:none	
14 16
21-Apr-2010 Dietmar Woellbrink (Luisehahne)
15 17
!	Ticket #995 update jquery-ui.css and images (Tks to Ruebenwurzel)
16 18
+	add languages files for jquery datepicker (tks to Ralf)	
branches/2.8.x/wb/admin/pages/modify.php
17 17
*/
18 18

  
19 19
// Get page id
20
if(!isset($_GET['page_id']) OR !is_numeric($_GET['page_id'])) {
20
if(!isset($_GET['page_id']) || !is_numeric($_GET['page_id'])) {
21 21
	header("Location: index.php");
22 22
	exit(0);
23 23
} else {
......
27 27
// Create new admin object
28 28
require('../../config.php');
29 29
require_once(WB_PATH.'/framework/class.admin.php');
30

  
30 31
$admin = new admin('Pages', 'pages_modify');
31 32

  
32 33
// Get perms
......
52 53
$template = new Template(THEME_PATH.'/templates');
53 54
$template->set_file('page', 'pages_modify.htt');
54 55
$template->set_block('page', 'main_block', 'main');
56

  
55 57
$template->set_var(array(
56
								'PAGE_ID' => $results_array['page_id'],
57
								'PAGE_TITLE' => ($results_array['page_title']),
58
								'MENU_TITLE' => ($results_array['menu_title']),
59
								'MODIFIED_BY' => $user['display_name'],
60
								'MODIFIED_BY_USERNAME' => $user['username'],
61
								'MODIFIED_WHEN' => $modified_ts,
62
								'ADMIN_URL' => ADMIN_URL,
63
								'WB_URL' => WB_URL,
64
								'WB_PATH' => WB_PATH,
65
								'THEME_URL' => THEME_URL
66
								)
67
						);
68
if($modified_ts == 'Unknown') {
58
			'PAGE_ID' => $results_array['page_id'],
59
			'PAGE_TITLE' => ($results_array['page_title']),
60
			'MENU_TITLE' => ($results_array['menu_title']),
61
			'ADMIN_URL' => ADMIN_URL,
62
			'WB_URL' => WB_URL,
63
			'WB_PATH' => WB_PATH,
64
			'THEME_URL' => THEME_URL
65
			));
66

  
67
$template->set_var(array(
68
			'MODIFIED_BY' => $user['display_name'],
69
			'MODIFIED_BY_USERNAME' => $user['username'],
70
			'MODIFIED_WHEN' => $modified_ts,
71
			'LAST_MODIFIED' => $MESSAGE['PAGES']['LAST_MODIFIED'],
72
			));
73

  
74
$template->set_block('main_block', 'show_modify_block', 'show_modify');
75
if($modified_ts == 'Unknown')
76
{
77
    $template->set_block('show_modify', '');
69 78
	$template->set_var('CLASS_DISPLAY_MODIFIED', 'hide');
79

  
70 80
} else {
71 81
	$template->set_var('CLASS_DISPLAY_MODIFIED', '');
82
    $template->parse('show_modify', 'show_modify_block', true);
72 83
}
73 84

  
74 85
// Work-out if we should show the "manage sections" link
75
$query_sections = $database->query("SELECT section_id FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' AND module = 'menu_link'");
76
if($query_sections->numRows() > 0) {
86
$sql  = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` WHERE `page_id` = '.(int)$page_id.' ';
87
$sql .= 'AND `module` = "menu_link"';
88
$query_sections = $database->query($sql);
89

  
90
$template->set_block('main_block', 'show_section_block', 'show_section');
91
if($query_sections->numRows() > 0)
92
{
93
	$template->set_block('show_section', '');
77 94
	$template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
78
} elseif(MANAGE_SECTIONS == 'enabled') {
95

  
96
} elseif(MANAGE_SECTIONS == 'enabled')
97
{
98

  
79 99
	$template->set_var('TEXT_MANAGE_SECTIONS', $HEADING['MANAGE_SECTIONS']);
100
    $template->parse('show_section', 'show_section_block', true);
101

  
80 102
} else {
103
	$template->set_block('show_section', '');
81 104
	$template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
105

  
82 106
}
83 107

  
84 108
// Insert language TEXT
85 109
$template->set_var(array(
86
								'TEXT_CURRENT_PAGE' => $TEXT['CURRENT_PAGE'],
87
								'TEXT_CHANGE_SETTINGS' => $TEXT['CHANGE_SETTINGS'],
88
								'LAST_MODIFIED' => $MESSAGE['PAGES']['LAST_MODIFIED'],
89
								'HEADING_MODIFY_PAGE' => $HEADING['MODIFY_PAGE']
90
								)
91
						);
110
				'TEXT_CURRENT_PAGE' => $TEXT['CURRENT_PAGE'],
111
				'TEXT_CHANGE_SETTINGS' => $TEXT['CHANGE_SETTINGS'],
112
				'HEADING_MODIFY_PAGE' => $HEADING['MODIFY_PAGE']
113
				));
92 114

  
93 115
// Parse and print header template
94 116
$template->parse('main', 'main_block', false);
......
103 125
		$row = $result->fetchRow();
104 126
		$page_template = ($row['template'] == '') ? DEFAULT_TEMPLATE : $row['template'];
105 127
		// include template info file if exists
106
		if (file_exists(WB_PATH . '/templates/' . $page_template . '/info.php')) {
128
		if (file_exists(WB_PATH . '/templates/' . $page_template . '/info.php'))
129
		{
107 130
			include_once(WB_PATH . '/templates/' . $page_template . '/info.php');
108 131
		}
109 132
	}
......
113 136
$module_permissions = $_SESSION['MODULE_PERMISSIONS'];
114 137
// workout for edit only one section for faster pageloading
115 138
// Constant later set in wb_settings, in meantime defined in framework/initialize.php
116
if(defined('EDIT_ONE_SECTION') and EDIT_ONE_SECTION and is_numeric($sectionId))
117
{
118
$query_sections = $database->query("SELECT section_id, module, block
119
	FROM ".TABLE_PREFIX."sections WHERE section_id = '$sectionId' ORDER BY position ASC");
120
}
121
else
122
{
123
$query_sections = $database->query("SELECT section_id, module, block
124
	FROM ".TABLE_PREFIX."sections WHERE page_id = '$page_id' ORDER BY position ASC");
125
}
139
$sql = 'SELECT `section_id`, `module`, `block` FROM `'.TABLE_PREFIX.'sections` ';
126 140

  
141
$sql .= (defined('EDIT_ONE_SECTION') && EDIT_ONE_SECTION && is_numeric($sectionId))
142
		? 'WHERE `section_id` = '.$sectionId
143
		: 'WHERE `page_id` = '.intval($page_id);
144
$sql .= ' ORDER BY position ASC';
145
$query_sections = $database->query($sql);
127 146
if($query_sections->numRows() > 0)
128 147
{
129 148
	while($section = $query_sections->fetchRow())
branches/2.8.x/wb/admin/interface/version.php
52 52

  
53 53
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
54 54
if(!defined('VERSION')) define('VERSION', '2.8.x');
55
if(!defined('REVISION')) define('REVISION', '1332');
55
if(!defined('REVISION')) define('REVISION', '1333');
56 56

  
57 57
?>
branches/2.8.x/wb/templates/wb_theme/templates/pages_modify.htt
1 1
<!-- BEGIN main_block -->
2

  
3 2
<table cellpadding="5" cellspacing="0" border="0" align="center" width="100%" style="margin-bottom: 10px;">
4 3
<tr style="background-color: #F0F0F0;">
5 4
	<td valign="middle" align="left">
......
8 7
	<td align="right">
9 8
		{TEXT_CURRENT_PAGE}:
10 9
		<b>{PAGE_TITLE}</b>
11
		- 
10
		-
12 11
		<a href="{ADMIN_URL}/pages/settings.php?page_id={PAGE_ID}">{TEXT_CHANGE_SETTINGS}</a>
12
<!-- BEGIN show_section_block -->
13 13
		<font style="{DISPLAY_MANAGE_SECTIONS}">-</font>
14 14
		<a href="{ADMIN_URL}/pages/sections.php?page_id={PAGE_ID}" style="{DISPLAY_MANAGE_SECTIONS}">{TEXT_MANAGE_SECTIONS}</a>
15
<!-- END show_section_block -->
15 16
		<font style="color: #999999;" class="{CLASS_DISPLAY_MODIFIED}"><br />
17
<!-- BEGIN show_modify_block -->
16 18
		{LAST_MODIFIED} {MODIFIED_BY} ({MODIFIED_BY_USERNAME}), {MODIFIED_WHEN}
19
<!-- END show_modify_block -->
17 20
		</font>
18 21
	</td>
19 22
</tr>
20 23
</table>
21

  
22 24
<!-- END main_block -->
branches/2.8.x/wb/templates/argos_theme/templates/pages_modify.htt
9 9
		<b>{PAGE_TITLE}</b>
10 10
		- 
11 11
		<a href="{ADMIN_URL}/pages/settings.php?page_id={PAGE_ID}">{TEXT_CHANGE_SETTINGS}</a>
12
<!-- BEGIN show_section_block -->
12 13
		<font style="{DISPLAY_MANAGE_SECTIONS}">-</font>
13 14
		<a href="{ADMIN_URL}/pages/sections.php?page_id={PAGE_ID}" style="{DISPLAY_MANAGE_SECTIONS}">{TEXT_MANAGE_SECTIONS}</a>
15
<!-- END show_section_block -->
14 16
		<font style="color:#999;" class="{CLASS_DISPLAY_MODIFIED}"><br />
17
<!-- BEGIN show_modify_block -->
15 18
		{LAST_MODIFIED} {MODIFIED_BY} ({MODIFIED_BY_USERNAME}), {MODIFIED_WHEN}
19
<!-- END show_modify_block -->
16 20
		</font>
17 21
	</td>
18 22
</tr>

Also available in: Unified diff