Skip to content

Commit a9344d5

Browse files
committed
Add titles to non-catalog pages
Add page titles to `application/controllers/`. As with the catalog, each will have " | LibriVox" tacked on the end. * Auth: Login * admin/Author_manager: Author Manager * admin/Genre_manager: Genre Manager * admin/Language_Manager: Language Manager * private/Administer_projects: [ \<project title\> | ] Project Screen * private/Groups: Group Manager * private/Projects: \<'My projects' or 'Search projects'\> * private/Section_Compiler: <'Select a project' or project title\> | Section Compiler * private/Stats.php - each as titled in the menu, aside from the index, which is not linked in the menu and does not appear to be implemented. * private/Validator: \<'Select a project' or project title\> | Validator * private/Volunteers: Search Users Note: this includes all of the links under the 'People' menu, except for 'Add New'. * public/Home (aka `/workflow` landing page): Workflow Tool * public/Project_launch: \<'Project template generator' or 'Template results page'\> * public/Uploader: Upload files New file `application/views/common/workflow_head.php`, to load the `page_title` into an HTML->head->title element.
1 parent 4b631aa commit a9344d5

15 files changed

+52
-2
lines changed

application/controllers/Auth.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function login($redirect_url = '')
6363
}
6464

6565
$this->data['title'] = "Login";
66+
$this->data['page_title'] = "Login";
6667

6768
//validate form input
6869
$this->form_validation->set_rules('identity', 'Identity', 'required');
@@ -116,6 +117,7 @@ function login($redirect_url = '')
116117
$this->data['redirect_url'] = $redirect_url;
117118

118119
//$this->load->view('auth/login', $this->data);
120+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
119121
$this->template->write_view('content_left', build_view_path(__METHOD__), $this->data);
120122
$this->template->render();
121123
}

application/controllers/admin/Author_manager.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function index()
2020
{
2121
ini_set('memory_limit', '-1'); //we need to see about chunking this
2222

23+
$this->data['page_title'] = 'Author Manager';
2324
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
2425
$this->data['author_blurb_modal'] = $this->load->view('admin/author_manager/author_blurb_modal', $this->data, TRUE);
2526
$this->data['author_projects_modal'] = $this->load->view('admin/author_manager/author_projects_modal', $this->data, TRUE);
@@ -31,6 +32,7 @@ public function index()
3132
$this->insertMethodCSS();
3233
$this->insertMethodJS();
3334

35+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
3436
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
3537
$this->template->render();
3638
}

application/controllers/admin/Genre_manager.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public function __construct()
1515

1616
public function index()
1717
{
18+
$this->data['page_title'] = 'Genre Manager';
1819
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
1920

2021
$this->data['genres'] = $this->mahana_hierarchy->get_sorted_children();
@@ -30,6 +31,7 @@ public function index()
3031

3132
$this->insertMethodJS();
3233

34+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
3335
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
3436
$this->template->render();
3537
}

application/controllers/admin/Language_manager.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ public function index()
2020
{
2121
ini_set('memory_limit', '-1'); //we need to see about chunking this
2222

23+
$this->data['page_title'] = 'Language Manager';
2324
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
2425

2526
$this->data['languages'] = $this->language_model->order_by('common', 'desc')->order_by('language', 'asc')->get_all(); //
2627

2728
$this->insertMethodCSS();
2829
$this->insertMethodJS();
2930

31+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
3032
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
3133
$this->template->render();
3234
}

application/controllers/private/Administer_projects.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function add_catalog_item($project_id = 0)
4141
$prototype['usage'] = is_numeric($project_id) ? 'project_id' : $project_id;
4242
$prototype['project_id'] = is_numeric($project_id) ? $project_id : 0;
4343

