From: Owen Leonard Date: Fri, 17 Sep 2010 06:47:01 +0000 (-0600) Subject: changed code field in tc_assignment to be abbreviation X-Git-Tag: release_1_0_0~34 X-Git-Url: http://git.pippins.net/embedvideo/.git/static/%22%22.%24thumbnail.%22/%7Bview%7D?a=commitdiff_plain;h=adeefb69d6de73bde041fd236d418757f2920f72;p=eq%2F.git changed code field in tc_assignment to be abbreviation --- diff --git a/inc/class.tc.inc.php b/inc/class.tc.inc.php index cf456d0..976709f 100644 --- a/inc/class.tc.inc.php +++ b/inc/class.tc.inc.php @@ -584,7 +584,7 @@ class tc $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { $activity_list[$i]['name'] = $this->db2->f('name'); - $activity_list[$i]['code'] = $this->db2->f('code'); + $activity_list[$i]['abbreviation'] = $this->db2->f('abbreviation'); } $i++; } @@ -638,7 +638,7 @@ class tc $this->db2->query($sql,__LINE__,__FILE__); if($this->db2->next_record()) { $this->t->set_var('name', $this->db2->f('name')); - $this->t->set_var('code', $this->db2->f('code')); + $this->t->set_var('abbreviation', $this->db2->f('abbreviation')); } $this->t->set_var('lang_name','Assignment'); $this->t->set_var('lang_date','Date'); @@ -792,7 +792,7 @@ class tc while ($this->db->next_record()) { $assignments[$i]['assignment'] = $this->db->f('assignment'); $assignments[$i]['name'] = $this->db->f('name'); - $assignments[$i]['code'] = $this->db->f('code'); + $assignments[$i]['abbreviation'] = $this->db->f('abbreviation'); $i++; } @@ -870,7 +870,7 @@ class tc $this->t->set_block('assign_view_t','assign_view','list'); $this->t->set_var('lang_name','Assignment Name'); - $this->t->set_var('lang_code','Code'); + $this->t->set_var('lang_code','Abbreviation'); $sql = "SELECT * FROM tc_assignment ORDER BY name ASC"; $this->db->query($sql,__LINE__,__FILE__); @@ -880,14 +880,14 @@ class tc while ($this->db->next_record()) { $assignment_list[$i]['assignment'] = $this->db->f('assignment'); $assignment_list[$i]['name'] = $this->db->f('name'); - $assignment_list[$i]['code'] = $this->db->f('code'); + $assignment_list[$i]['abbreviation'] = $this->db->f('abbreviation'); $i++; } for ($i=0; $i < count($assignment_list); $i++) { $this->nextmatchs->template_alternate_row_color(&$this->t); $this->t->set_var('name',$assignment_list[$i]['name']); - $this->t->set_var('code',$assignment_list[$i]['code']); + $this->t->set_var('abbreviation',$assignment_list[$i]['abbreviation']); $link_data['menuaction'] = 'tc.tc.assign_update'; $link_data['assignment'] = $assignment_list[$i]['assignment']; @@ -921,10 +921,10 @@ class tc if($action == 'save') { $assignment['name'] = get_var('name',array('POST')); - $assignment['code'] = get_var('code',array('POST')); + $assignment['abbreviation'] = get_var('abbreviation',array('POST')); $this->db->query("UPDATE tc_assignment set " . " name='" . $assignment['name'] . "'" . - ", code='" . $assignment['code'] . "'" . + ", abbreviation='" . $assignment['abbreviation'] . "'" . " WHERE assignment=" . $assignment['assignment'],__LINE__,__FILE__); $this->assign_view(); @@ -933,10 +933,10 @@ class tc if($action == 'insert') { $assignment['name'] = get_var('name',array('POST')); - $assignment['code'] = get_var('code',array('POST')); - $this->db->query("INSERT INTO tc_assignment (name,code) " . + $assignment['abbreviation'] = get_var('abbreviation',array('POST')); + $this->db->query("INSERT INTO tc_assignment (name,abbreviation) " . "VALUES ('" . $assignment['name'] . "','" . - $assignment['code'] . "')",__LINE__,__FILE__); + $assignment['abbreviation'] . "')",__LINE__,__FILE__); $this->assign_view(); return false; } @@ -944,7 +944,7 @@ class tc if($action == 'add') { $assignment['assignment'] = 0; $this->t->set_var('name',''); - $this->t->set_var('code',''); + $this->t->set_var('abbreviation',''); $this->t->set_var('lang_done','Cancel'); $this->t->set_var('lang_action','Adding New Assignment'); $this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.assign_update&assignment=' . @@ -957,7 +957,7 @@ class tc $this->db->query($sql,__LINE__,__FILE__); $this->db->next_record(); $this->t->set_var('name', $this->db->f('name')); - $this->t->set_var('code', $this->db->f('code')); + $this->t->set_var('abbreviation', $this->db->f('abbreviation')); $this->t->set_var('lang_done','Cancel'); $this->t->set_var('lang_action','Editing Assignment'); $this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/tc/index.php','menuaction=tc.tc.assign_update&assignment=' . @@ -1012,7 +1012,7 @@ class tc while($this->db->next_record()) { $assignment_list[$i]['assignment'] = $this->db->f('assignment'); $assignment_list[$i]['name'] = $this->db->f('name'); - $assignment_list[$i]['code'] = $this->db->f('code'); + $assignment_list[$i]['abbreviation'] = $this->db->f('abbreviation'); $i++; } @@ -1020,7 +1020,7 @@ class tc $total_width=$individual_width+$part_width; for ($i=0; $i < count($assignment_list); $i++) { $this->t->set_var('assignment_name',$assignment_list[$i]['name']); - $this->t->set_var('assignment_code',$assignment_list[$i]['code']); + $this->t->set_var('assignment_abbreviation',$assignment_list[$i]['abbreviation']); $this->t->fp('list1','header_list',True); $total_width += $assignment_width; } @@ -1112,7 +1112,7 @@ class tc while($this->db->next_record()) { $assignment_list[$i]['assignment'] = $this->db->f('assignment'); $assignment_list[$i]['name'] = $this->db->f('name'); - $assignment_list[$i]['code'] = $this->db->f('code'); + $assignment_list[$i]['abbreviation'] = $this->db->f('abbreviation'); $i++; } @@ -1133,7 +1133,7 @@ class tc for ($i=0; $i < count($assignment_list); $i++) { $this->t->set_var('assignment_name',$assignment_list[$i]['name']); - $this->t->set_var('assignment_code',$assignment_list[$i]['code']); + $this->t->set_var('assignment_abbreviation',$assignment_list[$i]['abbreviation']); $this->t->fp('list1','header_list',True); $total_width += $assignment_width; $total_willing[$i] = 0; @@ -1261,7 +1261,7 @@ class tc while ($this->db->next_record()) { $assignment = $this->db->f('assignment'); $assignment_name = $this->db->f('name'); - $assignment_code = $this->db->f('code'); + $assignment_abbreviation = $this->db->f('abbreviation'); $this->nextmatchs->template_alternate_row_color(&$this->t); $table_data.="$assignment_name"; diff --git a/sql/tc.sql b/sql/tc.sql index 79cd0a0..531b98e 100644 --- a/sql/tc.sql +++ b/sql/tc.sql @@ -44,7 +44,7 @@ CREATE TABLE `tc_appointment` ( CREATE TABLE `tc_assignment` ( `assignment` int(12) unsigned NOT NULL auto_increment, `name` varchar(60) NOT NULL, - `code` varchar(12) default NULL, + `abbreviation` varchar(12) default NULL, PRIMARY KEY (`assignment`) ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; @@ -53,7 +53,7 @@ CREATE TABLE `tc_assignment` ( -- LOCK TABLES `tc_assignment` WRITE; /*!40000 ALTER TABLE `tc_assignment` DISABLE KEYS */; -INSERT INTO `tc_assignment` (`assignment`, `name`, `code`) VALUES (1,'Enrichment Night Babysitting','RS'),(2,'Building Lockup','LU'),(3,'Building Cleaning Coordinator','CC'),(4,'Missionary Splits','MS'),(5,'Stake Farm','SF'),(6,'Loveland Kitchen','LK'),(7,'Moves','MV'),(8,'Temple Kitchen & Laundary','TKL'),(9,'Temple Sealings','TS'),(10,'Temple Initatories','TI'); +INSERT INTO `tc_assignment` (`assignment`, `name`, `abbreviation`) VALUES (1,'Enrichment Night Babysitting','RS'),(2,'Building Lockup','LU'),(3,'Building Cleaning Coordinator','CC'),(4,'Missionary Splits','MS'),(5,'Stake Farm','SF'),(6,'Loveland Kitchen','LK'),(7,'Moves','MV'),(8,'Temple Kitchen & Laundary','TKL'),(9,'Temple Sealings','TS'),(10,'Temple Initatories','TI'); /*!40000 ALTER TABLE `tc_assignment` ENABLE KEYS */; UNLOCK TABLES; diff --git a/templates/default/assign_update.tpl b/templates/default/assign_update.tpl index 08be270..42ed541 100644 --- a/templates/default/assign_update.tpl +++ b/templates/default/assign_update.tpl @@ -12,7 +12,7 @@ Name:  - Code:  This is a 2 or 3 letter abbreviation that uniquely identifies this assignment. + Code:  This is a 2 or 3 letter abbreviation that uniquely identifies this assignment. diff --git a/templates/default/assign_view.tpl b/templates/default/assign_view.tpl index 4c60520..9d1f7a4 100644 --- a/templates/default/assign_view.tpl +++ b/templates/default/assign_view.tpl @@ -10,7 +10,7 @@ - {code} + {abbreviation} {name} {lang_view} {lang_edit}