質問

2つのリストアクションを作成しました。 1つは実際にはデフォルトの_newアクションに対応し、もう1つはわずかに異なります。だからgenerator.ymlで、私は言います:

  list:    
    max_per_page: 10
    title: All Posters
    display: [approved, name, user_id, _web_path, created_at]
    actions:
      upload : #this is actually equivalent to _new. 
        credentials: create_poster
        label: "Upload Poster"
        action: new
      create : 
        credentials: create_poster
        label: "Create Poster"

私のリストビューでは、これら2つのアクションの2つのリンクを見ることができますが、リンクリンクの作成は/ポスター/listcreate/action それ以外の /ポスター/listCreate. 。その理由は何ですか?また、キャッシュに_list_actions.phpファイルを貼り付けています。

<li class="sf_admin_action_upload">
<?php if ($sf_user->hasCredential('create_poster')): ?>
<?php echo link_to(__('Upload Poster', array(), 'messages'), 'poster/new', array()) ?>
<?php endif; ?>

</li>
<li class="sf_admin_action_create">
  <?php if ($sf_user->hasCredential('create_poster')): ?>
<?php echo link_to(__('Create Poster', array(), 'messages'), 'poster/create', array()) ?>
<?php endif; ?>

</li>

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top