44+
$this->data['page_title'] = 'Project Screen';
4445
$prototype['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
4546

4647
// to add extra urls - this should not be on the project_launch form
@@ -61,6 +62,8 @@ public function add_catalog_item($project_id = 0)
6162
$this->load->model('project_model');
6263
$project = $this->project_model->get($project_id);
6364

65+
if (!is_null($project)) $this->data['page_title'] = create_full_title($project) .' | '. $this->data['page_title'];
66+
6467
$volunteers = array('bc', 'altbc', 'mc', 'pl');
6568

6669
foreach ($volunteers as $key => $type)
@@ -114,6 +117,7 @@ public function add_catalog_item($project_id = 0)
114117
$this->template->add_css('css/private/administer_projects/new_project_form.css');
115118
$this->template->add_js('js/private/administer_projects/new_project_form.js');
116119

120+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
117121
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $prototype);
118122
$this->template->render();
119123
}

application/controllers/private/Groups.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class Groups extends Private_Controller
55

66
public function index()
77
{
8+
$this->data['page_title'] = 'Group Manager';
89
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
910

1011
$this->load->model('group_model');
@@ -18,6 +19,7 @@ public function index()
1819

1920
$this->insertMethodJS();
2021

22+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
2123
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
2224
$this->template->render();
2325
}

application/controllers/private/Projects.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public function index($user_projects = false)
2121

2222
$this->data['project_search'] = empty($params['project_search']) ? '' : $params['project_search'];
2323

24+
$this->data['page_title'] = $user_projects ? 'My Projects' : 'Search Projects';
2425
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
2526

2627
//load volunteers AFTER the menu_header
@@ -59,6 +60,7 @@ public function index($user_projects = false)
5960
$this->insertMethodCSS();
6061
$this->insertMethodJS();
6162

63+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
6264
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
6365
$this->template->render();
6466
}

application/controllers/private/Section_compiler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public function index($project_id = 0)
3535
$this->load->model('project_model');
3636
$this->data['project'] = $this->project_model->get($project_id);
3737

38+
$this->data['page_title'] = create_full_title($this->data['project']) .' | Section Compiler';
39+
3840
$this->data['admin_mc'] = 0;
3941

4042
$allowed_groups = array(PERMISSIONS_ADMIN, PERMISSIONS_MCS);
@@ -73,12 +75,14 @@ public function index($project_id = 0)
7375

7476
$this->template->add_js('js/common/autocomplete.js');
7577

78+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
7679
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
7780
$this->template->render();
7881
}
7982

8083
public function select_project()
8184
{
85+
$this->data['page_title'] = 'Select a project | Section Compiler';
8286
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
8387

8488
$this->data['statuses'] = $this->config->item('project_statuses');
@@ -90,6 +94,7 @@ public function select_project()
9094
$this->template->add_css('css/private/administer_projects/new_project_form.css'); //reuse results styling
9195
$this->insertMethodJS();
9296

97+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
9398
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
9499
$this->template->render();
95100
}

application/controllers/private/Stats.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ public function index($user_id = 0)
1818
{
1919
$user_id = ($user_id) ? $user_id : $this->librivox_auth->get_user_id();
2020

21+
$this->data['page_title'] = 'Stats';
2122
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
2223

2324
$this->load->model('project_model');
2425

2526
$this->insertMethodCSS();
2627
$this->insertMethodJS();
2728

29+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
2830
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
2931
$this->template->render();
3032
}
@@ -39,20 +41,23 @@ public function mc_stats()
3941
}
4042

4143
//https://catalog.librivox.org/MCstats.php
44+
$this->data['page_title'] = 'MC Stats';
4245
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
4346

4447
$this->data['volunteers'] = $this->stats_model->mc_stats();
4548

4649
$this->insertMethodCSS();
4750
$this->insertMethodJS();
4851

52+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
4953
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
5054
$this->template->render();
5155
}
5256

