~bibledit/bibledit/ubuntu-cloud-beta

« back to all changes in this revision

Viewing changes to editone2/index.cpp

  • Committer: Teus Benschop
  • Date: 2022-10-14 16:03:26 UTC
  • Revision ID: teusjannette@gmail.com-20221014160326-42ybrpft4bblpruk
new upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    minimum_role = Filter_Roles::consultant ();
59
59
  }
60
60
  if (Filter_Roles::access_control (webserver_request, minimum_role)) return true;
61
 
  auto [ read, write ] = AccessBible::Any (webserver_request);
 
61
  auto [ read, write ] = access_bible::any (webserver_request);
62
62
  return read;
63
63
}
64
64
 
83
83
    // Standard it will be Terjemahanku (My Translation).
84
84
    // When the user changed that to another name, the editor will load that other name.
85
85
    {
86
 
      vector <string> bibles = AccessBible::Bibles (request);
 
86
      vector <string> bibles = access_bible::bibles (request);
87
87
      string selected_bible;
88
88
      for (auto bible : bibles) {
89
89
        if (bible != filter::indonesian::ourtranslation ()) selected_bible = bible;
92
92
        // No Bible selected yet: Create the Indonesian Sample Bible and take that.
93
93
        string user = request->session_logic ()->currentUser ();
94
94
        selected_bible = filter::indonesian::mytranslation (user);
95
 
        bible_logic_create_empty_bible (selected_bible);
 
95
        bible_logic::create_empty_bible (selected_bible);
96
96
      }
97
97
      request->database_config_user()->setBible (selected_bible);
98
98
    }
108
108
  string page;
109
109
  
110
110
  Assets_Header header = Assets_Header (translate("Edit verse"), request);
111
 
  header.setNavigator ();
112
 
  header.setEditorStylesheet ();
113
 
  if (touch) header.jQueryTouchOn ();
114
 
  header.notifItOn ();
115
 
  header.addBreadCrumb (menu_logic_translate_menu (), menu_logic_translate_text ());
 
111
  header.set_navigator ();
 
112
  header.set_editor_stylesheet ();
 
113
  if (touch) header.jquery_touch_on ();
 
114
  header.notify_it_on ();
 
115
  header.add_bread_crumb (menu_logic_translate_menu (), menu_logic_translate_text ());
116
116
  page = header.run ();
117
117
  
118
118
  Assets_View view;
121
121
  // Or if the user have used query to preset the active Bible, get the preset Bible.
122
122
  // If needed, change Bible to one it has read access to.
123
123
  // Set the chosen Bible on the option HTML tag.
124
 
  string bible = AccessBible::Clamp (request, request->database_config_user()->getBible ());
125
 
  if (request->query.count ("bible")) bible = AccessBible::Clamp (request, request->query ["bible"]);
 
124
  string bible = access_bible::clamp (request, request->database_config_user()->getBible ());
 
125
  if (request->query.count ("bible")) bible = access_bible::clamp (request, request->query ["bible"]);
126
126
  string bible_html;
127
 
  vector <string> bibles = AccessBible::Bibles (request);
 
127
  vector <string> bibles = access_bible::bibles (request);
128
128
  for (auto selectable_bible : bibles) {
129
129
    bible_html = Options_To_Select::add_selection (selectable_bible, selectable_bible, bible_html);
130
130
  }
179
179
  
180
180
  page += view.render ("editone2", "index");
181
181
  
182
 
  page += Assets_Page::footer ();
 
182
  page += assets_page::footer ();
183
183
  
184
184
  return page;
185
185
}