frontend edit button display logic