jader
committed
on 26 Oct 04
Major update: releases version 2.50b1, simplified task edit page to 1 page.
Changes processes to have instances. Overhaul the UI for tasks. … Show more
Major update: releases version 2.50b1, simplified task edit page to 1 page.

Changes processes to have instances. Overhaul the UI for tasks. Allow

linking of tasks. Lots of UI improvements.

Show less

/postgresql/edit-this-page-create.sql (+3 -3)
199 199         else
200 200             -- This is probably an ETP app instance that
201 201             -- was created through the Site Map; by returning
202 202             -- 0 we ensure the get_page_attributes query will
203 203             -- fail and index.vuh will redirect to etp-setup-2.
204 204             v_folder_id := 0;
205 205         end if;
206 206     end if;
207 207
208 208     return v_folder_id;
209 209 end;
210 210 ' language 'plpgsql';
211 211
212 212
213 213 create function etp__get_relative_url(integer, varchar)
214 214 returns varchar as '
215 215 declare
216 216   p_item_id alias for $1;
217 217   p_name alias for $2;
218 218   v_item_id integer;
219     v_url varchar(400);
  219   v_url varchar;
220 220   v_object_type varchar;
221 221   v_link_rec record;
222 222 begin
223 223
224 224   select object_type into v_object_type
225 225     from acs_objects
226 226    where object_id = p_item_id;
227 227
228 228   if v_object_type = ''content_item'' then
229 229     return p_name;
230 230   end if;
231 231
232 232   if v_object_type = ''content_folder'' then
233 233     select s.name || ''/'' into v_url
234 234     from cr_folders f, site_nodes s
235 235     where f.folder_id = p_item_id
236 236     and s.object_id = f.package_id;
237 237     return v_url;
238 238   end if;
239 239
 
257 257
258 258     select site_node__url(s.node_id) into v_url
259 259       from site_nodes s
260 260      where s.object_id = v_link_rec.package_id;
261 261
262 262     return v_url || v_link_rec.name;
263 263
264 264   end if;
265 265
266 266   return null;
267 267
268 268 end;
269 269 ' language 'plpgsql';
270 270
271 271 create function etp__get_title(integer, varchar)
272 272 returns varchar as '
273 273 declare
274 274   p_item_id alias for $1;
275 275   p_revision_title alias for $2;
276 276   v_item_id integer;
277     v_title varchar(400);
  277   v_title varchar;
278 278   v_object_type varchar;
279 279 begin
280 280   if p_revision_title is not null then
281 281     return p_revision_title;
282 282   end if;
283 283
284 284   select object_type from acs_objects into v_object_type
285 285    where object_id = p_item_id;
286 286
287 287   if v_object_type = ''content_folder'' then
288 288     select r.title
289 289       into v_title
290 290       from cr_items i, cr_revisions r
291 291      where i.parent_id = p_item_id
292 292        and i.name = ''index''
293 293        and i.live_revision = r.revision_id;
294 294     return v_title;   
295 295   end if;
296 296
297 297   if v_object_type = ''content_extlink'' then
 
310 310
311 311   if v_object_type = ''content_item'' then
312 312     select r.title into v_title
313 313       from cr_items i, cr_revisions r
314 314      where i.item_id = v_item_id
315 315        and i.live_revision = r.revision_id;
316 316     return v_title;
317 317   end if
318 318   
319 319   return null;
320 320
321 321 end;
322 322 ' language 'plpgsql';
323 323
324 324 create function etp__get_description(integer, varchar)
325 325 returns varchar as '
326 326 declare
327 327   p_item_id alias for $1;
328 328   p_revision_description alias for $2;
329 329   v_item_id integer;
330     v_description varchar(400);
  330   v_description varchar;
331 331   v_object_type varchar;
332 332 begin
333 333   if p_revision_description is not null then
334 334     return p_revision_description;
335 335   end if;
336 336
337 337   select object_type from acs_objects into v_object_type
338 338    where object_id = p_item_id;
339 339
340 340   if v_object_type = ''content_folder'' then
341 341     select r.description
342 342       into v_description
343 343       from cr_items i, cr_revisions r
344 344      where i.parent_id = p_item_id
345 345        and i.name = ''index''
346 346        and i.live_revision = r.revision_id
347 347        and i.item_id = r.item_id;
348 348     return v_description;   
349 349   end if;
350 350