View | Details | Raw Unified | Return to bug 5550 | Differences between
and this patch

Collapse All | Expand All

(-)a/classes/article/AuthorDAO.inc.php (-20 / +22 lines)
 Lines 65-83   class AuthorDAO extends PKPAuthorDAO { Link Here 
65
	function &getPublishedArticlesForAuthor($journalId, $firstName, $middleName, $lastName, $affiliation, $country) {
65
	function &getPublishedArticlesForAuthor($journalId, $firstName, $middleName, $lastName, $affiliation, $country) {
66
		$publishedArticles = array();
66
		$publishedArticles = array();
67
		$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
67
		$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
68
		$params = array($firstName, $middleName, $lastName, $affiliation, $country);
68
		$params = array(
69
		if ($journalId !== null) $params[] = $journalId;
69
			'affiliation',
70
			$firstName, $middleName, $lastName,
71
			$affiliation, $country
72
		);
73
		if ($journalId !== null) $params[] = (int) $journalId;
70
74
71
		$result =& $this->retrieve(
75
		$result =& $this->retrieve(
72
			'SELECT DISTINCT
76
			'SELECT DISTINCT
73
				aa.submission_id
77
				aa.submission_id
74
			FROM	authors aa
78
			FROM	authors aa
75
				LEFT JOIN articles a ON (aa.submission_id = a.article_id)
79
				LEFT JOIN articles a ON (aa.submission_id = a.article_id)
80
				LEFT JOIN author_settings as ON (as.author_id = aa.author_id AND as.setting_name = ?)
76
			WHERE	aa.first_name = ?
81
			WHERE	aa.first_name = ?
77
				AND a.status = ' . STATUS_PUBLISHED . '
82
				AND a.status = ' . STATUS_PUBLISHED . '
78
				AND (aa.middle_name = ?' . (empty($middleName)?' OR aa.middle_name IS NULL':'') . ')
83
				AND (aa.middle_name = ?' . (empty($middleName)?' OR aa.middle_name IS NULL':'') . ')
79
				AND aa.last_name = ?
84
				AND aa.last_name = ?
80
				AND (aa.affiliation = ?' . (empty($affiliation)?' OR aa.affiliation IS NULL':'') . ')
85
				AND (as.setting_value = ?' . (empty($affiliation)?' OR as.setting_value IS NULL':'') . ')
81
				AND (aa.country = ?' . (empty($country)?' OR aa.country IS NULL':'') . ') ' .
86
				AND (aa.country = ?' . (empty($country)?' OR aa.country IS NULL':'') . ') ' .
82
				($journalId!==null?(' AND a.journal_id = ?'):''),
87
				($journalId!==null?(' AND a.journal_id = ?'):''),
83
			$params
88
			$params
 Lines 134-152   class AuthorDAO extends PKPAuthorDAO { Link Here 
134
				aa.first_name AS first_name,
139
				aa.first_name AS first_name,
135
				aa.middle_name AS middle_name,
140
				aa.middle_name AS middle_name,
136
				aa.last_name AS last_name,
141
				aa.last_name AS last_name,
137
				aa.affiliation AS affiliation,
142
				as.setting_value AS affiliation,
138
				aa.country
143
				aa.country
139
			FROM	authors aa,
144
			FROM	authors aa
140
				articles a,
145
				LEFT JOIN author_settings AS on (aa.author_id = as.author_id AND as.setting_name = ?)
141
				published_articles pa,
146
				LEFT JOIN articles a ON (a.article_id = as.article_id)
142
				issues i
147
				LEFT JOIN published_articles pa ON (pa.article_id = a.article_id)
143
			WHERE	i.issue_id = pa.issue_id
148
				LEFT JOIN issues i ON (pa.issue_id = i.issue_id)
144
				AND i.published = 1
149
			WHERE	i.published = 1 AND
145
				AND aa.submission_id = a.article_id ' .
150
				aa.submission_id = a.article_id AND ' .
146
				(isset($journalId)?'AND a.journal_id = ? ':'') . '
151
				(isset($journalId)?'a.journal_id = ? AND ':'') . '
147
				AND pa.article_id = a.article_id
152
				pa.article_id = a.article_id AND
148
				AND a.status = ' . STATUS_PUBLISHED . '
153
				a.status = ' . STATUS_PUBLISHED . ' AND
149
				AND (aa.last_name IS NOT NULL AND aa.last_name <> \'\')' .
154
				(aa.last_name IS NOT NULL AND aa.last_name <> \'\')' .
150
				$initialSql . '
155
				$initialSql . '
151
			ORDER BY aa.last_name, aa.first_name',
156
			ORDER BY aa.last_name, aa.first_name',
152
			empty($params)?false:$params,
157
			empty($params)?false:$params,
 Lines 172-186   class AuthorDAO extends PKPAuthorDAO { Link Here 
172
	function insertAuthor(&$author) {
177
	function insertAuthor(&$author) {
173
		$this->update(
178
		$this->update(
174
			'INSERT INTO authors
179
			'INSERT INTO authors
175
				(submission_id, first_name, middle_name, last_name, affiliation, country, email, url, primary_contact, seq)
180
				(submission_id, first_name, middle_name, last_name, country, email, url, primary_contact, seq)
176
				VALUES
181
				VALUES
177
				(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
182
				(?, ?, ?, ?, ?, ?, ?, ?, ?)',
178
			array(
183
			array(
179
				$author->getSubmissionId(),
184
				$author->getSubmissionId(),
180
				$author->getFirstName(),
185
				$author->getFirstName(),
181
				$author->getMiddleName() . '', // make non-null
186
				$author->getMiddleName() . '', // make non-null
182
				$author->getLastName(),
187
				$author->getLastName(),
183
				$author->getAffiliation() . '', // make non-null
184
				$author->getCountry(),
188
				$author->getCountry(),
185
				$author->getEmail(),
189
				$author->getEmail(),
186
				$author->getUrl(),
190
				$author->getUrl(),
 Lines 205-211   class AuthorDAO extends PKPAuthorDAO { Link Here 
205
			SET	first_name = ?,
209
			SET	first_name = ?,
206
				middle_name = ?,
210
				middle_name = ?,
207
				last_name = ?,
211
				last_name = ?,
208
				affiliation = ?,
209
				country = ?,
212
				country = ?,
210
				email = ?,
213
				email = ?,
211
				url = ?,
214
				url = ?,
 Lines 216-222   class AuthorDAO extends PKPAuthorDAO { Link Here 
216
				$author->getFirstName(),
219
				$author->getFirstName(),
217
				$author->getMiddleName() . '', // make non-null
220
				$author->getMiddleName() . '', // make non-null
218
				$author->getLastName(),
221
				$author->getLastName(),
219
				$author->getAffiliation() . '', // make non-null
220
				$author->getCountry(),
222
				$author->getCountry(),
221
				$author->getEmail(),
223
				$author->getEmail(),
222
				$author->getUrl(),
224
				$author->getUrl(),
(-)a/classes/article/PublishedArticleDAO.inc.php (-5 / +17 lines)
 Lines 746-759   class PublishedArticleDAO extends DAO { Link Here 
746
	 * @return $authors array Author Objects
746
	 * @return $authors array Author Objects
747
	 */
747
	 */
748
	function getPublishedArticleAuthors($issueId) {
748
	function getPublishedArticleAuthors($issueId) {
749
		$primaryLocale = Locale::getPrimaryLocale();
750
		$locale = Locale::getLocale();
751
749
		$authors = array();
752
		$authors = array();
750
		$result =& $this->retrieve(
753
		$result =& $this->retrieve(
751
			'SELECT	aa.*
754
			'SELECT	aa.*,
752
			FROM	authors aa,
755
				aspl.setting_value AS affiliation_pl,
753
				published_articles pa
756
				asl.setting_value AS affiliation_l
757
			FROM	authors aa
758
				LEFT JOIN published_articles pa ON (pa.article_id = aa.article_id)
759
				LEFT JOIN author_settings aspl ON (aspl.author_id = aa.author_id AND aspl.setting_name = ? AND aspl.locale = ?)
760
				LEFT JOIN author_settings asl ON (asl.author_id = aa.author_id AND asl.setting_name = ? AND asl.locale = ?)
754
			WHERE	aa.submission_id = pa.article_id AND
761
			WHERE	aa.submission_id = pa.article_id AND
755
				pa.issue_id = ? ORDER BY pa.issue_id',
762
				pa.issue_id = ? ORDER BY pa.issue_id',
756
			(int) $issueId
763
			array(
764
				'affiliation', $primaryLocale,
765
				'affiliation', $locale,
766
				(int) $issueId
767
			)
757
		);
768
		);
758
769
759
		while (!$result->EOF) {
770
		while (!$result->EOF) {
 Lines 764-770   class PublishedArticleDAO extends DAO { Link Here 
764
			$author->setFirstName($row['first_name']);
775
			$author->setFirstName($row['first_name']);
765
			$author->setMiddleName($row['middle_name']);
776
			$author->setMiddleName($row['middle_name']);
766
			$author->setLastName($row['last_name']);
777
			$author->setLastName($row['last_name']);
767
			$author->setAffiliation($row['affiliation']);
778
			$author->setAffiliation($row['affiliation_pl'], $primaryLocale);
779
			$author->setAffiliation($row['affiliation_l'], $locale);
768
			$author->setEmail($row['email']);
780
			$author->setEmail($row['email']);
769
			$author->setBiography($row['biography']);
781
			$author->setBiography($row['biography']);
770
			$author->setPrimaryContact($row['primary_contact']);
782
			$author->setPrimaryContact($row['primary_contact']);
(-)a/classes/author/form/submit/AuthorSubmitStep1Form.inc.php (-1 / +1 lines)
 Lines 162-168   class AuthorSubmitStep1Form extends AuthorSubmitForm { Link Here 
162
			$author->setFirstName($user->getFirstName());
162
			$author->setFirstName($user->getFirstName());
163
			$author->setMiddleName($user->getMiddleName());
163
			$author->setMiddleName($user->getMiddleName());
164
			$author->setLastName($user->getLastName());
164
			$author->setLastName($user->getLastName());
165
			$author->setAffiliation($user->getAffiliation());
165
			$author->setAffiliation($user->getAffiliation(null), null);
166
			$author->setCountry($user->getCountry());
166
			$author->setCountry($user->getCountry());
167
			$author->setEmail($user->getEmail());
167
			$author->setEmail($user->getEmail());
168
			$author->setUrl($user->getUrl());
168
			$author->setUrl($user->getUrl());
(-)a/classes/author/form/submit/AuthorSubmitStep3Form.inc.php (-2 / +2 lines)
 Lines 77-83   class AuthorSubmitStep3Form extends AuthorSubmitForm { Link Here 
77
						'firstName' => $authors[$i]->getFirstName(),
77
						'firstName' => $authors[$i]->getFirstName(),
78
						'middleName' => $authors[$i]->getMiddleName(),
78
						'middleName' => $authors[$i]->getMiddleName(),
79
						'lastName' => $authors[$i]->getLastName(),
79
						'lastName' => $authors[$i]->getLastName(),
80
						'affiliation' => $authors[$i]->getAffiliation(),
80
						'affiliation' => $authors[$i]->getAffiliation(null),
81
						'country' => $authors[$i]->getCountry(),
81
						'country' => $authors[$i]->getCountry(),
82
						'email' => $authors[$i]->getEmail(),
82
						'email' => $authors[$i]->getEmail(),
83
						'url' => $authors[$i]->getUrl(),
83
						'url' => $authors[$i]->getUrl(),
 Lines 199-205   class AuthorSubmitStep3Form extends AuthorSubmitForm { Link Here 
199
				$author->setFirstName($authors[$i]['firstName']);
199
				$author->setFirstName($authors[$i]['firstName']);
200
				$author->setMiddleName($authors[$i]['middleName']);
200
				$author->setMiddleName($authors[$i]['middleName']);
201
				$author->setLastName($authors[$i]['lastName']);
201
				$author->setLastName($authors[$i]['lastName']);
202
				$author->setAffiliation($authors[$i]['affiliation']);
202
				$author->setAffiliation($authors[$i]['affiliation'], null);
203
				$author->setCountry($authors[$i]['country']);
203
				$author->setCountry($authors[$i]['country']);
204
				$author->setEmail($authors[$i]['email']);
204
				$author->setEmail($authors[$i]['email']);
205
				$author->setUrl($authors[$i]['url']);
205
				$author->setUrl($authors[$i]['url']);
(-)a/classes/manager/form/UserManagementForm.inc.php (-2 / +2 lines)
 Lines 156-162   class UserManagementForm extends Form { Link Here 
156
					'signature' => $user->getSignature(null), // Localized
156
					'signature' => $user->getSignature(null), // Localized
157
					'initials' => $user->getInitials(),
157
					'initials' => $user->getInitials(),
158
					'gender' => $user->getGender(),
158
					'gender' => $user->getGender(),
159
					'affiliation' => $user->getAffiliation(),
159
					'affiliation' => $user->getAffiliation(null), // Localized
160
					'email' => $user->getEmail(),
160
					'email' => $user->getEmail(),
161
					'userUrl' => $user->getUrl(),
161
					'userUrl' => $user->getUrl(),
162
					'phone' => $user->getPhone(),
162
					'phone' => $user->getPhone(),
 Lines 256-262   class UserManagementForm extends Form { Link Here 
256
		$user->setLastName($this->getData('lastName'));
256
		$user->setLastName($this->getData('lastName'));
257
		$user->setInitials($this->getData('initials'));
257
		$user->setInitials($this->getData('initials'));
258
		$user->setGender($this->getData('gender'));
258
		$user->setGender($this->getData('gender'));
259
		$user->setAffiliation($this->getData('affiliation'));
259
		$user->setAffiliation($this->getData('affiliation'), null); // Localized
260
		$user->setSignature($this->getData('signature'), null); // Localized
260
		$user->setSignature($this->getData('signature'), null); // Localized
261
		$user->setEmail($this->getData('email'));
261
		$user->setEmail($this->getData('email'));
262
		$user->setUrl($this->getData('userUrl'));
262
		$user->setUrl($this->getData('userUrl'));
(-)a/classes/search/ArticleSearchIndex.inc.php (-1 / +4 lines)
 Lines 162-168   class ArticleSearchIndex { Link Here 
162
			array_push($authorText, $author->getFirstName());
162
			array_push($authorText, $author->getFirstName());
163
			array_push($authorText, $author->getMiddleName());
163
			array_push($authorText, $author->getMiddleName());
164
			array_push($authorText, $author->getLastName());
164
			array_push($authorText, $author->getLastName());
165
			array_push($authorText, $author->getAffiliation());
165
			$affiliations = $author->getAffiliation(null);
166
			if (is_array($affiliations)) foreach ($affiliations as $affiliation) { // Localized
167
				array_push($authorText, $affiliation);
168
			}
166
			$bios = $author->getBiography(null);
169
			$bios = $author->getBiography(null);
167
			if (is_array($bios)) foreach ($bios as $bio) { // Localized
170
			if (is_array($bios)) foreach ($bios as $bio) { // Localized
168
				array_push($authorText, strip_tags($bio));
171
				array_push($authorText, strip_tags($bio));
(-)a/classes/sectionEditor/form/CreateReviewerForm.inc.php (-1 / +1 lines)
 Lines 131-137   class CreateReviewerForm extends Form { Link Here 
131
		$user->setLastName($this->getData('lastName'));
131
		$user->setLastName($this->getData('lastName'));
132
		$user->setGender($this->getData('gender'));
132
		$user->setGender($this->getData('gender'));
133
		$user->setInitials($this->getData('initials'));
133
		$user->setInitials($this->getData('initials'));
134
		$user->setAffiliation($this->getData('affiliation'));
134
		$user->setAffiliation($this->getData('affiliation'), null); // Localized
135
		$user->setEmail($this->getData('email'));
135
		$user->setEmail($this->getData('email'));
136
		$user->setUrl($this->getData('userUrl'));
136
		$user->setUrl($this->getData('userUrl'));
137
		$user->setPhone($this->getData('phone'));
137
		$user->setPhone($this->getData('phone'));
(-)a/classes/submission/form/MetadataForm.inc.php (-2 / +2 lines)
 Lines 128-134   class MetadataForm extends Form { Link Here 
128
						'firstName' => $authors[$i]->getFirstName(),
128
						'firstName' => $authors[$i]->getFirstName(),
129
						'middleName' => $authors[$i]->getMiddleName(),
129
						'middleName' => $authors[$i]->getMiddleName(),
130
						'lastName' => $authors[$i]->getLastName(),
130
						'lastName' => $authors[$i]->getLastName(),
131
						'affiliation' => $authors[$i]->getAffiliation(),
131
						'affiliation' => $authors[$i]->getAffiliation(null), // Localized
132
						'country' => $authors[$i]->getCountry(),
132
						'country' => $authors[$i]->getCountry(),
133
						'countryLocalized' => $authors[$i]->getCountryLocalized(),
133
						'countryLocalized' => $authors[$i]->getCountryLocalized(),
134
						'email' => $authors[$i]->getEmail(),
134
						'email' => $authors[$i]->getEmail(),
 Lines 332-338   class MetadataForm extends Form { Link Here 
332
				$author->setFirstName($authors[$i]['firstName']);
332
				$author->setFirstName($authors[$i]['firstName']);
333
				$author->setMiddleName($authors[$i]['middleName']);
333
				$author->setMiddleName($authors[$i]['middleName']);
334
				$author->setLastName($authors[$i]['lastName']);
334
				$author->setLastName($authors[$i]['lastName']);
335
				$author->setAffiliation($authors[$i]['affiliation']);
335
				$author->setAffiliation($authors[$i]['affiliation'], null); // Localized
336
				$author->setCountry($authors[$i]['country']);
336
				$author->setCountry($authors[$i]['country']);
337
				$author->setEmail($authors[$i]['email']);
337
				$author->setEmail($authors[$i]['email']);
338
				$author->setUrl($authors[$i]['url']);
338
				$author->setUrl($authors[$i]['url']);
(-)a/classes/subscription/SubscriptionAction.inc.php (-1 / +5 lines)
 Lines 238-244   class SubscriptionAction { Link Here 
238
				import('classes.subscription.form.IndividualSubscriptionForm');
238
				import('classes.subscription.form.IndividualSubscriptionForm');
239
				$subscriptionForm = new IndividualSubscriptionForm($subscriptionId, $userId);
239
				$subscriptionForm = new IndividualSubscriptionForm($subscriptionId, $userId);
240
			}
240
			}
241
			$subscriptionForm->initData();
241
			if ($subscriptionForm->isLocaleResubmit()) {
242
				$subscriptionForm->readInputData();
243
			} else {
244
				$subscriptionForm->initData();
245
			}
242
			$subscriptionForm->display();
246
			$subscriptionForm->display();
243
			return true;
247
			return true;
244
		} else {
248
		} else {
(-)a/classes/subscription/form/SubscriptionForm.inc.php (-3 / +3 lines)
 Lines 107-113   class SubscriptionForm extends Form { Link Here 
107
		$templateMgr->assign('userLastName', $user->getLastName());
107
		$templateMgr->assign('userLastName', $user->getLastName());
108
		$templateMgr->assign('userInitials', $user->getInitials());
108
		$templateMgr->assign('userInitials', $user->getInitials());
109
		$templateMgr->assign('userGender', $user->getGender());
109
		$templateMgr->assign('userGender', $user->getGender());
110
		$templateMgr->assign('userAffiliation', $user->getAffiliation());
110
		$templateMgr->assign('userAffiliation', $user->getAffiliation(null)); // Localized
111
		$templateMgr->assign('userUrl', $user->getUrl());
111
		$templateMgr->assign('userUrl', $user->getUrl());
112
		$templateMgr->assign('userFullName', $user->getFullName());
112
		$templateMgr->assign('userFullName', $user->getFullName());
113
		$templateMgr->assign('userEmail', $user->getEmail());
113
		$templateMgr->assign('userEmail', $user->getEmail());
 Lines 152-158   class SubscriptionForm extends Form { Link Here 
152
				'userLastName', $user->getLastName(),
152
				'userLastName', $user->getLastName(),
153
				'userInitials', $user->getInitials(),
153
				'userInitials', $user->getInitials(),
154
				'userGender', $user->getGender(),
154
				'userGender', $user->getGender(),
155
				'userAffiliation', $user->getAffiliation(),
155
				'userAffiliation', $user->getAffiliation(null),
156
				'userUrl', $user->getUrl(),
156
				'userUrl', $user->getUrl(),
157
				'userEmail' => $user->getEmail(),
157
				'userEmail' => $user->getEmail(),
158
				'userPhone' => $user->getPhone(),
158
				'userPhone' => $user->getPhone(),
 Lines 246-252   class SubscriptionForm extends Form { Link Here 
246
		$user->setLastName($this->getData('userLastName'));
246
		$user->setLastName($this->getData('userLastName'));
247
		$user->setInitials($this->getData('userInitials'));
247
		$user->setInitials($this->getData('userInitials'));
248
		$user->setGender($this->getData('userGender'));
248
		$user->setGender($this->getData('userGender'));
249
		$user->setAffiliation($this->getData('userAffiliation'));
249
		$user->setAffiliation($this->getData('userAffiliation'), null); // Localized
250
		$user->setUrl($this->getData('userUrl'));
250
		$user->setUrl($this->getData('userUrl'));
251
		$user->setEmail($this->getData('userEmail'));
251
		$user->setEmail($this->getData('userEmail'));
252
		$user->setPhone($this->getData('userPhone'));
252
		$user->setPhone($this->getData('userPhone'));
(-)a/classes/user/form/ProfileForm.inc.php (-2 / +2 lines)
 Lines 171-177   class ProfileForm extends Form { Link Here 
171
			'initials' => $user->getInitials(),
171
			'initials' => $user->getInitials(),
172
			'lastName' => $user->getLastName(),
172
			'lastName' => $user->getLastName(),
173
			'gender' => $user->getGender(),
173
			'gender' => $user->getGender(),
174
			'affiliation' => $user->getAffiliation(),
174
			'affiliation' => $user->getAffiliation(null), // Localized
175
			'signature' => $user->getSignature(null), // Localized
175
			'signature' => $user->getSignature(null), // Localized
176
			'email' => $user->getEmail(),
176
			'email' => $user->getEmail(),
177
			'userUrl' => $user->getUrl(),
177
			'userUrl' => $user->getUrl(),
 Lines 233-239   class ProfileForm extends Form { Link Here 
233
		$user->setLastName($this->getData('lastName'));
233
		$user->setLastName($this->getData('lastName'));
234
		$user->setGender($this->getData('gender'));
234
		$user->setGender($this->getData('gender'));
235
		$user->setInitials($this->getData('initials'));
235
		$user->setInitials($this->getData('initials'));
236
		$user->setAffiliation($this->getData('affiliation'));
236
		$user->setAffiliation($this->getData('affiliation'), null); // Localized
237
		$user->setSignature($this->getData('signature'), null); // Localized
237
		$user->setSignature($this->getData('signature'), null); // Localized
238
		$user->setEmail($this->getData('email'));
238
		$user->setEmail($this->getData('email'));
239
		$user->setUrl($this->getData('userUrl'));
239
		$user->setUrl($this->getData('userUrl'));
(-)a/classes/user/form/RegistrationForm.inc.php (-1 / +1 lines)
 Lines 212-218   class RegistrationForm extends Form { Link Here 
212
			$user->setInitials($this->getData('initials'));
212
			$user->setInitials($this->getData('initials'));
213
			$user->setLastName($this->getData('lastName'));
213
			$user->setLastName($this->getData('lastName'));
214
			$user->setGender($this->getData('gender'));
214
			$user->setGender($this->getData('gender'));
215
			$user->setAffiliation($this->getData('affiliation'));
215
			$user->setAffiliation($this->getData('affiliation'), null); // Localized
216
			$user->setSignature($this->getData('signature'), null); // Localized
216
			$user->setSignature($this->getData('signature'), null); // Localized
217
			$user->setEmail($this->getData('email'));
217
			$user->setEmail($this->getData('email'));
218
			$user->setUrl($this->getData('userUrl'));
218
			$user->setUrl($this->getData('userUrl'));
(-)a/dbscripts/xml/upgrade/2.3.2_preupdate.xml (+6 lines)
 Lines 38-41    Link Here 
38
		<rename table="article_authors" to="authors" />
38
		<rename table="article_authors" to="authors" />
39
		<rename table="authors" column="article_id" to="submission_id" />
39
		<rename table="authors" column="article_id" to="submission_id" />
40
	</sql>
40
	</sql>
41
	<!-- Bug #5550: make affiliations localized -->
42
	<sql>
43
		<query>
44
			INSERT INTO author_settings (author_id, setting_name, setting_type, setting_value, locale) SELECT aa.author_id, 'affiliation', 'string', aa.affiliation, j.primary_locale FROM authors aa, articles a, journals j WHERE aa.submission_id = a.article_id AND a.journal_id = j.journal_id
45
		</query>
46
	</sql>
41
</data>
47
</data>
(-)a/plugins/auth/ldap/LDAPAuthPlugin.inc.php (-2 / +2 lines)
 Lines 319-325   class LDAPAuthPlugin extends AuthPlugin { Link Here 
319
		if (isset($lastName))
319
		if (isset($lastName))
320
			$user->setLastName($lastName);
320
			$user->setLastName($lastName);
321
		if (isset($affiliation))
321
		if (isset($affiliation))
322
			$user->setAffiliation($affiliation);
322
			$user->setAffiliation($affiliation, Locale::getLocale());
323
		if (isset($email))
323
		if (isset($email))
324
			$user->setEmail($email);
324
			$user->setEmail($email);
325
		if (isset($phone))
325
		if (isset($phone))
 Lines 349-355   class LDAPAuthPlugin extends AuthPlugin { Link Here 
349
		if ($user->getLastName())
349
		if ($user->getLastName())
350
			$attr['sn'] = $user->getLastName();
350
			$attr['sn'] = $user->getLastName();
351
		if ($user->getAffiliation())
351
		if ($user->getAffiliation())
352
			$attr['organizationName'] = $user->getAffiliation();
352
			$attr['organizationName'] = $user->getAffiliation(Locale::getLocale());
353
		if ($user->getEmail())
353
		if ($user->getEmail())
354
			$attr['mail'] = $user->getEmail();
354
			$attr['mail'] = $user->getEmail();
355
		if ($user->getPhone())
355
		if ($user->getPhone())
(-)a/plugins/blocks/authorBios/block.tpl (-1 / +2 lines)
 Lines 23-29    Link Here 
23
	<p>
23
	<p>
24
		<em>{$author->getFullName()|escape}</em><br />
24
		<em>{$author->getFullName()|escape}</em><br />
25
		{if $author->getUrl()}<a href="{$author->getUrl()|escape:"quotes"}">{$author->getUrl()|escape}</a><br/>{/if}
25
		{if $author->getUrl()}<a href="{$author->getUrl()|escape:"quotes"}">{$author->getUrl()|escape}</a><br/>{/if}
26
		{if $author->getAffiliation()}{$author->getAffiliation()|escape}{/if}
26
		{assign var=authorAffiliation value=$author->getLocalizedAffiliation()}
27
		{if $authorAffiliation}{$authorAffiliation|escape}{/if}
27
		{if $author->getCountry()}<br/>{$author->getCountryLocalized()|escape}{/if}
28
		{if $author->getCountry()}<br/>{$author->getCountryLocalized()|escape}{/if}
28
	</p>
29
	</p>
29
30
(-)a/plugins/importexport/doaj/DOAJExportDom.inc.php (-4 / +4 lines)
 Lines 172-179   class DOAJExportDom { Link Here 
172
		XMLCustomWriter::createChildWithText($doc, $root, 'name', $author->getFullName());
172
		XMLCustomWriter::createChildWithText($doc, $root, 'name', $author->getFullName());
173
		XMLCustomWriter::createChildWithText($doc, $root, 'email', $author->getEmail(), false);
173
		XMLCustomWriter::createChildWithText($doc, $root, 'email', $author->getEmail(), false);
174
174
175
		if(in_array($author->getAffiliation(), $affilList)  && !empty($affilList[0])) {
175
		if(in_array($author->getLocalizedAffiliation(), $affilList)  && !empty($affilList[0])) {
176
			XMLCustomWriter::createChildWithText($doc, $root, 'affiliationId', current(array_keys($affilList, $author->getAffiliation())));
176
			XMLCustomWriter::createChildWithText($doc, $root, 'affiliationId', current(array_keys($affilList, $author->getLocalizedAffiliation())));
177
		}
177
		}
178
		
178
		
179
		return $root;
179
		return $root;
 Lines 187-194   class DOAJExportDom { Link Here 
187
		$affilList = array();
187
		$affilList = array();
188
	
188
	
189
		foreach ($authors as $author) {
189
		foreach ($authors as $author) {
190
			if(!in_array($author->getAffiliation(), $affilList)) {
190
			if(!in_array($author->getLocalizedAffiliation(), $affilList)) {
191
				$affilList[] = $author->getAffiliation() ;
191
				$affilList[] = $author->getLocalizedAffiliation() ;
192
			}
192
			}
193
		}
193
		}
194
194
(-)a/plugins/importexport/erudit/EruditExportDom.inc.php (-2 / +2 lines)
 Lines 134-143   class EruditExportDom { Link Here 
134
			XMLCustomWriter::createChildWithText($doc, $persNameNode, 'middlename', $author->getMiddleName(), false);
134
			XMLCustomWriter::createChildWithText($doc, $persNameNode, 'middlename', $author->getMiddleName(), false);
135
			XMLCustomWriter::createChildWithText($doc, $persNameNode, 'familyname', $author->getLastName());
135
			XMLCustomWriter::createChildWithText($doc, $persNameNode, 'familyname', $author->getLastName());
136
136
137
			if ($author->getAffiliation() != '') {
137
			if ($author->getLocalizedAffiliation() != '') {
138
				$affiliationNode =& XMLCustomWriter::createElement($doc, 'affiliation');
138
				$affiliationNode =& XMLCustomWriter::createElement($doc, 'affiliation');
139
				XMLCustomWriter::appendChild($authorNode, $affiliationNode);
139
				XMLCustomWriter::appendChild($authorNode, $affiliationNode);
140
				XMLCustomWriter::createChildWithText($doc, $affiliationNode, 'blocktext', $author->getAffiliation(), false);
140
				XMLCustomWriter::createChildWithText($doc, $affiliationNode, 'blocktext', $author->getLocalizedAffiliation(), false);
141
			}
141
			}
142
142
143
			$authorNum++;
143
			$authorNum++;
(-)a/plugins/importexport/native/NativeExportDom.inc.php (-1 / +6 lines)
 Lines 312-318   class NativeExportDom { Link Here 
312
		XMLCustomWriter::createChildWithText($doc, $root, 'middlename', $author->getMiddleName(), false);
312
		XMLCustomWriter::createChildWithText($doc, $root, 'middlename', $author->getMiddleName(), false);
313
		XMLCustomWriter::createChildWithText($doc, $root, 'lastname', $author->getLastName());
313
		XMLCustomWriter::createChildWithText($doc, $root, 'lastname', $author->getLastName());
314
314
315
		XMLCustomWriter::createChildWithText($doc, $root, 'affiliation', $author->getAffiliation(), false);
315
		$affiliations = $author->getAffiliation(null);
316
		if (is_array($affiliations)) foreach ($affiliations as $locale => $affiliation) {
317
			$n =& XMLCustomWriter::createChildWithText($doc, $root, 'affiliation', $author->getAffiliation(), false);
318
			XMLCustomWriter::setAttribute($n, 'locale', $locale);
319
			unset($n);
320
		}
316
		XMLCustomWriter::createChildWithText($doc, $root, 'country', $author->getCountry(), false);
321
		XMLCustomWriter::createChildWithText($doc, $root, 'country', $author->getCountry(), false);
317
		XMLCustomWriter::createChildWithText($doc, $root, 'email', $author->getEmail(), false);
322
		XMLCustomWriter::createChildWithText($doc, $root, 'email', $author->getEmail(), false);
318
		XMLCustomWriter::createChildWithText($doc, $root, 'url', $author->getUrl(), false);
323
		XMLCustomWriter::createChildWithText($doc, $root, 'url', $author->getUrl(), false);
(-)a/plugins/importexport/native/NativeImportDom.inc.php (-1 / +10 lines)
 Lines 901-907   class NativeImportDom { Link Here 
901
		if (($node = $authorNode->getChildByName('firstname'))) $author->setFirstName($node->getValue());
901
		if (($node = $authorNode->getChildByName('firstname'))) $author->setFirstName($node->getValue());
902
		if (($node = $authorNode->getChildByName('middlename'))) $author->setMiddleName($node->getValue());
902
		if (($node = $authorNode->getChildByName('middlename'))) $author->setMiddleName($node->getValue());
903
		if (($node = $authorNode->getChildByName('lastname'))) $author->setLastName($node->getValue());
903
		if (($node = $authorNode->getChildByName('lastname'))) $author->setLastName($node->getValue());
904
		if (($node = $authorNode->getChildByName('affiliation'))) $author->setAffiliation($node->getValue());
904
		for ($index=0; ($node = $authorNode->getChildByName('affiliation', $index)); $index++) {
905
			$locale = $node->getAttribute('locale');
906
			if ($locale == '') {
907
				$locale = $journalPrimaryLocale;
908
			} elseif (!in_array($locale, $journalSupportedLocales)) {
909
				$errors[] = array('plugins.importexport.native.import.error.articleAuthorAffiliationLocaleUnsupported', array('authorFullName' => $author->getFullName(), 'articleTitle' => $article->getLocalizedTitle(), 'issueTitle' => $issue->getIssueIdentification(), 'locale' => $locale));
910
				return false;
911
			} 
912
			$author->setAffiliation($node->getValue(), $locale);
913
		}
905
		if (($node = $authorNode->getChildByName('country'))) $author->setCountry($node->getValue());
914
		if (($node = $authorNode->getChildByName('country'))) $author->setCountry($node->getValue());
906
		if (($node = $authorNode->getChildByName('email'))) $author->setEmail($node->getValue());
915
		if (($node = $authorNode->getChildByName('email'))) $author->setEmail($node->getValue());
907
		if (($node = $authorNode->getChildByName('url'))) $author->setUrl($node->getValue());
916
		if (($node = $authorNode->getChildByName('url'))) $author->setUrl($node->getValue());
(-)a/plugins/importexport/native/locale/en_US/locale.xml (+1 lines)
 Lines 111-116   The following formats are accepted: Link Here 
111
111
112
	<message key="plugins.importexport.native.import.error.articleAuthorCompetingInterestsLocaleUnsupported">An author competing interest was provided for the author "{$authorFullName}" of the article "{$articleTitle}" in the issue "{$issueTitle}" in a locale ("{$locale}") that this journal does not support.</message>
112
	<message key="plugins.importexport.native.import.error.articleAuthorCompetingInterestsLocaleUnsupported">An author competing interest was provided for the author "{$authorFullName}" of the article "{$articleTitle}" in the issue "{$issueTitle}" in a locale ("{$locale}") that this journal does not support.</message>
113
	<message key="plugins.importexport.native.import.error.articleAuthorBiographyLocaleUnsupported">An author biography was provided for the author "{$authorFullName}" of the article "{$articleTitle}" in the issue "{$issueTitle}" in a locale ("{$locale}") that this journal does not support.</message>
113
	<message key="plugins.importexport.native.import.error.articleAuthorBiographyLocaleUnsupported">An author biography was provided for the author "{$authorFullName}" of the article "{$articleTitle}" in the issue "{$issueTitle}" in a locale ("{$locale}") that this journal does not support.</message>
114
	<message key="plugins.importexport.native.import.error.articleAuthorAffiliationLocaleUnsupported">An author affiliation was provided for the author "{$authorFullName}" of the article "{$articleTitle}" in the issue "{$issueTitle}" in a locale ("{$locale}") that this journal does not support.</message>
114
115
115
	<message key="plugins.importexport.native.import.error.galleyLocaleUnsupported">A galley of the article "{$articleTitle}" in the issue "{$issueTitle}" was provided in a locale ("{$locale}") that this journal does not support.</message>
116
	<message key="plugins.importexport.native.import.error.galleyLocaleUnsupported">A galley of the article "{$articleTitle}" in the issue "{$issueTitle}" was provided in a locale ("{$locale}") that this journal does not support.</message>
116
117
(-)a/plugins/importexport/native/native.dtd (-1 / +5 lines)
 Lines 123-129    Link Here 
123
		public_id CDATA #IMPLIED
123
		public_id CDATA #IMPLIED
124
		language CDATA "en">
124
		language CDATA "en">
125
125
126
<!ELEMENT author (firstname, middlename?, lastname, affiliation?, country?, email, url?, competing_interests*, biography*)>
126
<!ELEMENT author (firstname, middlename?, lastname, affiliation*, country?, email, url?, competing_interests*, biography*)>
127
	<!-- One author should be designated as the primary contact for this
127
	<!-- One author should be designated as the primary contact for this
128
	     article. If no author is designated, the first author with an
128
	     article. If no author is designated, the first author with an
129
	     email address will be used; if multiple authors are designated, the
129
	     email address will be used; if multiple authors are designated, the
 Lines 135-141    Link Here 
135
<!ELEMENT firstname (#PCDATA)>
135
<!ELEMENT firstname (#PCDATA)>
136
<!ELEMENT middlename (#PCDATA)>
136
<!ELEMENT middlename (#PCDATA)>
137
<!ELEMENT lastname (#PCDATA)>
137
<!ELEMENT lastname (#PCDATA)>
138
138
<!ELEMENT affiliation (#PCDATA)>
139
<!ELEMENT affiliation (#PCDATA)>
140
	<!ATTLIST affiliation
141
		locale CDATA #IMPLIED>
142
139
<!ELEMENT country (#PCDATA)>
143
<!ELEMENT country (#PCDATA)>
140
<!ELEMENT email (#PCDATA)>
144
<!ELEMENT email (#PCDATA)>
141
<!ELEMENT url (#PCDATA)>
145
<!ELEMENT url (#PCDATA)>
(-)a/plugins/importexport/pubmed/PubMedExportDom.inc.php (-1 / +1 lines)
 Lines 190-196   class PubMedExportDom { Link Here 
190
		XMLCustomWriter::createChildWithText($doc, $root, 'LastName', ucfirst($author->getLastName()));
190
		XMLCustomWriter::createChildWithText($doc, $root, 'LastName', ucfirst($author->getLastName()));
191
191
192
		if ($author->getPrimaryContact()) {
192
		if ($author->getPrimaryContact()) {
193
			XMLCustomWriter::createChildWithText($doc, $root, 'Affiliation', $author->getAffiliation() . '. ' . $author->getEmail(), false);
193
			XMLCustomWriter::createChildWithText($doc, $root, 'Affiliation', $author->getLocalizedAffiliation() . '. ' . $author->getEmail(), false);
194
		}
194
		}
195
195
196
		return $root;
196
		return $root;
(-)a/plugins/importexport/quickSubmit/QuickSubmitForm.inc.php (-1 / +3 lines)
 Lines 203-209   class QuickSubmitForm extends Form { Link Here 
203
				$author->setFirstName($authors[$i]['firstName']);
203
				$author->setFirstName($authors[$i]['firstName']);
204
				$author->setMiddleName($authors[$i]['middleName']);
204
				$author->setMiddleName($authors[$i]['middleName']);
205
				$author->setLastName($authors[$i]['lastName']);
205
				$author->setLastName($authors[$i]['lastName']);
206
				$author->setAffiliation($authors[$i]['affiliation']);
206
				if (array_key_exists('affiliation', $authors[$i])) {
207
					$author->setAffiliation($authors[$i]['affiliation'], null);
208
				}
207
				$author->setCountry($authors[$i]['country']);
209
				$author->setCountry($authors[$i]['country']);
208
				$author->setEmail($authors[$i]['email']);
210
				$author->setEmail($authors[$i]['email']);
209
				$author->setUrl($authors[$i]['url']);
211
				$author->setUrl($authors[$i]['url']);
(-)a/plugins/importexport/quickSubmit/index.tpl (-2 / +2 lines)
 Lines 172-178   function moveAuthor(dir, authorIndex) { Link Here 
172
			</tr>
172
			</tr>
173
			<tr valign="top">
173
			<tr valign="top">
174
				<td width="30%" class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
174
				<td width="30%" class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
175
				<td width="70%" class="value"><textarea name="authors[{$authorIndex|escape}][affiliation]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation|escape}</textarea></td>
175
				<td width="70%" class="value"><textarea name="authors[{$authorIndex|escape}][affiliation][{$formLocale|escape}]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation[$formLocale]|escape}</textarea></td>
176
			</tr>
176
			</tr>
177
			<tr valign="top">
177
			<tr valign="top">
178
				<td width="30%" class="label">{fieldLabel name="authors-$authorIndex-country" key="common.country"}</td>
178
				<td width="30%" class="label">{fieldLabel name="authors-$authorIndex-country" key="common.country"}</td>
 Lines 229-235   function moveAuthor(dir, authorIndex) { Link Here 
229
			</tr>
229
			</tr>
230
			<tr valign="top">
230
			<tr valign="top">
231
				<td width="30%" class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
231
				<td width="30%" class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
232
				<td width="70%" class="value"><textarea name="authors[0][affiliation]" class="textArea" id="authors-0-affiliation" rows="5" cols="40"></textarea></td>
232
				<td width="70%" class="value"><textarea name="authors[0][affiliation][{$formLocale|escape}" class="textArea" id="authors-0-affiliation" rows="5" cols="40"></textarea></td>
233
			</tr>
233
			</tr>
234
			<tr valign="top">
234
			<tr valign="top">
235
				<td width="30%" class="label">{fieldLabel name="authors-0-country" key="common.country"}</td>
235
				<td width="30%" class="label">{fieldLabel name="authors-0-country" key="common.country"}</td>
(-)a/plugins/importexport/users/UserExportDom.inc.php (-1 / +9 lines)
 Lines 39-51   class UserExportDom { Link Here 
39
			XMLCustomWriter::createChildWithText($doc, $userNode, 'last_name', $user->getLastName());
39
			XMLCustomWriter::createChildWithText($doc, $userNode, 'last_name', $user->getLastName());
40
			XMLCustomWriter::createChildWithText($doc, $userNode, 'initials', $user->getInitials(), false);
40
			XMLCustomWriter::createChildWithText($doc, $userNode, 'initials', $user->getInitials(), false);
41
			XMLCustomWriter::createChildWithText($doc, $userNode, 'gender', $user->getGender(), false);
41
			XMLCustomWriter::createChildWithText($doc, $userNode, 'gender', $user->getGender(), false);
42
			XMLCustomWriter::createChildWithText($doc, $userNode, 'affiliation', $user->getAffiliation(), false);
43
			XMLCustomWriter::createChildWithText($doc, $userNode, 'email', $user->getEmail());
42
			XMLCustomWriter::createChildWithText($doc, $userNode, 'email', $user->getEmail());
44
			XMLCustomWriter::createChildWithText($doc, $userNode, 'url', $user->getUrl(), false);
43
			XMLCustomWriter::createChildWithText($doc, $userNode, 'url', $user->getUrl(), false);
45
			XMLCustomWriter::createChildWithText($doc, $userNode, 'phone', $user->getPhone(), false);
44
			XMLCustomWriter::createChildWithText($doc, $userNode, 'phone', $user->getPhone(), false);
46
			XMLCustomWriter::createChildWithText($doc, $userNode, 'fax', $user->getFax(), false);
45
			XMLCustomWriter::createChildWithText($doc, $userNode, 'fax', $user->getFax(), false);
47
			XMLCustomWriter::createChildWithText($doc, $userNode, 'mailing_address', $user->getMailingAddress(), false);
46
			XMLCustomWriter::createChildWithText($doc, $userNode, 'mailing_address', $user->getMailingAddress(), false);
48
			XMLCustomWriter::createChildWithText($doc, $userNode, 'country', $user->getCountry(), false);
47
			XMLCustomWriter::createChildWithText($doc, $userNode, 'country', $user->getCountry(), false);
48
			if (is_array($user->getAffiliation(null))) {
49
				foreach($user->getAffiliation(null) as $locale => $value) {
50
					$affiliationNode =& XMLCustomWriter::createChildWithText($doc, $userNode, 'affiliation', $value, false);
51
					if ($affiliationNode) {
52
						XMLCustomWriter::setAttribute($affiliationNode, 'locale', $locale);
53
					}
54
					unset($affiliationNode);
55
				}
56
			}
49
			if (is_array($user->getSignature(null))) {
57
			if (is_array($user->getSignature(null))) {
50
				foreach($user->getSignature(null) as $locale => $value) {
58
				foreach($user->getSignature(null) as $locale => $value) {
51
					$signatureNode =& XMLCustomWriter::createChildWithText($doc, $userNode, 'signature', $value, false);
59
					$signatureNode =& XMLCustomWriter::createChildWithText($doc, $userNode, 'signature', $value, false);
(-)a/plugins/importexport/users/UserImportExportPlugin.inc.php (-1 / +1 lines)
 Lines 136-142   class UserImportExportPlugin extends ImportExportPlugin { Link Here 
136
					$newUser->setFax(Request::getUserVar($i.'_fax'));
136
					$newUser->setFax(Request::getUserVar($i.'_fax'));
137
					$newUser->setPhone(Request::getUserVar($i.'_phone'));
137
					$newUser->setPhone(Request::getUserVar($i.'_phone'));
138
					$newUser->setUrl(Request::getUserVar($i.'_url'));
138
					$newUser->setUrl(Request::getUserVar($i.'_url'));
139
					$newUser->setAffiliation(Request::getUserVar($i.'_affiliation'));
139
					$newUser->setAffiliation(Request::getUserVar($i.'_affiliation'), null);
140
					$newUser->setGender(Request::getUserVar($i.'_gender'));
140
					$newUser->setGender(Request::getUserVar($i.'_gender'));
141
					$newUser->setInitials(Request::getUserVar($i.'_initials'));
141
					$newUser->setInitials(Request::getUserVar($i.'_initials'));
142
					$newUser->setSalutation(Request::getUserVar($i.'_salutation'));
142
					$newUser->setSalutation(Request::getUserVar($i.'_salutation'));
(-)a/plugins/importexport/users/UserXMLParser.inc.php (-1 / +3 lines)
 Lines 107-113   class UserXMLParser { Link Here 
107
								$newUser->setGender($attrib->getValue());
107
								$newUser->setGender($attrib->getValue());
108
								break;
108
								break;
109
							case 'affiliation':
109
							case 'affiliation':
110
								$newUser->setAffiliation($attrib->getValue());
110
								$locale = $attrib->getAttribute('locale');
111
								if (empty($locale)) $locale = $journalPrimaryLocale;
112
								$newUser->setAffiliation($attrib->getValue(), $locale);
111
								break;
113
								break;
112
							case 'email':
114
							case 'email':
113
								$newUser->setEmail($attrib->getValue());
115
								$newUser->setEmail($attrib->getValue());
(-)a/plugins/importexport/users/importUsersConfirm.tpl (-1 / +3 lines)
 Lines 66-77    Link Here 
66
			{foreach name=locales from=$user->getLocales() item=locale}
66
			{foreach name=locales from=$user->getLocales() item=locale}
67
				<input type="hidden" name="{$userKey|escape}_locales[]" value="{$locale|escape}" />
67
				<input type="hidden" name="{$userKey|escape}_locales[]" value="{$locale|escape}" />
68
			{/foreach}			
68
			{/foreach}			
69
			{foreach from=$user->getAffiliation(null) key=locale item=value}
70
				<input type="hidden" name="{$userKey|escape}_affiliation[{$locale|escape}]" value="{$value|escape}" />
71
			{/foreach}			
69
			<input type="hidden" name="{$userKey|escape}_country" value="{$user->getCountry()|escape}" />
72
			<input type="hidden" name="{$userKey|escape}_country" value="{$user->getCountry()|escape}" />
70
			<input type="hidden" name="{$userKey|escape}_mailingAddress" value="{$user->getMailingAddress()|escape}" />
73
			<input type="hidden" name="{$userKey|escape}_mailingAddress" value="{$user->getMailingAddress()|escape}" />
71
			<input type="hidden" name="{$userKey|escape}_fax" value="{$user->getFax()|escape}" />
74
			<input type="hidden" name="{$userKey|escape}_fax" value="{$user->getFax()|escape}" />
72
			<input type="hidden" name="{$userKey|escape}_phone" value="{$user->getPhone()|escape}" />
75
			<input type="hidden" name="{$userKey|escape}_phone" value="{$user->getPhone()|escape}" />
73
			<input type="hidden" name="{$userKey|escape}_url" value="{$user->getUrl()|escape}" />
76
			<input type="hidden" name="{$userKey|escape}_url" value="{$user->getUrl()|escape}" />
74
			<input type="hidden" name="{$userKey|escape}_affiliation" value="{$user->getAffiliation()|escape}" />
75
			<input type="hidden" name="{$userKey|escape}_gender" value="{$user->getGender()|escape}" />
77
			<input type="hidden" name="{$userKey|escape}_gender" value="{$user->getGender()|escape}" />
76
			<input type="hidden" name="{$userKey|escape}_initials" value="{$user->getInitials()|escape}" />
78
			<input type="hidden" name="{$userKey|escape}_initials" value="{$user->getInitials()|escape}" />
77
			<input type="hidden" name="{$userKey|escape}_salutation" value="{$user->getSalutation()|escape}" />
79
			<input type="hidden" name="{$userKey|escape}_salutation" value="{$user->getSalutation()|escape}" />
(-)a/plugins/oaiMetadataFormats/dc/OAIMetadataFormat_DC.inc.php (-1 / +1 lines)
 Lines 43-49   class OAIMetadataFormat_DC extends OAIMetadataFormat { Link Here 
43
		$authors = $article->getAuthors();
43
		$authors = $article->getAuthors();
44
		for ($i = 0, $num = count($authors); $i < $num; $i++) {
44
		for ($i = 0, $num = count($authors); $i < $num; $i++) {
45
			$authorName = $authors[$i]->getFullName(true);
45
			$authorName = $authors[$i]->getFullName(true);
46
			$affiliation = $authors[$i]->getAffiliation();
46
			$affiliation = $authors[$i]->getLocalizedAffiliation();
47
			if (!empty($affiliation)) {
47
			if (!empty($affiliation)) {
48
				$authorName .= '; ' . $affiliation;
48
				$authorName .= '; ' . $affiliation;
49
			}
49
			}
(-)a/plugins/oaiMetadataFormats/marc/OAIMetadataFormat_MARC.inc.php (-1 / +1 lines)
 Lines 32-38   class OAIMetadataFormat_MARC extends OAIMetadataFormat { Link Here 
32
		$authors = $article->getAuthors();
32
		$authors = $article->getAuthors();
33
		for ($i = 0, $num = count($authors); $i < $num; $i++) {
33
		for ($i = 0, $num = count($authors); $i < $num; $i++) {
34
			$authorName = $authors[$i]->getFullName(true);
34
			$authorName = $authors[$i]->getFullName(true);
35
			$affiliation = $authors[$i]->getAffiliation();
35
			$affiliation = $authors[$i]->getLocalizedAffiliation();
36
			if (!empty($affiliation)) {
36
			if (!empty($affiliation)) {
37
				$authorName .= '; ' . $affiliation;
37
				$authorName .= '; ' . $affiliation;
38
			}
38
			}
(-)a/plugins/oaiMetadataFormats/marcxml/OAIMetadataFormat_MARC21.inc.php (-1 / +1 lines)
 Lines 32-38   class OAIMetadataFormat_MARC21 extends OAIMetadataFormat { Link Here 
32
		$authors = $article->getAuthors();
32
		$authors = $article->getAuthors();
33
		for ($i = 0, $num = count($authors); $i < $num; $i++) {
33
		for ($i = 0, $num = count($authors); $i < $num; $i++) {
34
			$authorName = $authors[$i]->getFullName(true);
34
			$authorName = $authors[$i]->getFullName(true);
35
			$affiliation = $authors[$i]->getAffiliation();
35
			$affiliation = $authors[$i]->getLocalizedAffiliation();
36
			if (!empty($affiliation)) {
36
			if (!empty($affiliation)) {
37
				$authorName .= '; ' . $affiliation;
37
				$authorName .= '; ' . $affiliation;
38
			}
38
			}
(-)a/plugins/oaiMetadataFormats/nlm/OAIMetadataFormat_NLM.inc.php (-1 / +1 lines)
 Lines 109-115   class OAIMetadataFormat_NLM extends OAIMetadataFormat { Link Here 
109
				"\t\t\t\t\t\t<surname>" . htmlspecialchars(Core::cleanVar($author->getLastName())) . "</surname>\n" .
109
				"\t\t\t\t\t\t<surname>" . htmlspecialchars(Core::cleanVar($author->getLastName())) . "</surname>\n" .
110
				"\t\t\t\t\t\t<given-names>" . htmlspecialchars(Core::cleanVar($author->getFirstName()) . (($s = $author->getMiddleName()) != ''?" $s":'')) . "</given-names>\n" .
110
				"\t\t\t\t\t\t<given-names>" . htmlspecialchars(Core::cleanVar($author->getFirstName()) . (($s = $author->getMiddleName()) != ''?" $s":'')) . "</given-names>\n" .
111
				"\t\t\t\t\t</name>\n" .
111
				"\t\t\t\t\t</name>\n" .
112
				(($s = $author->getAffiliation()) != ''?"\t\t\t\t\t<aff>" . htmlspecialchars(Core::cleanVar($s)) . "</aff>\n":'') .
112
				(($s = $author->getLocalizedAffiliation()) != ''?"\t\t\t\t\t<aff>" . htmlspecialchars(Core::cleanVar($s)) . "</aff>\n":'') .
113
				"\t\t\t\t\t<email>" . htmlspecialchars(Core::cleanVar($author->getEmail())) . "</email>\n" .
113
				"\t\t\t\t\t<email>" . htmlspecialchars(Core::cleanVar($author->getEmail())) . "</email>\n" .
114
				(($s = $author->getUrl()) != ''?"\t\t\t\t\t<uri>" . htmlspecialchars(Core::cleanVar($s)) . "</uri>\n":'') .
114
				(($s = $author->getUrl()) != ''?"\t\t\t\t\t<uri>" . htmlspecialchars(Core::cleanVar($s)) . "</uri>\n":'') .
115
				"\t\t\t\t</contrib>\n";
115
				"\t\t\t\t</contrib>\n";
(-)a/plugins/oaiMetadataFormats/rfc1807/OAIMetadataFormat_RFC1807.inc.php (-1 / +1 lines)
 Lines 50-56   class OAIMetadataFormat_RFC1807 extends OAIMetadataFormat { Link Here 
50
		$authors = $article->getAuthors();
50
		$authors = $article->getAuthors();
51
		for ($i = 0, $num = count($authors); $i < $num; $i++) {
51
		for ($i = 0, $num = count($authors); $i < $num; $i++) {
52
			$authorName = $authors[$i]->getFullName(true);
52
			$authorName = $authors[$i]->getFullName(true);
53
			$affiliation = $authors[$i]->getAffiliation();
53
			$affiliation = $authors[$i]->getLocalizedAffiliation();
54
			if (!empty($affiliation)) {
54
			if (!empty($affiliation)) {
55
				$authorName .= '; ' . $affiliation;
55
				$authorName .= '; ' . $affiliation;
56
			}
56
			}
(-)a/plugins/reports/articles/ArticleReportDAO.inc.php (-2 / +8 lines)
 Lines 98-111   class ArticleReportDAO extends DAO { Link Here 
98
					aa.middle_name AS mname,
98
					aa.middle_name AS mname,
99
					aa.last_name AS lname,
99
					aa.last_name AS lname,
100
					aa.email AS email,
100
					aa.email AS email,
101
					aa.affiliation AS affiliation,
102
					aa.country AS country,
101
					aa.country AS country,
103
					aa.url AS url,
102
					aa.url AS url,
104
					COALESCE(aasl.setting_value, aas.setting_value) AS biography
103
					COALESCE(aasl.setting_value, aas.setting_value) AS biography,
104
					COALESCE(aaasl.setting_value, aaas.setting_value) AS affiliation
105
				FROM	authors aa
105
				FROM	authors aa
106
					LEFT JOIN articles a ON (aa.submission_id = a.article_id)
106
					LEFT JOIN articles a ON (aa.submission_id = a.article_id)
107
					LEFT JOIN author_settings aas ON (aa.author_id = aas.author_id AND aas.setting_name = ? AND aas.locale = ?)
107
					LEFT JOIN author_settings aas ON (aa.author_id = aas.author_id AND aas.setting_name = ? AND aas.locale = ?)
108
					LEFT JOIN author_settings aasl ON (aa.author_id = aasl.author_id AND aasl.setting_name = ? AND aasl.locale = ?)
108
					LEFT JOIN author_settings aasl ON (aa.author_id = aasl.author_id AND aasl.setting_name = ? AND aasl.locale = ?)
109
					LEFT JOIN author_settings aaas ON (aa.author_id = aaas.author_id AND aaas.setting_name = ? AND aaas.locale = ?)
110
					LEFT JOIN author_settings aaasl ON (aa.author_id = aaasl.author_id AND aaasl.setting_name = ? AND aaasl.locale = ?)
109
				WHERE
111
				WHERE
110
					a.journal_id = ? AND
112
					a.journal_id = ? AND
111
					aa.submission_id = ?',
113
					aa.submission_id = ?',
 Lines 114-119   class ArticleReportDAO extends DAO { Link Here 
114
					$primaryLocale,
116
					$primaryLocale,
115
					'biography',
117
					'biography',
116
					$locale,
118
					$locale,
119
					'affiliation',
120
					$primaryLocale,
121
					'affiliation',
122
					$locale,
117
					$journalId,
123
					$journalId,
118
					$article->getId()
124
					$article->getId()
119
				)
125
				)
(-)a/templates/about/displayMembership.tpl (-1 / +1 lines)
 Lines 19-25    Link Here 
19
19
20
{foreach from=$memberships item=member}
20
{foreach from=$memberships item=member}
21
	{assign var=user value=$member->getUser()}
21
	{assign var=user value=$member->getUser()}
22
	<div id="member"><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$user->getId()}')">{$user->getFullName()|escape}</a>{if $user->getAffiliation()}, {$user->getAffiliation()|escape}{/if}{if $user->getCountry()}{assign var=countryCode value=$user->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</div>
22
	<div id="member"><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$user->getId()}')">{$user->getFullName()|escape}</a>{if $user->getLocalizedAffiliation()}, {$user->getLocalizedAffiliation()|escape}{/if}{if $user->getCountry()}{assign var=countryCode value=$user->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</div>
23
	<br />
23
	<br />
24
{/foreach}
24
{/foreach}
25
</div>
25
</div>
(-)a/templates/about/editorialPolicies.tpl (-1 / +1 lines)
 Lines 53-59    Link Here 
53
				{translate key="user.role.editors"}
53
				{translate key="user.role.editors"}
54
				<ul class="plain">
54
				<ul class="plain">
55
				{/if}
55
				{/if}
56
				<li>{$sectionEditor->getFirstName()|escape} {$sectionEditor->getLastName()|escape}{if strlen($sectionEditor->getAffiliation()) > 0}, {$sectionEditor->getAffiliation()|escape}{/if}</li>
56
				<li>{$sectionEditor->getFirstName()|escape} {$sectionEditor->getLastName()|escape}{if $sectionEditor->getLocalizedAffiliation()}, {$sectionEditor->getLocalizedAffiliation()|escape}{/if}</li>
57
			{/foreach}
57
			{/foreach}
58
		{/if}
58
		{/if}
59
	{/foreach}
59
	{/foreach}
(-)a/templates/about/editorialTeam.tpl (-5 / +5 lines)
 Lines 24-30    Link Here 
24
24
25
	<ol class="editorialTeam">
25
	<ol class="editorialTeam">
26
		{foreach from=$editors item=editor}
26
		{foreach from=$editors item=editor}
27
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$editor->getId()}')">{$editor->getFullName()|escape}</a>{if $editor->getAffiliation()}, {$editor->getAffiliation()|escape}{/if}{if $editor->getCountry()}{assign var=countryCode value=$editor->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
27
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$editor->getId()}')">{$editor->getFullName()|escape}</a>{if $editor->getLocalizedAffiliation()}, {$editor->getLocalizedAffiliation()|escape}{/if}{if $editor->getCountry()}{assign var=countryCode value=$editor->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
28
		{/foreach}
28
		{/foreach}
29
	</ol>
29
	</ol>
30
	</div>
30
	</div>
 Lines 40-46    Link Here 
40
40
41
	<ol class="editorialTeam">
41
	<ol class="editorialTeam">
42
		{foreach from=$sectionEditors item=sectionEditor}
42
		{foreach from=$sectionEditors item=sectionEditor}
43
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$sectionEditor->getId()}')">{$sectionEditor->getFullName()|escape}</a>{if $sectionEditor->getAffiliation()}, {$sectionEditor->getAffiliation()|escape}{/if}{if $sectionEditor->getCountry()}{assign var=countryCode value=$sectionEditor->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
43
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$sectionEditor->getId()}')">{$sectionEditor->getFullName()|escape}</a>{if $sectionEditor->getLocalizedAffiliation()}, {$sectionEditor->getLocalizedAffiliation()|escape}{/if}{if $sectionEditor->getCountry()}{assign var=countryCode value=$sectionEditor->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
44
		{/foreach}
44
		{/foreach}
45
	</ol>
45
	</ol>
46
	</div>
46
	</div>
 Lines 56-62    Link Here 
56
56
57
	<ol class="editorialTeam">
57
	<ol class="editorialTeam">
58
		{foreach from=$layoutEditors item=layoutEditor}
58
		{foreach from=$layoutEditors item=layoutEditor}
59
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$layoutEditor->getId()}')">{$layoutEditor->getFullName()|escape}</a>{if $layoutEditor->getAffiliation()}, {$layoutEditor->getAffiliation()|escape}{/if}{if $layoutEditor->getCountry()}{assign var=countryCode value=$layoutEditor->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
59
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$layoutEditor->getId()}')">{$layoutEditor->getFullName()|escape}</a>{if $layoutEditor->getLocalizedAffiliation()}, {$layoutEditor->getLocalizedAffiliation()|escape}{/if}{if $layoutEditor->getCountry()}{assign var=countryCode value=$layoutEditor->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
60
		{/foreach}
60
		{/foreach}
61
	</ol>
61
	</ol>
62
	</div>
62
	</div>
 Lines 72-78    Link Here 
72
72
73
	<ol class="editorialTeam">
73
	<ol class="editorialTeam">
74
		{foreach from=$copyEditors item=copyEditor}
74
		{foreach from=$copyEditors item=copyEditor}
75
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$copyEditor->getId()}')">{$copyEditor->getFullName()|escape}</a>{if $copyEditor->getAffiliation()}, {$copyEditor->getAffiliation()|escape}{/if}{if $copyEditor->getCountry()}{assign var=countryCode value=$copyEditor->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
75
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$copyEditor->getId()}')">{$copyEditor->getFullName()|escape}</a>{if $copyEditor->getLocalizedAffiliation()}, {$copyEditor->getLocalizedAffiliation()|escape}{/if}{if $copyEditor->getCountry()}{assign var=countryCode value=$copyEditor->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
76
		{/foreach}
76
		{/foreach}
77
	</ol>
77
	</ol>
78
	</div>
78
	</div>
 Lines 88-94    Link Here 
88
88
89
	<ol class="editorialTeam">
89
	<ol class="editorialTeam">
90
		{foreach from=$proofreaders item=proofreader}
90
		{foreach from=$proofreaders item=proofreader}
91
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$proofreader->getId()}')">{$proofreader->getFullName()|escape}</a>{if $proofreader->getAffiliation()}, {$proofreader->getAffiliation()|escape}{/if}{if $proofreader->getCountry()}{assign var=countryCode value=$proofreader->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
91
			<li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$proofreader->getId()}')">{$proofreader->getFullName()|escape}</a>{if $proofreader->getLocalizedAffiliation()}, {$proofreader->getLocalizedAffiliation()|escape}{/if}{if $proofreader->getCountry()}{assign var=countryCode value=$proofreader->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li>
92
		{/foreach}
92
		{/foreach}
93
	</ol>
93
	</ol>
94
	</div>
94
	</div>
(-)a/templates/about/editorialTeamBio.tpl (-1 / +1 lines)
 Lines 77-83    Link Here 
77
<p>
77
<p>
78
	<em>{$user->getFullName()|escape}</em> {icon name="mail" url=$address}<br />
78
	<em>{$user->getFullName()|escape}</em> {icon name="mail" url=$address}<br />
79
	{if $user->getUrl()}<a href="{$user->getUrl()|escape:"quotes"}" target="_new">{$user->getUrl()|escape}</a><br/>{/if}
79
	{if $user->getUrl()}<a href="{$user->getUrl()|escape:"quotes"}" target="_new">{$user->getUrl()|escape}</a><br/>{/if}
80
	{if $user->getAffiliation()}{$user->getAffiliation()|escape}{assign var=needsComma value=1}{/if}{if $country}{if $needsComma}, {/if}{$country|escape}{/if}
80
	{if $user->getLocalizedAffiliation()}{$user->getLocalizedAffiliation()|escape}{assign var=needsComma value=1}{/if}{if $country}{if $needsComma}, {/if}{$country|escape}{/if}
81
</p>
81
</p>
82
82
83
<p>{$user->getLocalizedBiography()|nl2br|strip_unsafe_html}</p>
83
<p>{$user->getLocalizedBiography()|nl2br|strip_unsafe_html}</p>
(-)a/templates/about/editorialTeamBoard.tpl (-1 / +1 lines)
 Lines 22-28    Link Here 
22
	<ol class="editorialTeam">
22
	<ol class="editorialTeam">
23
		{foreach from=$members item=member}
23
		{foreach from=$members item=member}
24
			{assign var=user value=$member->getUser()}
24
			{assign var=user value=$member->getUser()}
25
			<div id="member"><li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$user->getId()}')">{$user->getFullName()|escape}</a>{if $user->getAffiliation()}, {$user->getAffiliation()|escape}{/if}{if $user->getCountry()}{assign var=countryCode value=$user->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li></div>
25
			<div id="member"><li><a href="javascript:openRTWindow('{url op="editorialTeamBio" path=$user->getId()}')">{$user->getFullName()|escape}</a>{if $user->getLocalizedAffiliation()}, {$user->getLocalizedAffiliation()|escape}{/if}{if $user->getCountry()}{assign var=countryCode value=$user->getCountry()}{assign var=country value=$countries.$countryCode}, {$country|escape}{/if}</li></div>
26
		{/foreach}{* $members *}
26
		{/foreach}{* $members *}
27
	</ol>
27
	</ol>
28
</div>
28
</div>
(-)a/templates/author/submit/step3.tpl (-2 / +5 lines)
 Lines 51-56   function moveAuthor(dir, authorIndex) { Link Here 
51
				{foreach from=$author.biography key="thisLocale" item="thisBiography"}
51
				{foreach from=$author.biography key="thisLocale" item="thisBiography"}
52
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][biography][{$thisLocale|escape}]" value="{$thisBiography|escape}" />{/if}
52
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][biography][{$thisLocale|escape}]" value="{$thisBiography|escape}" />{/if}
53
				{/foreach}
53
				{/foreach}
54
				{foreach from=$author.affiliation key="thisLocale" item="thisAffiliation"}
55
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][affiliation][{$thisLocale|escape}]" value="{$thisAffiliation|escape}" />{/if}
56
				{/foreach}
54
			{/foreach}
57
			{/foreach}
55
			{form_language_chooser form="submit" url=$submitFormUrl}
58
			{form_language_chooser form="submit" url=$submitFormUrl}
56
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
59
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
 Lines 98-104   function moveAuthor(dir, authorIndex) { Link Here 
98
<tr valign="top">
101
<tr valign="top">
99
	<td width="20%" class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
102
	<td width="20%" class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
100
	<td width="80%" class="value">
103
	<td width="80%" class="value">
101
		<textarea name="authors[{$authorIndex|escape}][affiliation]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation|escape}</textarea><br/>
104
		<textarea name="authors[{$authorIndex|escape}][affiliation][{$formLocale|escape}]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation[$formLocale]|escape}</textarea><br/>
102
		<span class="instruct">{translate key="user.affiliation.description"}</span>
105
		<span class="instruct">{translate key="user.affiliation.description"}</span>
103
	</td>
106
	</td>
104
</tr>
107
</tr>
 Lines 159-165   function moveAuthor(dir, authorIndex) { Link Here 
159
<tr valign="top">
162
<tr valign="top">
160
	<td width="20%" class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
163
	<td width="20%" class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
161
	<td width="80%" class="value">
164
	<td width="80%" class="value">
162
		<textarea name="authors[0][affiliation]" class="textArea" id="authors-0-affiliation" rows="5" cols="40"></textarea><br/>
165
		<textarea name="authors[0][affiliation][{$formLocale|escape}]" class="textArea" id="authors-0-affiliation" rows="5" cols="40"></textarea><br/>
163
		<span class="instruct">{translate key="user.affiliation.description"}</span>
166
		<span class="instruct">{translate key="user.affiliation.description"}</span>
164
	</td>
167
	</td>
165
</tr>
168
</tr>
(-)a/templates/manager/people/userProfile.tpl (-1 / +1 lines)
 Lines 42-48    Link Here 
42
	</tr>
42
	</tr>
43
	<tr valign="top">
43
	<tr valign="top">
44
		<td class="label">{translate key="user.affiliation"}</td>
44
		<td class="label">{translate key="user.affiliation"}</td>
45
		<td class="value">{$user->getAffiliation()|escape|nl2br|default:"&mdash;"}</td>
45
		<td class="value">{$user->getLocalizedAffiliation()|escape|nl2br|default:"&mdash;"}</td>
46
	</tr>
46
	</tr>
47
	<tr valign="top">
47
	<tr valign="top">
48
		<td class="label">{translate key="user.signature"}</td>
48
		<td class="label">{translate key="user.signature"}</td>
(-)a/templates/manager/people/userProfileForm.tpl (-1 / +1 lines)
 Lines 200-206    Link Here 
200
	<tr valign="top">
200
	<tr valign="top">
201
		<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
201
		<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
202
		<td class="value">
202
		<td class="value">
203
			<textarea name="affiliation" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation|escape}</textarea><br/>
203
			<textarea name="affiliation[{$formLocale|escape}]" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation[$formLocale]|escape}</textarea><br/>
204
			<span class="instruct">{translate key="user.affiliation.description"}</span>
204
			<span class="instruct">{translate key="user.affiliation.description"}</span>
205
		</td>
205
		</td>
206
	</tr>
206
	</tr>
(-)a/templates/rt/bio.tpl (-1 / +1 lines)
 Lines 20-26    Link Here 
20
<p>
20
<p>
21
	<em>{$author->getFullName()|escape}</em><br />
21
	<em>{$author->getFullName()|escape}</em><br />
22
	{if $author->getUrl()}<a href="{$author->getUrl()|escape:"quotes"}">{$author->getUrl()|escape}</a><br/>{/if}
22
	{if $author->getUrl()}<a href="{$author->getUrl()|escape:"quotes"}">{$author->getUrl()|escape}</a><br/>{/if}
23
	{if $author->getAffiliation()}{$author->getAffiliation()|escape}{/if}
23
	{if $author->getLocalizedAffiliation()}{$author->getLocalizedAffiliation()|escape}{/if}
24
	{if $author->getCountry()}<br/>{$author->getCountryLocalized()|escape}{/if}
24
	{if $author->getCountry()}<br/>{$author->getCountryLocalized()|escape}{/if}
25
</p>
25
</p>
26
26
(-)a/templates/rt/metadata.tpl (-1 / +1 lines)
 Lines 39-45    Link Here 
39
	<td width="25%">{translate key="rt.metadata.dublinCore.primaryAuthor"}</td>
39
	<td width="25%">{translate key="rt.metadata.dublinCore.primaryAuthor"}</td>
40
	<td>{translate key="rt.metadata.pkp.primaryAuthor"}</td>
40
	<td>{translate key="rt.metadata.pkp.primaryAuthor"}</td>
41
	<td>
41
	<td>
42
		{$author->getFullName()|escape}{if $author->getAffiliation()}; {$author->getAffiliation()|escape}{/if}{if $author->getCountry()}; {$author->getCountryLocalized()|escape}{/if}
42
		{$author->getFullName()|escape}{if $author->getLocalizedAffiliation()}; {$author->getLocalizedAffiliation()|escape}{/if}{if $author->getCountry()}; {$author->getCountryLocalized()|escape}{/if}
43
		</td>
43
		</td>
44
</tr>
44
</tr>
45
{/foreach}
45
{/foreach}
(-)a/templates/search/authorIndex.tpl (-1 / +1 lines)
 Lines 29-35    Link Here 
29
	{assign var=lastAuthorName value=$authorName}
29
	{assign var=lastAuthorName value=$authorName}
30
	{assign var=lastAuthorCountry value=$authorCountry}
30
	{assign var=lastAuthorCountry value=$authorCountry}
31
31
32
	{assign var=authorAffiliation value=$author->getAffiliation()}
32
	{assign var=authorAffiliation value=$author->getLocalizedAffiliation()}
33
	{assign var=authorCountry value=$author->getCountry()}
33
	{assign var=authorCountry value=$author->getCountry()}
34
34
35
	{assign var=authorFirstName value=$author->getFirstName()}
35
	{assign var=authorFirstName value=$author->getFirstName()}
(-)a/templates/sectionEditor/createReviewerForm.tpl (-1 / +1 lines)
 Lines 107-113    Link Here 
107
	<tr valign="top">
107
	<tr valign="top">
108
		<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
108
		<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
109
		<td class="value">
109
		<td class="value">
110
			<textarea name="affiliation" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation|escape}</textarea><br/>
110
			<textarea name="affiliation[{$formLocale|escape}]" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation[$formLocale]|escape}</textarea><br/>
111
			<span class="instruct">{translate key="user.affiliation.description"}</span>
111
			<span class="instruct">{translate key="user.affiliation.description"}</span>
112
		</td>
112
		</td>
113
	</tr>
113
	</tr>
(-)a/templates/sectionEditor/userProfile.tpl (-1 / +1 lines)
 Lines 48-54    Link Here 
48
</tr>
48
</tr>
49
<tr valign="top">
49
<tr valign="top">
50
	<td class="label">{translate key="user.affiliation"}:</td>
50
	<td class="label">{translate key="user.affiliation"}:</td>
51
	<td class="value">{$user->getAffiliation()|escape|nl2br}</td>
51
	<td class="value">{$user->getLocalizedAffiliation()|escape|nl2br}</td>
52
</tr>
52
</tr>
53
<tr valign="top">
53
<tr valign="top">
54
	<td class="label">{translate key="user.signature"}:</td>
54
	<td class="label">{translate key="user.signature"}:</td>
(-)a/templates/submission/metadata/metadata.tpl (-1 / +1 lines)
 Lines 36-42    Link Here 
36
	{/if}
36
	{/if}
37
	<tr valign="top">
37
	<tr valign="top">
38
		<td class="label">{translate key="user.affiliation"}</td>
38
		<td class="label">{translate key="user.affiliation"}</td>
39
		<td class="value">{$author->getAffiliation()|escape|nl2br|default:"&mdash;"}</td>
39
		<td class="value">{$author->getLocalizedAffiliation()|escape|nl2br|default:"&mdash;"}</td>
40
	</tr>
40
	</tr>
41
	<tr valign="top">
41
	<tr valign="top">
42
		<td class="label">{translate key="common.country"}</td>
42
		<td class="label">{translate key="common.country"}</td>
(-)a/templates/submission/metadata/metadataEdit.tpl (-2 / +5 lines)
 Lines 52-57   function moveAuthor(dir, authorIndex) { Link Here 
52
				{foreach from=$author.biography key="thisLocale" item="thisBiography"}
52
				{foreach from=$author.biography key="thisLocale" item="thisBiography"}
53
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][biography][{$thisLocale|escape}]" value="{$thisBiography|escape}" />{/if}
53
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][biography][{$thisLocale|escape}]" value="{$thisBiography|escape}" />{/if}
54
				{/foreach}
54
				{/foreach}
55
				{foreach from=$author.affiliation key="thisLocale" item="thisAffiliation"}
56
					{if $thisLocale != $formLocale}<input type="hidden" name="authors[{$authorIndex|escape}][affiliation][{$thisLocale|escape}]" value="{$thisAffiliation|escape}" />{/if}
57
				{/foreach}
55
			{/foreach}
58
			{/foreach}
56
			{form_language_chooser form="metadata" url=$formUrl}
59
			{form_language_chooser form="metadata" url=$formUrl}
57
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
60
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
 Lines 101-107   function moveAuthor(dir, authorIndex) { Link Here 
101
	<tr valign="top">
104
	<tr valign="top">
102
		<td class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
105
		<td class="label">{fieldLabel name="authors-$authorIndex-affiliation" key="user.affiliation"}</td>
103
		<td class="value">
106
		<td class="value">
104
			<textarea name="authors[{$authorIndex|escape}][affiliation]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation|escape}</textarea><br/>
107
			<textarea name="authors[{$authorIndex|escape}][affiliation][{$formLocale|escape}]" class="textArea" id="authors-{$authorIndex|escape}-affiliation" rows="5" cols="40">{$author.affiliation[$formLocale]|escape}</textarea><br/>
105
			<span class="instruct">{translate key="user.affiliation.description"}</span>
108
			<span class="instruct">{translate key="user.affiliation.description"}</span>
106
		</td>
109
		</td>
107
	</tr>
110
	</tr>
 Lines 167-173   function moveAuthor(dir, authorIndex) { Link Here 
167
	<tr valign="top">
170
	<tr valign="top">
168
		<td class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
171
		<td class="label">{fieldLabel name="authors-0-affiliation" key="user.affiliation"}</td>
169
		<td class="value">
172
		<td class="value">
170
			<textarea name="authors[0][affiliation]" class="textArea" id="authors-0-affiliation" rows="5" cols="40">{$author.affiliation|escape}</textarea><br/>
173
			<textarea name="authors[0][affiliation][{$formLocale|escape}]" class="textArea" id="authors-0-affiliation" rows="5" cols="40"></textarea><br/>
171
			<span class="instruct">{translate key="user.affiliation.description"}</span>
174
			<span class="instruct">{translate key="user.affiliation.description"}</span>
172
		</td>
175
		</td>
173
	</tr>
176
	</tr>
(-)a/templates/submission/metadata/metadataView.tpl (-1 / +1 lines)
 Lines 33-39    Link Here 
33
	</tr>
33
	</tr>
34
	<tr valign="top">
34
	<tr valign="top">
35
		<td class="label">{translate key="user.affiliation"}</td>
35
		<td class="label">{translate key="user.affiliation"}</td>
36
		<td class="value">{$author.affiliation|escape|nl2br|default:"&mdash;"}</td>
36
		<td class="value">{$author.affiliation.$formLocale|escape|nl2br|default:"&mdash;"}</td>
37
	</tr>
37
	</tr>
38
	<tr valign="top">
38
	<tr valign="top">
39
		<td class="label">{translate key="common.country"}</td>
39
		<td class="label">{translate key="common.country"}</td>
(-)a/templates/subscription/individualSubscriptionForm.tpl (-2 / +16 lines)
 Lines 23-29    Link Here 
23
23
24
<br/>
24
<br/>
25
25
26
<form method="post" action="{url op="updateSubscription" path="individual"}">
26
<form method="post" name="subscriptionForm" action="{url op="updateSubscription" path="individual"}">
27
{if $subscriptionId}
27
{if $subscriptionId}
28
<input type="hidden" name="subscriptionId" value="{$subscriptionId|escape}" />
28
<input type="hidden" name="subscriptionId" value="{$subscriptionId|escape}" />
29
{/if}
29
{/if}
 Lines 31-36    Link Here 
31
{include file="common/formErrors.tpl"}
31
{include file="common/formErrors.tpl"}
32
32
33
<table class="data" width="100%">
33
<table class="data" width="100%">
34
{if count($formLocales) > 1}
35
	<tr valign="top">
36
		<td width="20%" class="label">{fieldLabel name="formLocale" key="form.formLanguage"}</td>
37
		<td width="80%" class="value">
38
			{if $subscriptionId}
39
				{url|assign:"formUrl" op="editSubscription" path="individual"|to_array:$subscriptionId userId=$userId escape=false}
40
			{else}
41
				{url|assign:"formUrl" op="createSubscription" path="individual" escape=false}
42
			{/if}
43
			{form_language_chooser form="subscriptionForm" url=$formUrl}
44
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
45
		</td>
46
	</tr>
47
{/if}
34
{include file="subscription/subscriptionForm.tpl"}
48
{include file="subscription/subscriptionForm.tpl"}
35
</table>
49
</table>
36
50
 Lines 45-51    Link Here 
45
		{assign var=emailString value="$userFullName <$userEmail>"}
59
		{assign var=emailString value="$userFullName <$userEmail>"}
46
		{url|assign:"url" page="user" op="email" to=$emailString|to_array redirectUrl=$currentUrl}
60
		{url|assign:"url" page="user" op="email" to=$emailString|to_array redirectUrl=$currentUrl}
47
		{$username|escape}&nbsp;&nbsp;{icon name="mail" url=$url}&nbsp;&nbsp;<a href="{if $subscriptionId}{url op="selectSubscriber" path="individual" subscriptionId=$subscriptionId}{else}{url op="selectSubscriber" path="individual"}{/if}" class="action">{translate key="common.select"}</a>
61
		{$username|escape}&nbsp;&nbsp;{icon name="mail" url=$url}&nbsp;&nbsp;<a href="{if $subscriptionId}{url op="selectSubscriber" path="individual" subscriptionId=$subscriptionId}{else}{url op="selectSubscriber" path="individual"}{/if}" class="action">{translate key="common.select"}</a>
48
		<input type="hidden" name="userId" id="userId" value="{$userId}"/>
62
		<input type="hidden" name="userId" id="userId" value="{$userId|escape}"/>
49
	</td>
63
	</td>
50
</tr>
64
</tr>
51
{include file="subscription/subscriptionFormUser.tpl"}
65
{include file="subscription/subscriptionFormUser.tpl"}
(-)a/templates/subscription/institutionalSubscriptionForm.tpl (-1 / +15 lines)
 Lines 31-36    Link Here 
31
{include file="common/formErrors.tpl"}
31
{include file="common/formErrors.tpl"}
32
32
33
<table class="data" width="100%">
33
<table class="data" width="100%">
34
{if count($formLocales) > 1}
35
	<tr valign="top">
36
		<td width="20%" class="label">{fieldLabel name="formLocale" key="form.formLanguage"}</td>
37
		<td width="80%" class="value">
38
			{if $subscriptionId}
39
				{url|assign:"formUrl" op="editSubscription" path="institutional"|to_array:$subscriptionId userId=$userId escape=false}
40
			{else}
41
				{url|assign:"formUrl" op="createSubscription" path="institutional" escape=false}
42
			{/if}
43
			{form_language_chooser form="subscriptionForm" url=$formUrl}
44
			<span class="instruct">{translate key="form.formLanguage.description"}</span>
45
		</td>
46
	</tr>
47
{/if}
34
{include file="subscription/subscriptionForm.tpl"}
48
{include file="subscription/subscriptionForm.tpl"}
35
</table>
49
</table>
36
50
 Lines 102-108    Link Here 
102
		{assign var=emailString value="$userFullName <$userEmail>"}
116
		{assign var=emailString value="$userFullName <$userEmail>"}
103
		{url|assign:"url" page="user" op="email" to=$emailString|to_array redirectUrl=$currentUrl}
117
		{url|assign:"url" page="user" op="email" to=$emailString|to_array redirectUrl=$currentUrl}
104
		{$username|escape}&nbsp;&nbsp;{icon name="mail" url=$url}&nbsp;&nbsp;<a href="{if $subscriptionId}{url op="selectSubscriber" path="institutional" subscriptionId=$subscriptionId}{else}{url op="selectSubscriber" path="institutional"}{/if}" class="action">{translate key="common.select"}</a>
118
		{$username|escape}&nbsp;&nbsp;{icon name="mail" url=$url}&nbsp;&nbsp;<a href="{if $subscriptionId}{url op="selectSubscriber" path="institutional" subscriptionId=$subscriptionId}{else}{url op="selectSubscriber" path="institutional"}{/if}" class="action">{translate key="common.select"}</a>
105
		<input type="hidden" name="userId" id="userId" value="{$userId}"/>
119
		<input type="hidden" name="userId" id="userId" value="{$userId|escape}"/>
106
	</td>
120
	</td>
107
</tr>
121
</tr>
108
{include file="subscription/subscriptionFormUser.tpl"}
122
{include file="subscription/subscriptionFormUser.tpl"}
(-)a/templates/subscription/subscriptionFormUser.tpl (-1 / +1 lines)
 Lines 43-49    Link Here 
43
<tr valign="top">
43
<tr valign="top">
44
	<td class="label">{fieldLabel name="userAffiliation" key="user.affiliation"}</td>
44
	<td class="label">{fieldLabel name="userAffiliation" key="user.affiliation"}</td>
45
	<td class="value">
45
	<td class="value">
46
		<textarea name="userAffiliation" id="userAffiliation" rows="5" cols="40" class="textArea">{$userAffiliation|escape}</textarea><br/>
46
		<textarea name="userAffiliation[{$formLocale|escape}]" id="userAffiliation" rows="5" cols="40" class="textArea">{$userAffiliation[$formLocale]|escape}</textarea><br/>
47
		<span class="instruct">{translate key="user.affiliation.description"}</span>
47
		<span class="instruct">{translate key="user.affiliation.description"}</span>
48
	</td>
48
	</td>
49
</tr>
49
</tr>
(-)a/templates/user/profile.tpl (-1 / +1 lines)
 Lines 75-81    Link Here 
75
<tr valign="top">
75
<tr valign="top">
76
	<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
76
	<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
77
	<td class="value">
77
	<td class="value">
78
		<textarea name="affiliation" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation|escape}</textarea><br/>
78
		<textarea name="affiliation[{$formLocale|escape}]" id="affiliation" rows="5" cols="40" class="textArea">{$affiliation[$formLocale]|escape}</textarea><br/>
79
		<span class="instruct">{translate key="user.affiliation.description"}</span>
79
		<span class="instruct">{translate key="user.affiliation.description"}</span>
80
	</td>
80
	</td>
81
</tr>
81
</tr>
(-)a/templates/user/publicProfile.tpl (-3 / +3 lines)
 Lines 31-46    Link Here 
31
</h4>
31
</h4>
32
32
33
<table class="listing" width="100%">
33
<table class="listing" width="100%">
34
	{if $user->getAffiliation()}
34
	{if $user->getLocalizedAffiliation()}
35
		<tr valign="top">
35
		<tr valign="top">
36
			<td class="label" width="20%">
36
			<td class="label" width="20%">
37
				{translate key="user.affiliation"}
37
				{translate key="user.affiliation"}
38
			</td>
38
			</td>
39
			<td class="data" width="80%">
39
			<td class="data" width="80%">
40
				{$user->getAffiliation()|escape|nl2br}
40
				{$user->getLocalizedAffiliation()|escape|nl2br}
41
			</td>
41
			</td>
42
		</tr>
42
		</tr>
43
	{/if}{* $user->getAffiliation() *}
43
	{/if}{* $user->getLocalizedAffiliation() *}
44
44
45
	{if $user->getLocalizedBiography()}
45
	{if $user->getLocalizedBiography()}
46
		<tr valign="top">
46
		<tr valign="top">
(-)a/templates/user/register.tpl (-1 / +1 lines)
 Lines 138-144    Link Here 
138
		<tr valign="top">
138
		<tr valign="top">
139
			<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
139
			<td class="label">{fieldLabel name="affiliation" key="user.affiliation"}</td>
140
			<td class="value">
140
			<td class="value">
141
				<textarea id="affiliation" name="affiliation" rows="5" cols="40" class="textArea">{$affiliation|escape}</textarea><br/>
141
				<textarea id="affiliation[{$formLocale|escape}]" name="affiliation" rows="5" cols="40" class="textArea">{$affiliation[$formLocale]|escape}</textarea><br/>
142
				<span class="instruct">{translate key="user.affiliation.description"}</span>
142
				<span class="instruct">{translate key="user.affiliation.description"}</span>
143
			</td>
143
			</td>
144
		</tr>
144
		</tr>

Return to bug 5550