Changes for page New Course

From version 14.1
edited by Andrea Omicini
on 22/07/2022 01:15
Change comment: There is no comment for this version
To version 13.1
edited by Andrea Omicini
on 15/03/2022 18:46
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,23 +1,56 @@
1 -= {{italiano}}Nuovo{{/italiano}}{{english}}New{{/english}} =
1 +={{stringEngIta eng="New Course" ita="Nuovo corso"/}}=
2 2  
3 -{{include reference="Events.Environment" excludeFirstHeading="true"/}}{{velocity}}
3 +{{velocity}}
4 4  #if( $isGuest )
5 5  {{warning}}{{stringEngIta ita="Siamo spiacenti, ma l'inserimento di nuovi corsi non è operazione disponibile a visitatori esterni" eng="Sorry, the insertion of new courses is not an operation available to external viewers"/}}{{/warning}}
6 6   #stop
7 7  #end
8 8  #### START utility variables
9 +#set( $obj = $doc.getObject("Courses.CourseClass"))
10 +##
9 9  #define( $insertButtonIt )Inserisci nuovo corso in italiano#end
10 10  #define( $insertButtonEn )Insert New Course in English#end
11 -#define( $insertTextIt )NomeDocumentoCorso#end
12 -#define( $insertTextEn )CourseDocumentName#end
13 +#define( $insertTextIt )NomeDocCorso#end
14 +#define( $insertTextEn )CourseDocName#end
13 13  #define( $insertOtherLangIt )No, devo inserire un nuovo corso in inglese#end
14 14  #define( $insertOtherLangEn )No, I have to insert a new course in Italian#end
15 15  #define( $newCourseIt )Nuovo corso#end
16 16  #define( $newCourseEn )New Course#end
17 17  #### END utility variables
18 -{{/velocity}}{{include reference="Main.ClassNew" excludeFirstHeading="true"/}}
20 +#if( $context.language == 'it' )
21 +#set( $insertButton = $insertButtonIt )
22 +#set( $insertText = $insertTextIt )
23 +#set( $insertOtherLang = $insertOtherLangIt )
24 +###set( $newCourse = $newCourseIt )
25 +#set( $thisLang = 'language=it' )
26 +#set( $otherLang = 'language=en' )
27 +#else
28 +#set( $insertButton = $insertButtonEn )
29 +#set( $insertText = $insertTextEn )
30 +#set( $insertOtherLang = $insertOtherLangEn )
31 +###set( $newCourse = $newCourseEn )
32 +#set( $thisLang = 'language=en' )
33 +#set( $otherLang = 'language=it' )
34 +#end
35 +{{html clean="false" wiki="true"}}
36 +(% style="border-style: none; background-color:$theme.borderColor; padding: 5px; margin-bottom: 10px" %)
37 +(((<form action="" id="newpubs" method="post">
38 +<input type="hidden" name="parent" value="Courses.WebHome"/>
39 +<input type="hidden" name="template" value="CourseTemplate"/>
40 +<input type="hidden" name="title" value=""/>
41 +<input type="hidden" name="sheet" value="1"/>
42 +<input type="hidden" name="webname" value="Courses" />
43 +## button for new journal or series
44 +(((<input type="button" value="$insertButton" onclick='if( updateName(this.form.name) ) {this.form.action="../../edit/" + this.form.webname.value + "/" + this.form.name.value + "?$thisLang"; this.form.submit(); }'/>)))
45 +## text field for new journal or series document name
46 +(((<input type="text" name="name" value="<$insertText>" size="40"
47 + onfocus="if(this.value=='<$insertText>') this.value=''"
48 + onblur="if(this.value=='') this.value='<$insertText>'"/>)))
49 +## link for the same page in the other language
50 +(((<a href="$doc.getURL('view', $otherLang )"><em>$insertOtherLang</em></a>)))
51 +</form>)))
52 +{{/html}}
19 19  
20 -{{velocity}}
21 21  #if( $xcontext.language=="it" )
22 22  == Come inserire un nuovo corso in {{apice/}} ==
23 23