indexing description: "Objects that provide HTML pages for application" author: "Marco Piccioni" date: "$Date$" revision: "$0.3.1$" class ADMIN_HTML_DELEGATE inherit HTML_DELEGATE create make feature -- page building routines build_event_submission_page(the_conference:CONFERENCE; errors:HASH_TABLE[STRING,STRING]):HTML_PAGE --This page is displayed when an administrator wants to check a conference proposal require the_conference_exists:the_conference /= Void errors_exists:errors/=Void local html_page:HTML_PAGE index:INTEGER --index for the countries array not_applicable: BOOLEAN temp_date:DATE do create html_page.make -- Add the and tags html_page.add_html_code (""+get_meta_tag) -- Add the tag html_page.add_html_code ("<TITLE>Informatics Europe: Event submission page%N") --add the CSS html_page.add_html_code (get_css) html_page.add_html_code ("") --Add the form start html_page.add_html_code ("
%N") --Add the container table, the logo and the title html_page.add_html_code ("%N") html_page.add_html_code ("%N%N%N") if NOT errors.is_empty then --Add the errors info html_page.add_html_code ("%N%N%N") end --Add conference name html_page.add_html_code ("%N%N%N
%N") html_page.add_html_code ("") html_page.add_html_code ("%N%N") html_page.add_html_code ("") html_page.add_html_code ("%N") html_page.add_html_code ("%N%N%N
   
%N%N%N%N%N%N%N
"+get_logo+ "
 
 
%N
 "+ get_common_header+"
  

Event submission details

%N") html_page.add_html_code ("
%N") --Add hidden field for conference id html_page.add_html_code ("
") html_page.add_html_code ("
%N") html_page.add_html_code ("Please check the following:
%N") from errors.start html_page.add_html_code ("
    ") until errors.after loop html_page.add_html_code ("
  • ") html_page.add_html_code (errors.item_for_iteration) html_page.add_html_code ("
  • ") html_page.add_html_code ("%N
    ") errors.forth end html_page.add_html_code ("
") html_page.add_html_code ("
%N") html_page.add_html_code ("
%N%N") html_page.add_html_code ("%N%N%N") --Add starting date html_page.add_html_code ("%N%N") --Add city and country html_page.add_html_code ("%N%N") create temp_date.make_day_month_year (1, 1, 1111) --Add papers submission deadline if the_conference.papers_submission_deadline.is_equal (temp_date) then not_applicable:=true end html_page.add_html_code ("%N%N%N") --Add main sponsor html_page.add_html_code ("%N") --Add conference url html_page.add_html_code ("%N%N") --Add contact data html_page.add_html_code ("%N") html_page.add_html_code ("") --Add optional information section: keywords and additional sponsors html_page.add_html_code ("%N%N") html_page.add_html_code ("%N%N") html_page.add_html_code ("%N%N") html_page.add_html_code ("%N%N") html_page.add_html_code ("%N%N") html_page.add_html_code ("%N%N") html_page.add_html_code ("%N%N") --Add short description html_page.add_html_code ("%N") --Add additional notes html_page.add_html_code ("%N") --Add conference chairs html_page.add_html_code ("%N%N%N") --Add pc chairs html_page.add_html_code ("%N%N%N") --Add organizing chair html_page.add_html_code ("%N%N") --Add proceedings info and proceedings publisher if the_conference.proceedings_at_conference then html_page.add_html_code ("") else html_page.add_html_code ("") end html_page.add_html_code ("%N%N") --Add 3 additional deadlines if the_conference.additional_deadline_1.is_equal (temp_date) then not_applicable:=True else not_applicable:=False end html_page.add_html_code ("%N%N%N") if the_conference.additional_deadline_2.is_equal (temp_date) then not_applicable:=True else not_applicable:=False end html_page.add_html_code ("%N%N%N") if the_conference.additional_deadline_3.is_equal (temp_date) then not_applicable:=True else not_applicable:=False end html_page.add_html_code ("%N%N%N") -- Add buttons html_page.add_html_code("%N%N") --Add the tables end html_page.add_html_code ("%N%N

REQUIRED INFORMATION:

Event name (as it should appear in the roster): 

%N
Starting date (dd/mm/yyyy): %N/%N") html_page.add_html_code ("%N/%N") html_page.add_html_code ("%N %N") --Add ending date html_page.add_html_code ("Ending date (dd/mm/yyyy): %N/%N") html_page.add_html_code ("%N/%N") html_page.add_html_code ("%N

%NCity: %N") html_page.add_html_code ("

%NCountry: ") --Add select box with all 192 UN Countries + default html_page.add_html_code ("

%NPapers submission deadline (dd/mm/yyyy): /%N") html_page.add_html_code ("%N/%N") html_page.add_html_code ("%N (for other deadlines see below)

%NMain sponsor: %N
%N
Conference url: %N

%NContact name: ") html_page.add_html_code ("%NContact email: ") html_page.add_html_code ("%NContact role:") html_page.add_html_code ("%N

OPTIONAL INFORMATION:

Keywords: Additional sponsors: %N
%N
%N
%N
%N
%N
Short event description: 

%N
Additional notes: 

%N

Event chair 1: 
%N") html_page.add_html_code ("
Event chair 2: %N

Program committee chair 1: 
%N") html_page.add_html_code ("
Program committee chair 2: %N

Organizing chair: %N

Proceedings: at conference post conference

Proceedings: at conferencePost conference

Proceedings Publisher: %N

%NOther deadline (dd/mm/yyyy): /%N") html_page.add_html_code ("%N/%N") html_page.add_html_code ("%N %N") html_page.add_html_code ("

Deadline for: %N

%NOther deadline (dd/mm/yyyy): /%N") html_page.add_html_code ("%N/%N") html_page.add_html_code ("%N %N") html_page.add_html_code ("

Deadline for: %N

%NOther deadline (dd/mm/yyyy): /%N") html_page.add_html_code ("%N/%N") html_page.add_html_code ("%N %N") html_page.add_html_code ("

Deadline for: %N
") if the_conference.status_of_approval=Proposed OR the_conference.status_of_approval=Delayed then -- Add admin buttons html_page.add_html_code("


%N%N") elseif the_conference.status_of_approval=Accepted then -- Add Update, Move to past events and Delete buttons html_page.add_html_code("


%N") else check conference_state_of_approval_not_consistent:False end end --Add the footer html_page.add_html_code ("









%N") html_page.add_html_code (get_footer+"
%N
%N") --Add the form end html_page.add_html_code ("
%N") Result:=html_page ensure page_created:Result /=Void end ----------------------------------------------------------------------------------------------------------------------- build_conference_list_admin_page(the_proposed_conference_list, the_accepted_conference_list:CONFERENCE_LIST): HTML_PAGE --This page is displayed when the administrator logs in; shows two lists: --1) The proposed and deferred (delayed) conference list, with hyperlinks for details --2) The accepted conference list, with hyperlinks for details require the_proposed_conference_list_exists:the_proposed_conference_list /= Void the_accepted_conference_list_exists:the_accepted_conference_list /= Void local html_page:HTML_PAGE html_table_conferences_data:HTML_TABLE do create html_page.make -- Add the and tags html_page.add_html_code (""+get_meta_tag) -- Add the tag html_page.add_html_code ("<TITLE>Informatics Europe: Event List Page%N") --add the CSS html_page.add_html_code (get_css) html_page.add_html_code ("") --Add the form start html_page.add_html_code ("
%N") --Add the container table, the logo and the title html_page.add_html_code ("%N") html_page.add_html_code ("%N%N%N") --Add the administrator general info html_page.add_html_code ("%N%N%N") --Add the container table conferences list info row html_page.add_html_code ("%N%N%N%N") --Add the container table conferences list info row html_page.add_html_code ("%N") --Add the container table end html_page.add_html_code ("") html_page.add_html_code ("") html_page.add_html_code ("") html_page.add_html_code ("%N
%N") html_page.add_html_code ("") html_page.add_html_code ("%N%N") html_page.add_html_code ("") html_page.add_html_code ("%N") html_page.add_html_code ("%N%N
   
%N%N%N%N%N%N%N
"+get_logo+ "
 
 
%N
 "+ get_common_header+"
%N") html_page.add_html_code ("








%N
%N") html_page.add_html_code(" 

This page contains two lists: the proposed/deferred event list and the accepted event list.

") html_page.add_html_code("

By clicking on an hyperlink you can have access to the event details page where you can perform actions on the event itself.

%N") html_page.add_html_code("

Proposed and deferred event list; current and recent events

%N
%N") -- Prepare and add the table with the proposed/deferred conferences list info html_table_conferences_data:=prepare_html_conference_list_table (the_proposed_conference_list) html_page.add_html_code (html_table_conferences_data.out) html_page.add_html_code ("




%N") html_page.add_html_code("

Accepted event list; current and recent events

%N
%N") -- Prepare and add the table with the accepted conferences list info html_table_conferences_data:=prepare_html_conference_list_table (the_accepted_conference_list) html_page.add_html_code (html_table_conferences_data.out) --Add the footer html_page.add_html_code ("









%N") html_page.add_html_code (get_footer+"
 
 
 
%N") --Add the form end html_page.add_html_code("
%N") Result:=html_page ensure page_created: Result /=Void end ----------------------------------------------------------------------------------------------------------------------- build_login_page(errors:HASH_TABLE[STRING,STRING]): HTML_PAGE --This page is the login page, valid for both user and administrator login require errors_exists:errors/=Void local html_page:HTML_PAGE do create html_page.make -- Add the and tags html_page.add_html_code (""+get_meta_tag) -- Add the tag html_page.add_html_code ("<TITLE>Informatics Europe: Administrator login Page%N") --add the CSS html_page.add_html_code (get_css) html_page.add_html_code ("") --Add the form start html_page.add_html_code ("
%N") --Add the container table, the logo and the title html_page.add_html_code ("%N") html_page.add_html_code ("%N%N%N") if NOT errors.is_empty then --Add the errors info html_page.add_html_code("%N") end -- Add userid and password textfields and submit conference proposal button html_page.add_html_code ("") --Add the container table end html_page.add_html_code ("") html_page.add_html_code ("") html_page.add_html_code ("") html_page.add_html_code ("%N
%N") html_page.add_html_code ("") html_page.add_html_code ("%N%N") html_page.add_html_code ("") html_page.add_html_code ("%N") html_page.add_html_code ("%N%N%N
   
%N%N%N%N%N%N%N
"+get_logo+ "
 
 
%N
 "+ get_common_header+"
  

Administrator login

%N") html_page.add_html_code ("
%N") html_page.add_html_code ("








%N
Please check the following:
%N") from errors.start html_page.add_html_code ("
    ") until errors.after loop html_page.add_html_code ("
  • ") html_page.add_html_code (errors.item_for_iteration) html_page.add_html_code ("
  • ") html_page.add_html_code ("%N
    ") errors.forth end html_page.add_html_code ("
") html_page.add_html_code("









%N

User id: %N") html_page.add_html_code ("Password%N") html_page.add_html_code ("

%N") --Add the footer html_page.add_html_code ("









%N") html_page.add_html_code (get_footer+"
 
 
 
%N") --Add the form end html_page.add_html_code("
%N") Result:=html_page ensure page_created: Result /= Void end ----------------------------------------------------------------------------------------------------------------------- build_exit_page(message:STRING): HTML_PAGE --This is a simple exit page that displays a message that depends on which operation has been consolidated require message_exists:message/=Void local html_page:HTML_PAGE do create html_page.make -- Add the and tags html_page.add_html_code (""+get_meta_tag) -- Add the tag html_page.add_html_code ("<TITLE>Informatics Europe: Exit Page%N") --add the CSS html_page.add_html_code (get_css) html_page.add_html_code ("") --Add the form start html_page.add_html_code ("
%N") --Add the container table, the logo and the title html_page.add_html_code ("%N") html_page.add_html_code ("%N%N%N") --Add the exit message html_page.add_html_code ("%N") --Add the container table button row html_page.add_html_code ("%N%N%N") --Add the footer html_page.add_html_code ("") --Add the tables end html_page.add_html_code ("
%N") html_page.add_html_code ("") html_page.add_html_code ("%N%N") html_page.add_html_code ("") html_page.add_html_code ("%N") html_page.add_html_code ("%N%N%N
   
%N%N%N%N%N%N%N
"+get_logo+ "
 
 
%N
 "+ get_common_header+"
  

Exit page

%N") html_page.add_html_code ("
%N") html_page.add_html_code ("








%N







"+message+"
") html_page.add_html_code ("



%N") html_page.add_html_code ("%N
") -- Add button html_page.add_html_code ("%N") html_page.add_html_code ("%N









%N") html_page.add_html_code (get_footer+"
%N") --Add the form end html_page.add_html_code("
%N") Result:=html_page ensure page_created: Result /=Void end feature {NONE} -- Implementation ----------------------------------------------------------------------------------------------------------------------- prepare_html_conference_list_table(the_conference_list:CONFERENCE_LIST):HTML_TABLE --helper routine that builds and returns the html table initialized with conferences data require the_conference_list_exists:the_conference_list /= Void local a_fake_conference:CONFERENCE do create a_fake_conference.make --creates the table with the right number of rows (+ 1 for the header) and the right number of columns create Result.make(the_conference_list.count+1,Conference_list_number_of_columns) if the_conference_list.count =0 then --adds the header Result.add_row (a_fake_conference.admin_arrayed_conference_metadata) else --takes the first conference of the list and reads the metadata the_conference_list.start --adds the header Result.add_row (the_conference_list.item.admin_arrayed_conference_metadata) from the_conference_list.start until the_conference_list.after loop Result.add_row (the_conference_list.item.admin_arrayed_conference_data) the_conference_list.forth end end Result.set_border (1) ensure table_created:Result /=Void end invariant invariant_clause: True -- Your invariant here end