5357
public function monthly_stats()
5458
{
5559
//https://catalog.librivox.org/monthly.php
60+
$this->data['page_title'] = 'Monthly Stats';
5661
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
5762

5863
$this->data['monthly_stats'] = $this->stats_model->monthly_stats();
@@ -61,13 +66,15 @@ public function monthly_stats()
6166
$this->insertMethodCSS();
6267
$this->insertMethodJS();
6368

69+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
6470
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
6571
$this->template->render();
6672
}
6773

6874
public function general_stats()
6975
{
7076
//https://catalog.librivox.org/stats.php -- general stats page
77+
$this->data['page_title'] = 'General Stats';
7178
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
7279

7380
//$this->data['stats'] = $this->stats_model->monthly_stats();
@@ -83,6 +90,7 @@ public function general_stats()
8390
$this->insertMethodCSS();
8491
$this->insertMethodJS();
8592

93+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
8694
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
8795
$this->template->render();
8896
}
@@ -92,11 +100,13 @@ public function chapters_count($user_id = 0)
92100
$user_id = ($user_id) ? $user_id : $this->librivox_auth->get_user_id();
93101

94102
//https://catalog.librivox.org/chapters_count.php
103+
$this->data['page_title'] = 'Chapters Count';
95104
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
96105

97106
$this->insertMethodCSS();
98107
$this->insertMethodJS();
99108

109+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
100110
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
101111
$this->template->render();
102112
}
@@ -106,6 +116,7 @@ public function sections($user_id = 0)
106116
$user_id = ($user_id) ? $user_id : $this->librivox_auth->get_user_id();
107117

108118
//https://catalog.librivox.org/chapters_count.php
119+
$this->data['page_title'] = 'Sections';
109120
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
110121

111122
$this->load->model('section_model');
@@ -164,6 +175,7 @@ public function sections($user_id = 0)
164175
$this->insertMethodCSS();
165176
$this->insertMethodJS();
166177

178+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
167179
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
168180
$this->template->render();
169181
}
@@ -191,6 +203,7 @@ public function active_projects()
191203
redirect(base_url() . '/auth/error_no_permission');
192204
}
193205

206+
$this->data['page_title'] = 'Active Projects';
194207
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
195208

196209
$this->data['projects'] = $this->stats_model->active_projects();
@@ -224,6 +237,7 @@ public function active_projects()
224237
$this->insertMethodCSS();
225238
$this->insertMethodJS();
226239

240+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
227241
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
228242
$this->template->render();
229243
}

application/controllers/private/Validator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public function index($project_id = 0)
6060
$this->data['project']->author_full_name = $this->_get_author_by_project($project_id);
6161
$this->data['project']->author_last_name = $this->_get_author_by_project($project_id, 'last');
6262

63+
$this->data['page_title'] = $this->data['project']->full_title .' | Validator';
64+
6365
//section info
6466
$this->load->model('section_model');
6567
$sections = $this->section_model->as_array()->get_many_by(array('project_id' => $project_id));
@@ -114,12 +116,14 @@ public function index($project_id = 0)
114116
$this->template->add_js('js/uploader/jquery.fileupload-ui.js');
115117
$this->template->add_js('js/uploader/main-validator.js');
116118

119+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
117120
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
118121
$this->template->render();
119122
}
120123

121124
public function select_project()
122125
{
126+
$this->data['page_title'] = 'Select a project | Validator';
123127
$this->data['menu_header'] = $this->load->view('private/common/menu_header', $this->data, TRUE);
124128

125129
$this->data['statuses'] = $this->config->item('project_statuses');
@@ -131,6 +135,7 @@ public function select_project()
131135
$this->template->add_css('css/private/administer_projects/new_project_form.css'); //reuse results styling
132136
$this->insertMethodJS();
133137

138+
$this->template->write_view('head', 'common/workflow_head.php', $this->data);
134139
$this->template->write_view('content_left', $this->base_path . '/' . build_view_path(__METHOD__), $this->data);
135140
$this->template->render();
136141
}

0 commit comments

Comments
 (0)