Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
f7d966c0
Commit
f7d966c0
authored
Jan 25, 2008
by
Clare Lenihan
Committed by
Clare Lenihan
Jan 25, 2008
Browse files
changing the title of view/blocks and passing new to view/view and back again
parent
a7054c6f
Changes
4
Hide whitespace changes
Inline
Side-by-side
htdocs/theme/default/templates/view/blocks.tpl
View file @
f7d966c0
...
...
@@ -2,6 +2,8 @@
{
include
file
=
"columnfullstart.tpl"
}
<h2>
{
$heading
}
</h2>
<form
action=
"
{
$formurl
}
"
method=
"post"
>
<input
type=
"submit"
name=
"
{
$action_name
}
"
id=
"action-dummy"
class=
"hidden"
>
<input
type=
"hidden"
id=
"viewid"
name=
"id"
value=
"
{
$view
}
"
>
...
...
@@ -20,10 +22,10 @@
</div>
<div
class=
"fr"
style=
"font-size: smaller; padding-right: 5px;"
>
<strong><a
href=
"view.php?id=
{
$view
}
"
>
{
str
tag
=
displaymyview
section
=
view
}
»
</a></strong>
<strong><a
href=
"view.php?id=
{
$view
}
&new=
{
$new
}
"
>
{
str
tag
=
displaymyview
section
=
view
}
»
</a></strong>
</div>
<a
id=
"layout-link"
href=
"layout.php?id=
{
$view
}
&c=
{
$category
}
&new=
{
$new
}
"
{
if
!
$can_change_layout
}
class=
"disabled"
{/
if
}
>
{
str
tag
=
'changeviewlayout'
section
=
'view'
}
</a>
<a
id=
"layout-link"
href=
"layout.php?id=
{
$view
}
&
amp;
c=
{
$category
}
&
amp;
new=
{
$new
}
"
{
if
!
$can_change_layout
}
class=
"disabled"
{/
if
}
>
{
str
tag
=
'changeviewlayout'
section
=
'view'
}
</a>
<div
id=
"bottom-pane"
>
<div
id=
"column-container"
>
...
...
htdocs/theme/default/templates/view/view.tpl
View file @
f7d966c0
...
...
@@ -4,7 +4,7 @@
{
if
$can_edit
}
<div
class=
"fr editview"
>
<span
class=
"settingsicon"
>
<a
href=
"blocks.php?id=
{
$viewid
}
"
>
{
str
tag
=
editthisview
section
=
view
}
</a>
<a
href=
"blocks.php?id=
{
$viewid
}
&new=
{
$new
}
"
>
{
str
tag
=
editthisview
section
=
view
}
</a>
</span>
</div>
{/
if
}
...
...
htdocs/view/blocks.php
View file @
f7d966c0
...
...
@@ -30,10 +30,16 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require
(
'view.php'
);
$view
=
new
View
(
param_integer
(
'id'
));
define
(
'TITLE'
,
get_string
(
'editblocksforview'
,
'view'
,
$view
->
get
(
'title'
)));
$new
=
param_boolean
(
'new'
);
if
(
$new
)
{
define
(
'TITLE'
,
get_string
(
'createviewsteptwo'
,
'view'
));
}
else
{
define
(
'TITLE'
,
get_string
(
'editblocksforview'
,
'view'
,
$view
->
get
(
'title'
)));
}
// check if cancel was selected
if
(
$new
&&
isset
(
$_POST
[
'cancel'
]))
{
$view
->
delete
();
...
...
@@ -85,6 +91,7 @@ foreach (array_keys($_POST + $_GET) as $key) {
}
}
$smarty
->
assign
(
'heading'
,
TITLE
);
$smarty
->
assign
(
'formurl'
,
get_config
(
'wwwroot'
)
.
'view/blocks.php'
);
$smarty
->
assign
(
'category'
,
$category
);
$smarty
->
assign
(
'new'
,
$new
);
...
...
htdocs/view/view.php
View file @
f7d966c0
...
...
@@ -30,6 +30,8 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require
(
get_config
(
'libroot'
)
.
'view.php'
);
$viewid
=
param_integer
(
'id'
);
$new
=
param_boolean
(
'new'
);
$view
=
new
View
(
$viewid
);
if
(
!
can_view_view
(
$viewid
))
{
throw
new
AccessDeniedException
();
...
...
@@ -262,6 +264,7 @@ $smarty->assign('formattedowner', $view->formatted_owner());
if
(
$USER
->
get
(
'id'
)
==
$view
->
get
(
'owner'
))
{
$smarty
->
assign
(
'can_edit'
,
true
);
$smarty
->
assign
(
'new'
,
$new
);
}
$smarty
->
display
(
'view/view.tpl'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment