⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Actions column



Lucas
  • profile picture
  • Member

Posted 28 April 2012 - 23:27 PM

[color=#333333][font=arial, sans-serif][size=6]you can move [/size][/font][/color][color=#333333][font=arial, sans-serif][size=6]the [/size][/font][/color][color=#333333][font=arial, sans-serif][size=6]action column [/size][/font][/color][color=#333333][font=arial, sans-serif][size=6]to [/size][/font][/color][color=#333333][font=arial, sans-serif][size=6]the left ???[/size][/font][/color]

Lucas
  • profile picture
  • Member

Posted 28 April 2012 - 23:37 PM

[img]http://content.screencast.com/users/Lucasturilli/folders/Jing/media/771a28ac-4a3c-4140-a9e7-01a9e2e1c415/2012-04-28_1836.png[/img]

noskov.biz
  • profile picture
  • Member

Posted 29 April 2012 - 06:46 AM

Hi, Lucas! I think you can easily do this if you go to the [b]./your_project/assets/grocery_crud/themes/flexigrid/views/list.php[/b] file and make a few changes or just copy & paste this:


<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
$column_width = (int)(80/count($columns));

if(!empty($list)){
?><div class="bDiv" >
<table cellspacing="0" cellpadding="0" border="0" id="flex1">
<thead>
<tr class='hDiv'>
<?php if(!$unset_delete || !$unset_edit || !empty($actions)){?>
<th align="left" abbr="tools" axis="col1" class="" width='20%'>
<div>
<?php echo $this->l('list_actions'); ?>
</div>
</th>
<?php }?>
<?php foreach($columns as $column){?>
<th width='<?php echo $column_width?>%'>
<div class="text-left field-sorting <?php if(isset($order_by[0]) && $column->field_name == $order_by[0]){?><?php echo $order_by[1]?><?php }?>"
rel='<?php echo $column->field_name?>'>
<?php echo $column->display_as?>
</div>
</th>
<?php }?>
</tr>
</thead>
<tbody>
<?php foreach($list as $num_row => $row){ ?>
<tr <?php if($num_row % 2 == 1){?>class="erow"<?php }?>>
<?php if(!$unset_delete || !$unset_edit || !empty($actions)){?>
<td align="left" width='20%'>
<div class='tools'>
<?php if(!$unset_delete){?>
<a href='<?php echo $row->delete_url?>' title='<?php echo $this->l('list_delete')?> <?php echo $subject?>' class="delete-row" >
<span class='delete-icon'></span>
</a>
<?php }?>
<?php if(!$unset_edit){?>
<a href='<?php echo $row->edit_url?>' title='<?php echo $this->l('list_edit')?> <?php echo $subject?>'><span class='edit-icon'></span></a>
<?php }?>
<?php
if(!empty($row->action_urls)){
foreach($row->action_urls as $action_unique_id => $action_url){
$action = $actions[$action_unique_id];
?>
<a href="<?php echo $action_url; ?>" class="<?php echo $action->css_class; ?> crud-action" title="<?php echo $action->label?>"><?php
if(!empty($action->image_url))
{
?><img src="<?php echo $action->image_url; ?>" alt="<?php echo $action->label?>" /><?php
}
?></a>
<?php }
}
?>
<div class='clear'></div>
</div>
</td>
<?php }?>
<?php foreach($columns as $column){?>
<td width='<?php echo $column_width?>%' class='<?php if(isset($order_by[0]) && $column->field_name == $order_by[0]){?>sorted<?php }?>'>
<div style="width: 100%;" class='text-left'><?php echo $row->{$column->field_name}; ?></div>
</td>
<?php }?>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php }else{?>
<br/>
&nbsp;&nbsp;&nbsp;&nbsp; <?php echo $this->l('list_no_items'); ?>
<br/>
<br/>
<?php }?>


And add a line #650 to the [b]./your_project/assets/grocery_crud/themes/flexigrid/css/flexigrid.css [/b]file:


float:left;


P.S. Hey, the last thing :) It seems to me this topic is more relates to the "I have a question" and not to "Bugs & issues", don't you think so?

Lucas
  • profile picture
  • Member

Posted 29 April 2012 - 19:00 PM

[color=#333333][font=arial, sans-serif][size=6]completely agree.[/size][/font][/color][color=#333333][font=arial, sans-serif][size=6] [/size][/font][/color][color=#333333][font=arial, sans-serif][size=6]thank you very much[/size][/font][/color]

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 29 April 2012 - 21:49 PM

I agree with you [member='noskov.biz'] . I just changed the category. Also the big font-size may confuse some people ... it looks like the person who post it at the bug section had a really serious bug :)

jhonroy
  • profile picture
  • Member

Posted 15 June 2016 - 09:17 AM

its work. thanks


seth
  • profile picture
  • Member

Posted 04 April 2017 - 15:29 PM

Hi how will i do it in datatables please share me the code. thank you very much